diff options
author | William Grzybowski <wg@FreeBSD.org> | 2014-06-20 18:41:00 +0000 |
---|---|---|
committer | William Grzybowski <wg@FreeBSD.org> | 2014-06-20 18:41:00 +0000 |
commit | da44ba9aeaebf45e26394f6ef7588f878c630188 (patch) | |
tree | fec794f136e2703cf75bc24f2423efb753fde6d1 /net | |
parent | fcc60b2d0dc26f17bf4b0c12130beb05aec7d52b (diff) | |
download | ports-da44ba9aeaebf45e26394f6ef7588f878c630188.tar.gz ports-da44ba9aeaebf45e26394f6ef7588f878c630188.zip |
Notes
Diffstat (limited to 'net')
-rw-r--r-- | net/iplog/Makefile | 22 | ||||
-rw-r--r-- | net/iplog/files/iplog.in | 1 | ||||
-rw-r--r-- | net/iplog/pkg-deinstall | 18 | ||||
-rw-r--r-- | net/iplog/pkg-install | 23 | ||||
-rw-r--r-- | net/iplog/pkg-plist | 6 |
5 files changed, 46 insertions, 24 deletions
diff --git a/net/iplog/Makefile b/net/iplog/Makefile index 764b636f0fd4..2b6e3b1d8b54 100644 --- a/net/iplog/Makefile +++ b/net/iplog/Makefile @@ -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> diff --git a/net/iplog/files/iplog.in b/net/iplog/files/iplog.in index 0fa85f8ffc9d..751001872d79 100644 --- a/net/iplog/files/iplog.in +++ b/net/iplog/files/iplog.in @@ -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 diff --git a/net/iplog/pkg-deinstall b/net/iplog/pkg-deinstall index 8f06173f2450..74714b229875 100644 --- a/net/iplog/pkg-deinstall +++ b/net/iplog/pkg-deinstall @@ -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 diff --git a/net/iplog/pkg-install b/net/iplog/pkg-install new file mode 100644 index 000000000000..0dc61543f38d --- /dev/null +++ b/net/iplog/pkg-install @@ -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 diff --git a/net/iplog/pkg-plist b/net/iplog/pkg-plist index 6c24cb03e9d6..1c8fa68525c7 100644 --- a/net/iplog/pkg-plist +++ b/net/iplog/pkg-plist @@ -1,4 +1,4 @@ sbin/iplog -@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 -@exec test -f %B/iplog.conf || cp %B/%f %B/iplog.conf +@sample etc/iplog.conf.sample +man/man5/iplog.conf.5.gz +man/man8/iplog.8.gz |