diff options
author | krion <krion@FreeBSD.org> | 2004-12-13 18:07:13 +0800 |
---|---|---|
committer | krion <krion@FreeBSD.org> | 2004-12-13 18:07:13 +0800 |
commit | 671feaf99aeb50fce7c584d980e6e47de9b3ca3f (patch) | |
tree | ff6ae2a0481436e60c4cc915b35e582a21f851af | |
parent | 5c0a9313cba513ea897c6d782d12c52dd87a2e2f (diff) | |
download | freebsd-ports-graphics-671feaf99aeb50fce7c584d980e6e47de9b3ca3f.tar.gz freebsd-ports-graphics-671feaf99aeb50fce7c584d980e6e47de9b3ca3f.tar.zst freebsd-ports-graphics-671feaf99aeb50fce7c584d980e6e47de9b3ca3f.zip |
Use RC_SUBR.
Cleanups for net/libnids dependency.
PR: ports/75009
Submitted by: maintainer
-rw-r--r-- | security/scanlogd/Makefile | 17 | ||||
-rw-r--r-- | security/scanlogd/files/scanlogd.sh | 26 |
2 files changed, 38 insertions, 5 deletions
diff --git a/security/scanlogd/Makefile b/security/scanlogd/Makefile index 412f92d4055..32176bb3214 100644 --- a/security/scanlogd/Makefile +++ b/security/scanlogd/Makefile @@ -7,6 +7,7 @@ PORTNAME= scanlogd PORTVERSION= 2.2.5 +PORTREVISION= 1 CATEGORIES= security MASTER_SITES= http://openwall.com/scanlogd/ \ ftp://ftp.openwall.com/pub/projects/scanlogd/ \ @@ -15,11 +16,10 @@ MASTER_SITES= http://openwall.com/scanlogd/ \ MAINTAINER= bogorodskiy@inbox.ru COMMENT= TCP port scan detection tool -.if defined(WITH_LIBNIDS) -BUILD_DEPENDS+= ${LOCALBASE}/lib/libnids.a:${PORTSDIR}/net/libnids -.endif +USE_RC_SUBR= yes .if defined(WITH_LIBNIDS) +BUILD_DEPENDS+= ${LOCALBASE}/lib/libnids.a:${PORTSDIR}/net/libnids ALL_TARGET= libnids .else ALL_TARGET= libpcap @@ -27,13 +27,20 @@ ALL_TARGET= libpcap MAKE_ARGS= CC="${CC}" CFLAGS="${CFLAGS} -c" LD="${CC}" MAN8= scanlogd.8 -PLIST_FILES= bin/scanlogd +PLIST_FILES= bin/scanlogd \ + etc/rc.d/scanlogd.sh + +RC_SCRIPTS_SUB= PREFIX=${PREFIX} \ + RC_SUBR=${RC_SUBR} do-install: ${INSTALL_PROGRAM} ${WRKSRC}/scanlogd ${PREFIX}/bin ${INSTALL_MAN} ${WRKSRC}/scanlogd.8 ${MANPREFIX}/man/man8 post-install: - @${CAT} ${PKGMESSAGE} + @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ + ${FILESDIR}/scanlogd.sh > ${PREFIX}/etc/rc.d/scanlogd.sh + @${CHMOD} ${BINMODE} ${PREFIX}/etc/rc.d/scanlogd.sh + @${CAT} ${PKGMESSAGE} .include <bsd.port.mk> diff --git a/security/scanlogd/files/scanlogd.sh b/security/scanlogd/files/scanlogd.sh new file mode 100644 index 00000000000..82baadd6d9b --- /dev/null +++ b/security/scanlogd/files/scanlogd.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +# Start or stop scanlogd +# $FreeBSD$ + +# PROVIDE: scanlogd +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: FreeBSD shutdown +# + +prefix=%%PREFIX%% + +scanlogd_enable=${scanlogd_enable:-"NO"} # Enable scanlogd +scanlogd_program="${prefix}/sbin/scanlogd" # Location of scanlogd +scanlogd_flags=${scanlogd_flags:-""} # Flags to scanlogd + +. %%RC_SUBR%% + +name="scanlogd" +rcvar=`set_rcvar` +command="${prefix}/sbin/${name}" +required_files="" + +load_rc_config $name +run_rc_command "$1" |