diff options
author | Dirk Meyer <dinoex@FreeBSD.org> | 2009-01-16 19:54:13 +0000 |
---|---|---|
committer | Dirk Meyer <dinoex@FreeBSD.org> | 2009-01-16 19:54:13 +0000 |
commit | eaa578daf7f1e17db9fe71a18f78c537e6af63cf (patch) | |
tree | 4dff2188dfa64b41b97c0d4a0c044617fd361deb | |
parent | b34b48fdee7091976fe10c546c5b62ef417a1649 (diff) | |
download | ports-eaa578daf7f1e17db9fe71a18f78c537e6af63cf.tar.gz ports-eaa578daf7f1e17db9fe71a18f78c537e6af63cf.zip |
Notes
-rw-r--r-- | mail/antivirus-milter/Makefile | 9 | ||||
-rw-r--r-- | mail/antivirus-milter/files/antivirus-milter.sh | 28 | ||||
-rw-r--r-- | mail/antivirus-milter/files/antivirus-milter.sh.in | 51 | ||||
-rw-r--r-- | mail/antivirus-milter/pkg-plist | 1 | ||||
-rw-r--r-- | mail/noattach/Makefile | 9 | ||||
-rw-r--r-- | mail/noattach/files/noattach.sh | 36 | ||||
-rw-r--r-- | mail/noattach/files/noattach.sh.in | 56 | ||||
-rw-r--r-- | mail/noattach/pkg-plist | 1 | ||||
-rw-r--r-- | mail/spamilter/Makefile | 12 | ||||
-rw-r--r-- | mail/spamilter/files/spamilter.sh | 36 | ||||
-rw-r--r-- | mail/spamilter/files/spamilter.sh.in | 49 | ||||
-rw-r--r-- | mail/vbsfilter/Makefile | 7 | ||||
-rw-r--r-- | mail/vbsfilter/files/vbsfilter.sh.in | 68 |
13 files changed, 219 insertions, 144 deletions
diff --git a/mail/antivirus-milter/Makefile b/mail/antivirus-milter/Makefile index 229023aa4970..ee01e484a4a1 100644 --- a/mail/antivirus-milter/Makefile +++ b/mail/antivirus-milter/Makefile @@ -7,7 +7,7 @@ PORTNAME= antivirus PORTVERSION= 3.30 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= mail MASTER_SITES= ${MASTER_SITE_LOCAL} MASTER_SITE_SUBDIR= dinoex @@ -15,10 +15,13 @@ MASTER_SITE_SUBDIR= dinoex MAINTAINER= dinoex@FreeBSD.org COMMENT= Sendmail milter wich uses Mcafee Virus Scan or clamav +USE_RC_SUBR= antivirus-milter.sh + CFLAGS+= -Wall ${PTHREAD_CFLAGS:S=""==} LIBS+= -lmilter ${PTHREAD_LIBS} ANTIVIRUS_DIR?= /var/spool/antivirus PLIST_SUB+= ANTIVIRUS=${ANTIVIRUS_DIR} +SUB_LIST+= ANTIVIRUS=${ANTIVIRUS_DIR} SED_SCRIPT= -e 's|%%ANTIVIRUS%%|${ANTIVIRUS_DIR}|g' \ -e 's|%%PREFIX%%|${PREFIX}|g' @@ -36,16 +39,12 @@ MAKE_ENV+= SENDMAILBASE="${MILTERBASE}" \ do-configure: @${REINPLACE_CMD} -e 's|/etc/mail/antivirus.conf|${LOCALBASE}/etc/antivirus.conf|' \ ${CONFIGURE_WRKSRC}/antivirus.c - @${SED} ${SED_SCRIPT} ${FILESDIR}/antivirus-milter.sh \ - > ${WRKSRC}/antivirus-milter.sh @${SED} ${SED_SCRIPT} ${FILESDIR}/antivirus.conf \ > ${WRKSRC}/antivirus.conf do-install: ${INSTALL_PROGRAM} ${WRKSRC}/antivirus \ ${PREFIX}/libexec/antivirus - ${INSTALL_SCRIPT} ${WRKSRC}/antivirus-milter.sh \ - ${PREFIX}/etc/rc.d/antivirus-milter.sh.sample ${INSTALL_DATA} ${WRKSRC}/antivirus.conf ${PREFIX}/etc/antivirus.conf-dist ${MKDIR} ${ANTIVIRUS_DIR}/spool ${ANTIVIRUS_DIR}/run ${ANTIVIRUS_DIR}/quarantine ${CHOWN} -R nobody:nobody ${ANTIVIRUS_DIR}/ diff --git a/mail/antivirus-milter/files/antivirus-milter.sh b/mail/antivirus-milter/files/antivirus-milter.sh deleted file mode 100644 index ae642dcdb38d..000000000000 --- a/mail/antivirus-milter/files/antivirus-milter.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# -if ! test -x %%PREFIX%%/libexec/antivirus -then - exit 0 -fi -case "$1" in -start) - rm -f %%ANTIVIRUS%%/antivirus.sock %%ANTIVIRUS%%/run/antivirus.pid - %%PREFIX%%/libexec/antivirus -p local:%%ANTIVIRUS%%/antivirus.sock & - echo -n ' antivirus' - ;; -stop) - if test -r %%ANTIVIRUS%%/run/antivirus.pid - then - kill `head -1 %%ANTIVIRUS%%/run/antivirus.pid` - else - echo " antivirus: not running" 2>&1 - fi - rm -f %%ANTIVIRUS%%/run/antivirus.pid - ;; -*) - echo "Usage: ${0##*/}: { start | stop }" >&2 - exit 64 - ;; -esac diff --git a/mail/antivirus-milter/files/antivirus-milter.sh.in b/mail/antivirus-milter/files/antivirus-milter.sh.in new file mode 100644 index 000000000000..8d89715ebb31 --- /dev/null +++ b/mail/antivirus-milter/files/antivirus-milter.sh.in @@ -0,0 +1,51 @@ +#!/bin/sh + +# $FreeBSD$ + +# Start or stop antivirus + +# PROVIDE: antivirus +# REQUIRE: DAEMON +# BEFORE: mail +# KEYWORD: shutdown +# + +prefix=%%PREFIX%% + +# Define these antivirus_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# /etc/rc.conf.d/antivirus +# +# DO NOT CHANGE THESE DEFAULT VALUES HERE +# +antivirus_enable=${antivirus_enable:-"NO"} # Enable antivirus-milter +antivirus_pidfile=${antivirus_pidfile:-"%%ANTIVIRUS%%/run/antivirus.pid"} # Path to pidfile +antivirus_socket=${antivirus_socket:-"%%ANTIVIRUS%%/antivirus.sock"} # Path to socket +antivirus_flags=${antivirus_flags:-""} # Flags to antivirus + +. /etc/rc.subr + +name="antivirus" +rcvar=`set_rcvar` +command="${prefix}/libexec/antivirus" +required_files="${prefix}/etc/antivirus.conf" +start_precmd="antivirus_prestart" +stop_postcmd="antivirus_poststop" + +antivirus_prestart() { + /bin/rm -f "${pidfile}" "${antivirus_socket}" +} + +antivirus_poststop() { + /bin/rm -f "${pidfile}" "${antivirus_socket}" +} + +load_rc_config $name + +pidfile="${antivirus_pidfile}" +command_args="-p local:${antivirus_socket} ${antivirus_flags}" + +run_rc_command "$1" + +# eof diff --git a/mail/antivirus-milter/pkg-plist b/mail/antivirus-milter/pkg-plist index 40508fc77367..1ad34393c48e 100644 --- a/mail/antivirus-milter/pkg-plist +++ b/mail/antivirus-milter/pkg-plist @@ -1,5 +1,4 @@ libexec/antivirus etc/antivirus.conf-dist -etc/rc.d/antivirus-milter.sh.sample @exec mkdir -p %%ANTIVIRUS%%/spool %%ANTIVIRUS%%/run %%ANTIVIRUS%%/run/quarantine @exec chown -R nobody:nobody %%ANTIVIRUS%%/ diff --git a/mail/noattach/Makefile b/mail/noattach/Makefile index c40667b5c231..669a7e31a4f5 100644 --- a/mail/noattach/Makefile +++ b/mail/noattach/Makefile @@ -7,14 +7,17 @@ PORTNAME= noattach PORTVERSION= 1.2 +PORTREVISION= 1 CATEGORIES= mail MASTER_SITES= ftp://ftp.rhnet.is/pub/noattach/ MAINTAINER= dinoex@FreeBSD.org COMMENT= An attachment filter for Sendmail Milter -CFLAGS+= ${PTHREAD_CFLAGS:S=""==} GNU_CONFIGURE= yes +USE_RC_SUBR= noattach.sh + +CFLAGS+= ${PTHREAD_CFLAGS:S=""==} MAN8= noattach.8 DOCSFILES= AUTHORS THANKS INSTALL NEWS README TODO ChangeLog SAMPLEFILES= README noattach.patterns noattach.patterns.johncon @@ -32,15 +35,11 @@ MAKE_ENV+= MILTER_INCLUDES="${MILTERINC}" .endif pre-configure: - @${SED} -e "s=%%PREFIX%%=${PREFIX}=" ${FILESDIR}/noattach.sh \ - > ${WRKSRC}/noattach.sh ${REINPLACE_CMD} -e 's=-pthread=${PTHREAD_LIBS}=' \ ${WRKSRC}/configure do-install: ${INSTALL_PROGRAM} ${WRKSRC}/noattach ${PREFIX}/libexec/noattach - ${INSTALL_SCRIPT} ${WRKSRC}/noattach.sh \ - ${PREFIX}/etc/rc.d/noattach.sh.sample ${INSTALL_DATA} ${WRKSRC}/examples/noattach.patterns \ ${PREFIX}/etc/noattach.patterns-dist ${INSTALL_MAN} ${WRKSRC}/noattach.8 ${PREFIX}/man/man8/ diff --git a/mail/noattach/files/noattach.sh b/mail/noattach/files/noattach.sh deleted file mode 100644 index 0e1e57103b49..000000000000 --- a/mail/noattach/files/noattach.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# -if ! test -x %%PREFIX%%/libexec/noattach -then - exit 0 -fi -case "$1" in -start) - rm -f /var/run/noattach.pid /var/run/noattach - %%PREFIX%%/libexec/noattach -p local:/var/run/noattach && - echo -n ' noattach' - ;; -stop) - if test -r /var/run/noattach.pid - then - kill `head -1 /var/run/noattach.pid` - else - echo " noattach: not running" 2>&1 - fi - rm -f /var/run/noattach.pid - ;; -reload) - if test -r /var/run/noattach.pid - then - kill -USR1 `head -1 /var/run/noattach.pid` - else - echo " noattach: not running" 2>&1 - fi - ;; -*) - echo "Usage: ${0##*/}: { start | stop | reload }" >&2 - exit 64 - ;; -esac diff --git a/mail/noattach/files/noattach.sh.in b/mail/noattach/files/noattach.sh.in new file mode 100644 index 000000000000..5bccc1f557b7 --- /dev/null +++ b/mail/noattach/files/noattach.sh.in @@ -0,0 +1,56 @@ +#!/bin/sh + +# $FreeBSD$ + +# Start or stop noattach + +# PROVIDE: noattach +# REQUIRE: DAEMON +# BEFORE: mail +# KEYWORD: shutdown +# + +prefix=%%PREFIX%% + +# Define these noattach_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# /etc/rc.conf.d/noattach +# +# DO NOT CHANGE THESE DEFAULT VALUES HERE +# +noattach_enable=${noattach_enable:-"NO"} # Enable noattach +noattach_pidfile=${noattach_pidfile:-"/var/run/noattach.pid"} # Path to pidfile +noattach_socket=${noattach_socket:-"/var/run/noattach"} # Path to socket +noattach_flags=${noattach_flags:-""} # Flags to noattach + +. /etc/rc.subr + +name="noattach" +rcvar=`set_rcvar` +command="${prefix}/libexec/${name}" +required_files="${prefix}/etc/noattach.patterns" +start_precmd="noattach_prestart" +stop_postcmd="noattach_poststop" +reload_cmd="noattach_reload" +extra_commands="reload" + +noattach_prestart() { + /bin/rm -f "${pidfile}" "${noattach_socket}" +} + +noattach_poststop() { + /bin/rm -f "${pidfile}" "${noattach_socket}" +} + +noattach_reload() { + kill -USR1 `head -1 "${pidfile}"` +} + +load_rc_config $name +pidfile="${noattach_pidfile}" +command_args="-p local:${noattach_socket} ${noattach_flags}" + +run_rc_command "$1" + +# eof diff --git a/mail/noattach/pkg-plist b/mail/noattach/pkg-plist index 20ad03d18dae..105eea249351 100644 --- a/mail/noattach/pkg-plist +++ b/mail/noattach/pkg-plist @@ -1,5 +1,4 @@ libexec/noattach -etc/rc.d/noattach.sh.sample etc/noattach.patterns-dist %%PORTDOCS%%%%DOCSDIR%%/AUTHORS %%PORTDOCS%%%%DOCSDIR%%/INSTALL diff --git a/mail/spamilter/Makefile b/mail/spamilter/Makefile index 9f935120bd81..42b9df582fb9 100644 --- a/mail/spamilter/Makefile +++ b/mail/spamilter/Makefile @@ -7,6 +7,7 @@ PORTNAME= spamilter PORTVERSION= 0.60 +PORTREVISION= 1 CATEGORIES= mail MASTER_SITES= http://www.wanlink.com/spamilter/download/ MASTER_SITE_SUBDIR= dinoex @@ -15,8 +16,10 @@ EXTRACT_SUFX= .tgz MAINTAINER= dinoex@FreeBSD.org COMMENT= A Sendmail LibMilter filter to block spam -WRKSRC= ${WRKDIR}/${PORTNAME} HAS_CONFIGURE= yes +USE_RC_SUBR= spamilter.sh + +WRKSRC= ${WRKDIR}/${PORTNAME} CFLAGS+= ${PTHREAD_CFLAGS:S=""==} LDFLAGS+= ${PTHREAD_LIBS} MAKE_ENV+= __MAKE_CONF=/dev/null @@ -50,14 +53,11 @@ CONFIGURE_ARGS+= --have-resn PLIST_FILES+= bin/dnsblchk bin/dnsblupd bin/ipfwmtad bin/mxlookup \ bin/spamilter \ - bin/spamilter-system-report bin/spamilter-user-report \ - etc/rc.d/milter-spamilter.sh.sample + bin/spamilter-system-report bin/spamilter-user-report PORTDOCS= Changelog INSTALL LICENSE docs.html docs.txt db.rcpt \ db.rdnsbl db.sndr policy.html spamilter.rc pre-configure: - @${SED} -e "s=%%PREFIX%%=${PREFIX}=" ${FILESDIR}/spamilter.sh \ - > ${WRKSRC}/spamilter.sh ${REINPLACE_CMD} \ -e "s=/etc/spamilter.rc=${PREFIX}/etc/spamilter.rc=" \ ${WRKSRC}/spamilter.c \ @@ -69,8 +69,6 @@ xpost-configure: ${WRKSRC}/Makefile post-install: - ${INSTALL_SCRIPT} ${WRKSRC}/spamilter.sh \ - ${PREFIX}/etc/rc.d/milter-spamilter.sh.sample .for i in ${BINFILES} ${INSTALL_SCRIPT} ${WRKSRC}/${i} ${PREFIX}/bin/ .endfor diff --git a/mail/spamilter/files/spamilter.sh b/mail/spamilter/files/spamilter.sh deleted file mode 100644 index db0c3f1df62e..000000000000 --- a/mail/spamilter/files/spamilter.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# -if ! test -x %%PREFIX%%/bin/spamilter -then - exit 0 -fi -case "$1" in -start) - rm -f /tmp/Spamilter.pid - %%PREFIX%%/bin/spamilter && - echo -n ' spamilter' - ;; -stop) - if test -r /tmp/Spamilter.pid - then - kill `head -1 /tmp/Spamilter.pid` - else - echo " spamilter: not running" 2>&1 - fi - rm -f /tmp/Spamilter.pid - ;; -reload) - if test -r /tmp/Spamilter.pid - then - kill -USR1 `head -1 /tmp/Spamilter.pid` - else - echo " spamilter: not running" 2>&1 - fi - ;; -*) - echo "Usage: ${0##*/}: { start | stop | reload }" >&2 - exit 64 - ;; -esac diff --git a/mail/spamilter/files/spamilter.sh.in b/mail/spamilter/files/spamilter.sh.in new file mode 100644 index 000000000000..d1247ce5ea33 --- /dev/null +++ b/mail/spamilter/files/spamilter.sh.in @@ -0,0 +1,49 @@ +#!/bin/sh + +# $FreeBSD$ + +# Start or stop spamilter + +# PROVIDE: spamilter +# REQUIRE: DAEMON +# BEFORE: mail +# KEYWORD: shutdown +# + +prefix=%%PREFIX%% + +# Define these spamilter_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# /etc/rc.conf.d/spamilter +# +# DO NOT CHANGE THESE DEFAULT VALUES HERE +# +spamilter_enable=${spamilter_enable:-"NO"} # Enable spamilter-milter +spamilter_flags=${spamilter_flags:-""} # Flags to spamilter + +. /etc/rc.subr + +name="spamilter" +rcvar=`set_rcvar` +command="${prefix}/bin/spamilter" +pidfile="/tmp/Spamilter.pid" +required_files="${prefix}/etc/spamilter.rc" +start_precmd="spamilter_prestart" +stop_postcmd="spamilter_poststop" + +spamilter_prestart() { + /bin/rm -f "${pidfile}" +} + +spamilter_poststop() { + /bin/rm -f "${pidfile}" +} + +load_rc_config $name + +command_args="${spamilter_flags}" + +run_rc_command "$1" + +# eof diff --git a/mail/vbsfilter/Makefile b/mail/vbsfilter/Makefile index c86990300aca..4fa08c7aab9d 100644 --- a/mail/vbsfilter/Makefile +++ b/mail/vbsfilter/Makefile @@ -7,6 +7,7 @@ PORTNAME= vbsfilter PORTVERSION= 1.15 +PORTREVISION= 1 CATEGORIES= mail MASTER_SITES= http://aeschi.ch.eu.org/milter/ DISTNAME= ${PORTNAME}-${PORTVERSION} @@ -16,8 +17,8 @@ EXTRACT_ONLY= # empty MAINTAINER= dinoex@FreeBSD.org COMMENT= A vbs-attachment filter for Sendmail Milter -SUB_FILES= vbsfilter.sh -PLIST_FILES= libexec/vbsfilter etc/rc.d/vbsfilter.sh.sample +USE_RC_SUBR= vbsfilter.sh +PLIST_FILES= libexec/vbsfilter CTARGETS+= vbsfilter-${PORTVERSION} LIBS+= ${PTHREAD_LIBS} @@ -48,7 +49,5 @@ do-build: ${CTARGETS} do-install: ${INSTALL_PROGRAM} ${WRKSRC}/vbsfilter-${PORTVERSION} \ ${PREFIX}/libexec/vbsfilter - ${INSTALL_SCRIPT} ${WRKDIR}/vbsfilter.sh \ - ${PREFIX}/etc/rc.d/vbsfilter.sh.sample .include <bsd.port.post.mk> diff --git a/mail/vbsfilter/files/vbsfilter.sh.in b/mail/vbsfilter/files/vbsfilter.sh.in index 58423464eb09..72c1685f342e 100644 --- a/mail/vbsfilter/files/vbsfilter.sh.in +++ b/mail/vbsfilter/files/vbsfilter.sh.in @@ -1,23 +1,49 @@ #!/bin/sh -# + # $FreeBSD$ -# -if ! test -x %%PREFIX%%/libexec/vbsfilter -then - exit 0 -fi -case "$1" in -start) - rm -f /var/run/vbsfilter - %%PREFIX%%/libexec/vbsfilter -p local:/var/run/vbsfilter && - echo -n ' vbsfilter' - ;; -stop) - killall vbsfilter - rm -f /var/run/vbsfilter - ;; -*) - echo "Usage: ${0##*/}: { start | stop }" >&2 - exit 64 - ;; -esac + +# Start or stop vbsfilter + +# PROVIDE: vbsfilter +# REQUIRE: DAEMON +# BEFORE: mail +# KEYWORD: shutdown +# + +prefix=%%PREFIX%% + +# Define these vbsfilter_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# /etc/rc.conf.d/vbsfilter +# +# DO NOT CHANGE THESE DEFAULT VALUES HERE +# +vbsfilter_enable=${vbsfilter_enable:-"NO"} # Enable vbsfilter-milter +vbsfilter_socket=${vbsfilter_socket:-"/var/run/vbsfilter"} # Path to socket +vbsfilter_flags=${vbsfilter_flags:-""} # Flags to vbsfilter + +. /etc/rc.subr + +name="vbsfilter" +rcvar=`set_rcvar` +command="${prefix}/libexec/vbsfilter" +procname="${command}" +start_precmd="vbsfilter_prestart" +stop_postcmd="vbsfilter_poststop" + +vbsfilter_prestart() { + /bin/rm -f "${vbsfilter_socket}" +} + +vbsfilter_poststop() { + /bin/rm -f "${vbsfilter_socket}" +} + +load_rc_config $name + +command_args="-p local:${vbsfilter_socket} ${vbsfilter_flags}" + +run_rc_command "$1" + +# eof |