tweaking installations of config files so that FreeBSD ports do not clobber local...
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Fri, 12 Sep 2008 06:40:42 +0000 (02:40 -0400)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Fri, 12 Sep 2008 06:40:42 +0000 (02:40 -0400)
Makefile
packaging/freebsd/Makefile
packaging/freebsd/TODO
packaging/freebsd/distinfo
packaging/freebsd/pkg-plist

index 98d265e5c1fc4b3aa45f8e894eef8785e7f6df2b..f64a5043f7627e7d2f2410b3fa31c9bd60d34efb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,7 @@ MONKEYSPHERE_VERSION = `head -n1 debian/changelog | sed 's/.*(\([^-]*\)-.*/\1/'`
 # these defaults are for debian.  porters should probably adjust them
 # before calling make install
 ETCPREFIX ?= 
+ETCSUFFIX ?= 
 PREFIX ?= /usr
 MANPREFIX ?= $(PREFIX)/share/man
 
@@ -40,7 +41,8 @@ install: all installman
        install src/monkeysphere-server $(DESTDIR)$(PREFIX)/sbin
        install -m 0644 src/common $(DESTDIR)$(PREFIX)/share/monkeysphere
        install doc/* $(DESTDIR)$(PREFIX)/share/doc/monkeysphere
-       install -m 0644 etc/* $(DESTDIR)$(ETCPREFIX)/etc/monkeysphere
+       install -m 0644 etc/monkeysphere.conf $(DESTDIR)$(ETCPREFIX)/etc/monkeysphere$(ETCSUFFIX)
+       install -m 0644 etc/monkeysphere-server.conf $(DESTDIR)$(ETCPREFIX)/etc/monkeysphere/monkeysphere-server.conf$(ETCSUFFIX)
 
 installman:
        mkdir -p $(DESTDIR)$(MANPREFIX)/man1 $(DESTDIR)$(MANPREFIX)/man7 $(DESTDIR)$(MANPREFIX)/man8
index 9d90b4594a7b97add526195dcc0f51675ae0cdee..82e3bf88f58bf67e94388a89192734d085daf151 100644 (file)
@@ -29,6 +29,6 @@ MAN7=         monkeysphere.7
 MAN8=          monkeysphere-server.8
 MANCOMPRESSED= yes
 
-MAKE_ARGS= ETCPREFIX=/usr/local MANPREFIX=/usr/local/man
+MAKE_ARGS= ETCPREFIX=/usr/local MANPREFIX=/usr/local/man ETCSUFFIX=.sample
 
 .include <bsd.port.mk>
index bb65ad71f2a81b554735c6504be45a1fdb1b444c..f4824574ed199c461adbfc54855b61f063915e3e 100644 (file)
@@ -14,11 +14,6 @@ http://www.freebsd.org/cgi/cvsweb.cgi/ports/net/cvsup-mirror/pkg-install
 or just look around the ports tree for pkg-install files, they are
 usually for adding users.
 
-There is also the usual crappy work involved with installing a .defaults
-file instead of straight files in /usr/local/etc:
-
-http://www.freebsd.org/doc/en/books/porters-handbook/plist-config.html
-
 Finally the pkg-plist needs to be checked. The package hasn't been
 installed at all once yet, it only patches and builds.
 
index 9716554aa96f3adaed4176b25fc242954392f49b..23d57ea1d6c3e70b9409e99b678432940b4f915a 100644 (file)
@@ -1,3 +1,3 @@
-MD5 (monkeysphere_0.16~pre.orig.tar.gz) = cc02c34932b781bb2436f54d99fde2cc
-SHA256 (monkeysphere_0.16~pre.orig.tar.gz) = b54f66a2aed82864d22348800752e3881633af0aa4692beb367c88c8a4c4bc31
-SIZE (monkeysphere_0.16~pre.orig.tar.gz) = 58172
+MD5 (monkeysphere_0.16~pre.orig.tar.gz) = f96364b5938373787297e532270c1d27
+SHA256 (monkeysphere_0.16~pre.orig.tar.gz) = 4a1db42b4e0f6b05bf747a4e3aeeb88971c00deff752f58410e1ff646bcf350e
+SIZE (monkeysphere_0.16~pre.orig.tar.gz) = 58191
index 70a9b1175c716452874c508a6a7a33ebfe8a5646..43346c1228f26061969dcc52e7a599f339ce6ba6 100644 (file)
@@ -7,8 +7,12 @@ bin/openpgp2ssh
 bin/monkeysphere-ssh-proxycommand
 bin/monkeysphere
 share/monkeysphere/common
-etc/monkeysphere/monkeysphere-server.conf
-etc/monkeysphere/monkeysphere.conf
+@unexec if cmp -s %D/etc/monkeysphere/monkeysphere.conf.sample %D/etc/monkeysphere/monkeysphere.conf; then rm -f %D/etc/monkeysphere/monkeysphere.conf; fi
+etc/monkeysphere/monkeysphere.conf.sample
+@exec if [ ! -f %D/etc/monkeysphere/monkeysphere.conf ] ; then cp -p %D/%F %B/monkeysphere.conf; fi
+@unexec if cmp -s %D/etc/monkeysphere/monkeysphere-server.conf.sample %D/etc/monkeysphere/monkeysphere-server.conf; then rm -f %D/etc/monkeysphere/monkeysphere-server.conf; fi
+etc/monkeysphere/monkeysphere-server.conf.sample
+@exec if [ ! -f %D/etc/monkeysphere/monkeysphere-server.conf ] ; then cp -p %D/%F %B/monkeysphere-server.conf; fi
 @dirrm share/doc/monkeysphere
 @dirrm share/monkeysphere
 @dirrm etc/monkeysphere