From c5dcd64529e6c9d742cbf399f2bdf4618fad1d58 Mon Sep 17 00:00:00 2001 From: sem Date: Sat, 7 Apr 2007 06:51:07 +0000 Subject: - Do not remove user modified config file on deinstall Reported on: ports@ --- security/blocksshd/Makefile | 7 ++++++- security/blocksshd/files/patch-Makefile | 13 +++++++++++-- security/blocksshd/pkg-plist | 4 +++- 3 files changed, 20 insertions(+), 4 deletions(-) (limited to 'security') diff --git a/security/blocksshd/Makefile b/security/blocksshd/Makefile index e999887..2915592 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 diff --git a/security/blocksshd/files/patch-Makefile b/security/blocksshd/files/patch-Makefile index 20ad945..7a50d73 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 1977023..b9745fa 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 -- cgit v1.1