What's the appropriate Makefile-fu to change someport.conf to someport.conf.sample?

Pete Fritchman petef at absolutbsd.org
Mon Dec 22 07:36:12 PST 2003


* Mon, 22 Dec 2003 09:04:23 CST - Tillman Hodgson:
| pre-install:
|         cp ${WRKSRC}/latd.conf ${WRKSRC}/latd.conf.sample

That will make a file named .sample, but not actually install it.  If
you're using the upstream Makefile for installing (as opposed to a
do-install target), you'll probably need to patch that to know about
installing latd.conf.sample (and not installing latd.conf over top of
an existing latd.conf!).

| and then putting latd.conf.sample into pkg-plist. It creates
| latd.conf.sample in WRKSRC, but still installs latd.conf ... I assume
| that's because it decides to do based on somethign other than pkg-plist.

Right; pkg-plist is a FreeBSD ports thing, the upstream Makefiles for
software doesn't look at it.

| Is there a canonical way to handle this situation in a ports Makefile so
| that config files don't clobber?

There are examples all over the tree.  Checkout the editors/joe-devel
port for an example (specifically files/patch-Makefile.in and pkg-plist).

--pete


More information about the freebsd-ports mailing list