diff options
author | sem <sem@FreeBSD.org> | 2007-04-07 14:51:07 +0800 |
---|---|---|
committer | sem <sem@FreeBSD.org> | 2007-04-07 14:51:07 +0800 |
commit | c5dcd64529e6c9d742cbf399f2bdf4618fad1d58 (patch) | |
tree | 35ec535d45eab9850385e36a0cef815428f17973 /security/blocksshd | |
parent | 57fd3c8e1ea5472cc004edfb68633d6ccc51186e (diff) | |
download | freebsd-ports-graphics-c5dcd64529e6c9d742cbf399f2bdf4618fad1d58.tar.gz freebsd-ports-graphics-c5dcd64529e6c9d742cbf399f2bdf4618fad1d58.tar.zst freebsd-ports-graphics-c5dcd64529e6c9d742cbf399f2bdf4618fad1d58.zip |
- Do not remove user modified config file on deinstall
Reported on: ports@
Diffstat (limited to 'security/blocksshd')
-rw-r--r-- | security/blocksshd/Makefile | 7 | ||||
-rw-r--r-- | security/blocksshd/files/patch-Makefile | 13 | ||||
-rw-r--r-- | security/blocksshd/pkg-plist | 4 |
3 files changed, 20 insertions, 4 deletions
diff --git a/security/blocksshd/Makefile b/security/blocksshd/Makefile index e9998872111..2915592f6b0 100644 --- a/security/blocksshd/Makefile +++ b/security/blocksshd/Makefile @@ -7,7 +7,7 @@ PORTNAME= blocksshd PORTVERSION= 1.0.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security sysutils MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= blocksshd @@ -34,4 +34,9 @@ post-patch: @${REINPLACE_CMD} -e 's|^MANCOMPRESS = .gz||g' ${WRKSRC}/Makefile @${REINPLACE_CMD} -e 's|/etc/blocksshd.conf|${PREFIX}/etc/blocksshd.conf|g' ${WRKSRC}/blocksshd +post-install: + @if [ ! -f ${PREFIX}/etc/blocksshd.conf ]; then \ + ${CP} ${PREFIX}/etc/blocksshd.conf.sample ${PREFIX}/etc/blocksshd.conf; \ + fi + .include <bsd.port.mk> diff --git a/security/blocksshd/files/patch-Makefile b/security/blocksshd/files/patch-Makefile index 20ad945c879..7a50d73655f 100644 --- a/security/blocksshd/files/patch-Makefile +++ b/security/blocksshd/files/patch-Makefile @@ -1,5 +1,5 @@ ---- Makefile.orig Wed Nov 29 00:03:23 2006 -+++ Makefile Wed Nov 29 00:03:36 2006 +--- Makefile.orig Sat Dec 30 18:23:03 2006 ++++ Makefile Sat Apr 7 10:38:43 2007 @@ -15,11 +15,11 @@ PREFIX = /usr EXEC_PREFIX = $(PREFIX) @@ -14,3 +14,12 @@ DESTDIR = all: $(APPNAME).1$(MANCOMPRESS) +@@ -29,7 +29,7 @@ + $(INSTALL) -m 755 -d $(DESTDIR)$(SYSCONFDIR) + $(INSTALL) -m 755 -d $(DESTDIR)$(MAN1DIR) + $(INSTALL) -m 755 $(APPNAME) $(DESTDIR)$(BINDIR) +- $(INSTALL) -m 755 $(CONF) $(DESTDIR)$(SYSCONFDIR) ++ $(INSTALL) -m 755 $(CONF) $(DESTDIR)$(SYSCONFDIR)/$(CONF).sample + $(INSTALL) -m 644 $(APPNAME).1$(MANCOMPRESS) $(DESTDIR)$(MAN1DIR) + + init: diff --git a/security/blocksshd/pkg-plist b/security/blocksshd/pkg-plist index 1977023c302..b9745fa9437 100644 --- a/security/blocksshd/pkg-plist +++ b/security/blocksshd/pkg-plist @@ -1,3 +1,5 @@ @comment $FreeBSD$ bin/blocksshd -etc/blocksshd.conf +@unexec if cmp -s %D/etc/blocksshd.conf %D/etc/blocksshd.conf.sample; then rm -f %D/etc/blocksshd.conf; fi +etc/blocksshd.conf.sample +@exec if [ ! -f %D/etc/blocksshd.conf ]; then cp -p %D/%F %D/etc/blocksshd.conf; fi |