What's the appropriate Makefile-fu to change someport.conf to
someport.conf.sample?
Tillman Hodgson
tillman at seekingfire.com
Mon Dec 22 20:12:31 PST 2003
On Mon, Dec 22, 2003 at 09:17:57PM -0600, Pete Fritchman wrote:
> * Mon, 22 Dec 2003 17:11:59 CST - Tillman Hodgson:
> | Is the following acceptable practice?
> |
> | pre-configure:
> | @${CP} ${WRKSRC}/latd.conf ${WRKSRC}/latd.conf.sample
> | @${SED} -i .dist -e 's/sysconf_DATA = latd.conf/sysconf_DATA = latd.con
> | f.sample/' ${WRKSRC}/Makefile.in
>
> USE_REINPLACE= yes
> [...]
> post-patch:
> @${REINPLACE_CMD} -e 's/foo/bar/' ${WRKSRC}/Makefile.in
Thanks!
This isn't documented in the Porter's Handbook and I wish it was - after
reading up on it in bsd.ports.mk it looks exactly like I wanted. Would
you mind pointing me to the right place?
> This is a good start. But there's more to config file management; it'd
> be good form to install both latd.conf + latd.conf.sample. Upon deinstall,
> cmp latd.conf and latd.conf.sample -- if they're the same, remove latd.conf,
> if not - leave the user's customizations. On install, check if latd.conf
> exists (think a custom config from a previous install) -- if not, install
> the .sample one.
I agree, that's definitely the better way to go.
On a somewhat related topic, are there any reasons why XFree86 clobbers
the XDM configuration files? I would have thought that it was a
high-profile enough port to have those sorts of things ironed out. I've
been mildly curious about whether there were any technical reasons
behind it for a while now.
> Like I said, the editors/joe-devel port provides (what I think is) a good
> example.
I've dug through joe-devel and I think that it's approach is great. I
also think that it's over-kill for a 1-line change that the original
application author will be fixing in the next release :-)
Thanks for your help, it's much appreciated.
-T
--
The supreme irony of life is that hardly anyone gets out alive.
- Robert Heinlein
More information about the freebsd-ports
mailing list