svn commit: r358627 - in head/net/iplog: . files

William Grzybowski wg at FreeBSD.org
Fri Jun 20 18:41:01 UTC 2014


Author: wg
Date: Fri Jun 20 18:41:00 2014
New Revision: 358627
URL: http://svnweb.freebsd.org/changeset/ports/358627
QAT: https://qat.redports.org/buildarchive/r358627/

Log:
  net/iplog: support stage and use @sample
  
  PR:		190095
  Submitted by:	maintainer

Added:
  head/net/iplog/pkg-install   (contents, props changed)
Modified:
  head/net/iplog/Makefile
  head/net/iplog/files/iplog.in
  head/net/iplog/pkg-deinstall
  head/net/iplog/pkg-plist

Modified: head/net/iplog/Makefile
==============================================================================
--- head/net/iplog/Makefile	Fri Jun 20 18:37:53 2014	(r358626)
+++ head/net/iplog/Makefile	Fri Jun 20 18:41:00 2014	(r358627)
@@ -14,14 +14,9 @@ USES=		gmake
 GNU_CONFIGURE=	yes
 CPPFLAGS+=	-I${LOCALBASE}/include ${PTHREAD_CFLAGS}
 LDFLAGS+=	-L${LOCALBASE}/lib ${PTHREAD_LIBS}
-MAN5=		iplog.conf.5
-MAN8=		iplog.8
 
 USE_RC_SUBR=	iplog
-SUB_FILES=	pkg-message
 
-NO_STAGE=	yes
-.include <bsd.port.pre.mk>
 post-patch:
 .for FILE in example-iplog.conf iplog.8 iplog.conf.5 src/iplog.h
 	@${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/${FILE}
@@ -29,19 +24,6 @@ post-patch:
 	@${REINPLACE_CMD} -e 's|-pthread||g' ${WRKSRC}/configure
 
 post-install:
-	${INSTALL_DATA} ${WRKSRC}/example-iplog.conf ${PREFIX}/etc
-.if !exists(${PREFIX}/etc/iplog.conf)
-	${INSTALL_DATA} ${WRKSRC}/example-iplog.conf ${PREFIX}/etc/iplog.conf
-.endif
-.if exists(${PREFIX}/etc/iplog.rules)
-	@${ECHO_MSG}
-	@${ECHO_MSG} "============================================================================"
-	@${ECHO_MSG} "Hint:	iplog changed its configuration file from ${PREFIX}/etc/iplog.rules"
-	@${ECHO_MSG} "	to ${PREFIX}/etc/iplog.conf"
-	@${ECHO_MSG}
-	@${ECHO_MSG} "See ${PREFIX}/etc/example-iplog.conf for an example"
-	@${ECHO_MSG} "============================================================================"
-.endif
-	@${MKDIR} /var/run/iplog
+	@${INSTALL_DATA} ${WRKSRC}/example-iplog.conf ${STAGEDIR}${PREFIX}/etc/iplog.conf.sample
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/net/iplog/files/iplog.in
==============================================================================
--- head/net/iplog/files/iplog.in	Fri Jun 20 18:37:53 2014	(r358626)
+++ head/net/iplog/files/iplog.in	Fri Jun 20 18:41:00 2014	(r358627)
@@ -18,6 +18,7 @@
 name="iplog"
 rcvar=iplog_enable
 
+start_precmd="install -d /var/run/${name}"
 command=%%PREFIX%%/sbin/${name}
 pidfile=/var/run/${name}/${name}.pid
 

Modified: head/net/iplog/pkg-deinstall
==============================================================================
--- head/net/iplog/pkg-deinstall	Fri Jun 20 18:37:53 2014	(r358626)
+++ head/net/iplog/pkg-deinstall	Fri Jun 20 18:41:00 2014	(r358627)
@@ -1,2 +1,18 @@
 #!/bin/sh
-rm -rf /var/run/iplog
+#
+#	$FreeBSD: $
+#
+
+#set -vx
+
+PKG_PREFIX=${PKG_PREFIX:=/usr/local}
+
+case $2 in
+	DEINSTALL)
+		:
+		;;
+	POST-DEINSTALL)
+		/bin/rm -rf /var/run/iplog
+		;;
+
+esac

Added: head/net/iplog/pkg-install
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/iplog/pkg-install	Fri Jun 20 18:41:00 2014	(r358627)
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+#	$FreeBSD: $
+#
+
+PKG_PREFIX=${PKG_PREFIX:=/usr/local}
+
+case $2 in
+	PRE-INSTALL)
+		:
+	;;
+	POST-INSTALL)
+		if [ -e ${PKG_PREFIX}/etc/iplog.rules ]; then
+			echo
+			echo "============================================================================"
+			echo "Hint:	iplog changed its configuration file from ${PKG_PREFIX}/etc/iplog.rules"
+			echo "	to ${PKG_PREFIX}/etc/iplog.conf"
+			echo
+			echo "See ${PKG_PREFIX}/etc/iplog.conf.sample for an example"
+			echo "============================================================================"
+		fi
+        ;;
+esac

Modified: head/net/iplog/pkg-plist
==============================================================================
--- head/net/iplog/pkg-plist	Fri Jun 20 18:37:53 2014	(r358626)
+++ head/net/iplog/pkg-plist	Fri Jun 20 18:41:00 2014	(r358627)
@@ -1,4 +1,4 @@
 sbin/iplog
- at unexec if cmp -s %D/etc/iplog.conf %D/etc/example-iplog.conf; then rm -f %D/etc/iplog.conf; fi
-etc/example-iplog.conf
- at exec test -f %B/iplog.conf || cp %B/%f %B/iplog.conf
+ at sample etc/iplog.conf.sample
+man/man5/iplog.conf.5.gz
+man/man8/iplog.8.gz


More information about the svn-ports-head mailing list