diff options
author | ohauer <ohauer@FreeBSD.org> | 2012-06-07 20:05:48 +0800 |
---|---|---|
committer | ohauer <ohauer@FreeBSD.org> | 2012-06-07 20:05:48 +0800 |
commit | 1ec2f3004374295c26100f6b28c805002cfb6da5 (patch) | |
tree | 55f9e8e4debecb586c7fc282f17d340a1e1ccdf8 /mail/postfix-policyd-weight | |
parent | b9b139e8325c08d184afdcb59b4ceba8f674fd55 (diff) | |
download | freebsd-ports-gnome-1ec2f3004374295c26100f6b28c805002cfb6da5.tar.gz freebsd-ports-gnome-1ec2f3004374295c26100f6b28c805002cfb6da5.tar.zst freebsd-ports-gnome-1ec2f3004374295c26100f6b28c805002cfb6da5.zip |
- remove dead rbl sites (SFNET bug ID: 2765629, 3400804)
- fix dependency
- remove SITE_PERL from *_DEPENDS
- use ports framework to create polw user/group
- take maintainer (agreed by old maintainer/author via PM)
PR: ports/167213
Submitted by: ohauer
Approved by: old maintainer
Diffstat (limited to 'mail/postfix-policyd-weight')
-rw-r--r-- | mail/postfix-policyd-weight/Makefile | 30 | ||||
-rw-r--r-- | mail/postfix-policyd-weight/files/pkg-message.in | 21 | ||||
-rw-r--r-- | mail/postfix-policyd-weight/pkg-deinstall | 16 | ||||
-rw-r--r-- | mail/postfix-policyd-weight/pkg-install | 34 |
4 files changed, 24 insertions, 77 deletions
diff --git a/mail/postfix-policyd-weight/Makefile b/mail/postfix-policyd-weight/Makefile index 56351fa6d2d3..111fb4fd60fd 100644 --- a/mail/postfix-policyd-weight/Makefile +++ b/mail/postfix-policyd-weight/Makefile @@ -7,18 +7,24 @@ PORTNAME= policyd-weight PORTVERSION= 0.1.15.1 +PORTREVISION= 1 CATEGORIES= mail -MASTER_SITES= http://www.policyd-weight.org/releases/ +MASTER_SITES= http://www.policyd-weight.org/releases/ \ + LOCAL/ohauer PKGNAMEPREFIX= postfix- -MAINTAINER= robtone@ek-muc.de +MAINTAINER= ohauer@FreeBSD.org COMMENT= Weighted policy daemon for postfix -RUN_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/Net/DNS.pm:${PORTSDIR}/dns/p5-Net-DNS +RUN_DEPENDS= p5-Net-DNS>0:${PORTSDIR}/dns/p5-Net-DNS \ + p5-Net-IP>0:${PORTSDIR}/net-mgmt/p5-Net-IP SUB_FILES= pkg-message PLIST_FILES= bin/${PORTNAME} etc/${PORTNAME}.conf.sample +USERS= polw +GROUPS= polw + USE_RC_SUBR+= policyd-weight USE_PERL5= yes NO_BUILD= yes @@ -28,18 +34,18 @@ MAN5+= policyd-weight.conf.5 .include <bsd.port.pre.mk> +post-patch: +# really remove dead lists +# SFNET bug ID: 2765629, 3400804 + @${REINPLACE_CMD} -e '/DSBL_ORG/d' -e '/IPv6_RBL/d' -e '/IX_MANITU/ s/,$$//' \ + ${WRKSRC}/policyd-weight ${WRKSRC}/policyd-weight.conf.sample + do-install: ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin/ ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf.sample ${PREFIX}/etc/ -.for i in 5 8 - @${MKDIR} ${PREFIX}/man/man$i -. for j in ${MAN${i}} - ${INSTALL_MAN} ${WRKSRC}/man/man${i}/$j ${PREFIX}/man/man${i}/ -. endfor -.endfor - -pre-install: - @${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL + + ${INSTALL_MAN} ${WRKSRC}/man/man5/${MAN5} ${PREFIX}/man/man5/ + ${INSTALL_MAN} ${WRKSRC}/man/man8/${MAN8} ${PREFIX}/man/man8/ post-install: @${CAT} ${PKGMESSAGE} diff --git a/mail/postfix-policyd-weight/files/pkg-message.in b/mail/postfix-policyd-weight/files/pkg-message.in index c162ae44528b..0d597587cbe4 100644 --- a/mail/postfix-policyd-weight/files/pkg-message.in +++ b/mail/postfix-policyd-weight/files/pkg-message.in @@ -5,7 +5,7 @@ * To use this from Postfix SMTPD, use in %%PREFIX%%/etc/postfix/main.cf -smtpd_recipient_restrictions = +smtpd_recipient_restrictions = ... permit_mynetworks ... @@ -14,22 +14,13 @@ smtpd_recipient_restrictions = check_policy_service inet:127.0.0.1:12525 ... -* NOTE: specify check_policy_service AFTER reject_unauth_destination -* or else your system can become an open relay. +* NOTE: +* specify check_policy_service AFTER reject_unauth_destination +* else your system can become an open relay. * * CONFIGURATION: * -* edit %%PREFIX%%/etc/policyd-weight.conf -* An example is provided in %%PREFIX%%/etc/policyd-weight.conf.sample +* edit %%PREFIX%%/etc/policyd-weight.conf +* An example is provided in %%PREFIX%%/etc/policyd-weight.conf.sample * -* -* Notes: -* -* Since version 0.1.14 beta the master.cf mode is deprecated. Use the daemon -* mode instead. More info in man 8 policyd-weight. -* -* Since version 0.1.14.5 beta the policyd-weight executable is located in -* %%PREFIX%%/bin. Please remove older versions in %%PREFIX%%/libexec/postfix/ -* manually. -* ************* diff --git a/mail/postfix-policyd-weight/pkg-deinstall b/mail/postfix-policyd-weight/pkg-deinstall deleted file mode 100644 index 1ab6c165a063..000000000000 --- a/mail/postfix-policyd-weight/pkg-deinstall +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -if [ "$2" != "POST-DEINSTALL" ]; then - exit 0 -fi - -USER=polw - -if pw usershow "${USER}" 2>/dev/null 1>&2; then - echo "To delete user permanently, use 'pw userdel ${USER}'" -fi - -exit 0 diff --git a/mail/postfix-policyd-weight/pkg-install b/mail/postfix-policyd-weight/pkg-install deleted file mode 100644 index f624005c3aa5..000000000000 --- a/mail/postfix-policyd-weight/pkg-install +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -if [ "$2" != "PRE-INSTALL" ]; then - exit 0 -fi - -USER=polw -GROUP=${USER} - -if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then - if pw groupadd ${GROUP} ; then - echo "Added group \"${GROUP}\"." - else - echo "Adding group \"${GROUP}\" failed..." - exit 1 - fi -fi - -if ! pw usershow "${USER}" 2>/dev/null 1>&2; then - if pw useradd ${USER} -g ${GROUP} -h - \ - -s "/sbin/nologin" -d "/nonexistent" \ - -c "Policyd-weight Cache Owner"; \ - then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - exit 1 - fi -fi - -exit 0 |