diff options
author | sunpoet <sunpoet@FreeBSD.org> | 2013-08-18 15:00:29 +0800 |
---|---|---|
committer | sunpoet <sunpoet@FreeBSD.org> | 2013-08-18 15:00:29 +0800 |
commit | e338261941c08bdfe6372be141f47f56fd292f0b (patch) | |
tree | fe837cbc07f3b3c13c0e185f1df542a2cde46572 /mail/tumgreyspf | |
parent | 341eec1794c258ef428974ad60c647b328b9f9ed (diff) | |
download | freebsd-ports-gnome-e338261941c08bdfe6372be141f47f56fd292f0b.tar.gz freebsd-ports-gnome-e338261941c08bdfe6372be141f47f56fd292f0b.tar.zst freebsd-ports-gnome-e338261941c08bdfe6372be141f47f56fd292f0b.zip |
- Update to 1.37
- Use REINPLACE_CMD instead of patch files
- Restrict USE_PYTHON to 2.x
- Convert to new options framework
- Cleanup Makefile header
- Cosmetic change
Changes: https://github.com/linsomniac/tumgreyspf/blob/master/WHATSNEW
Diffstat (limited to 'mail/tumgreyspf')
-rw-r--r-- | mail/tumgreyspf/Makefile | 72 | ||||
-rw-r--r-- | mail/tumgreyspf/distinfo | 4 | ||||
-rw-r--r-- | mail/tumgreyspf/files/patch-tumgreyspf | 10 | ||||
-rw-r--r-- | mail/tumgreyspf/files/patch-tumgreyspf-clean | 10 | ||||
-rw-r--r-- | mail/tumgreyspf/files/patch-tumgreyspf-stat | 10 | ||||
-rw-r--r-- | mail/tumgreyspf/files/patch-tumgreyspf.conf | 28 | ||||
-rw-r--r-- | mail/tumgreyspf/files/patch-tumgreyspfsupp.py | 23 |
7 files changed, 39 insertions, 118 deletions
diff --git a/mail/tumgreyspf/Makefile b/mail/tumgreyspf/Makefile index b45f5cdef3e0..bcffd9155277 100644 --- a/mail/tumgreyspf/Makefile +++ b/mail/tumgreyspf/Makefile @@ -1,12 +1,8 @@ -# New ports collection makefile for: tumgreyspf -# Date created: 31 Aug 2005 -# Whom: Marcus Alves Grando <mnag@FreeBSD.org> -# +# Created by: Marcus Alves Grando <mnag@FreeBSD.org> # $FreeBSD$ -# PORTNAME= tumgreyspf -PORTVERSION= 1.36 +PORTVERSION= 1.37 CATEGORIES= mail MASTER_SITES= ftp://ftp.tummy.com/pub/tummy/tumgreyspf/ \ ftp://ftp.tummy.com/pub/tummy/tumgreyspf/old-releases/ \ @@ -17,59 +13,65 @@ COMMENT= External policy checker for the postfix mail server RUN_DEPENDS= ${PYTHON_SITELIBDIR}/spf.py:${PORTSDIR}/mail/py-spf -USE_PYTHON= yes -NO_BUILD= yes +OPTIONS_DEFINE= DOCS -TUMGREYSPF_DIR?= /var/db/${PORTNAME} -TUMGREYSPF_USER?= nobody -TUMGREYSPF_GROUP?= nobody +NO_BUILD= yes +USE_PYTHON= -2.7 -PKGMESSAGE= ${WRKSRC}/pkg-message PKGDEINSTALL= ${WRKDIR}/pkg-deinstall PKGINSTALL= ${WRKDIR}/pkg-install - -SUB_FILES= pkg-message pkg-deinstall pkg-install -SUB_LIST= TUMGREYSPF_DIR=${TUMGREYSPF_DIR} \ +PKGMESSAGE= ${WRKSRC}/pkg-message +PORTDOCS= * +SUB_FILES= pkg-deinstall pkg-install pkg-message +SUB_LIST= PYTHON_CMD=${PYTHON_CMD} \ + TUMGREYSPF_DIR=${TUMGREYSPF_DIR} \ TUMGREYSPF_USER=${TUMGREYSPF_USER} \ - TUMGREYSPF_GROUP=${TUMGREYSPF_GROUP} \ - PYTHON_CMD=${PYTHON_CMD} + TUMGREYSPF_GROUP=${TUMGREYSPF_GROUP} -PORTDOCS= * +TUMGREYSPF_DIR?= /var/db/${PORTNAME} +TUMGREYSPF_USER?= nobody +TUMGREYSPF_GROUP?= nobody + +.include <bsd.port.options.mk> pre-everything:: @${ECHO_MSG} @${ECHO_MSG} "You may set following options:" @${ECHO_MSG} - @${ECHO_MSG} "TUMGREYSPF_DIR=/var/db/${PORTNAME} Local are used to greylist" + @${ECHO_MSG} "TUMGREYSPF_DIR=/var/db/${PORTNAME} Local are used to greylist (Default: /var/db/${PORTNAME})" @${ECHO_MSG} "TUMGREYSPF_USER=nobody User to run ${PORTNAME} (Default: nobody)" @${ECHO_MSG} "TUMGREYSPF_GROUP=nobody Group to run ${PORTNAME} (Default: nobody)" @${ECHO_MSG} post-patch: - @${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" -e "s|%%TUMGREYSPF_DIR%%|${TUMGREYSPF_DIR}|g" \ - -e "s|%%LOCALBASE%%|${LOCALBASE}|g" ${WRKSRC}/tumgreyspfsupp.py \ - ${WRKSRC}/tumgreyspf.conf + @${REINPLACE_CMD} -e '/\/usr\/local\/lib\/tumgreyspf/d' \ + ${WRKSRC}/tumgreyspf ${WRKSRC}/tumgreyspf-clean ${WRKSRC}/tumgreyspf-stat + @${REINPLACE_CMD} -e '/configPath/ s|/var/local/lib/tumgreyspf|${TUMGREYSPF_DIR}|' \ + -e '/greylistDir/ s|/var/local/lib/tumgreyspf|${TUMGREYSPF_DIR}|' \ + -e '/spfqueryPath/ s|/usr/local/lib/tumgreyspf|${PREFIX}/bin|' \ + -e '/blackholeDir/ s|/var/lib/tumgreyspf|${TUMGREYSPF_DIR}|' \ + -e '/blackholeDir/ s|/var/local/lib/tumgreyspf|${TUMGREYSPF_DIR}|' \ + -e '/defaultConfigFilename/ s|/var/local/lib/tumgreyspf/config|${PREFIX}/etc|' \ + ${WRKSRC}/tumgreyspf.conf ${WRKSRC}/tumgreyspfsupp.py @${GREP} -r "env python" ${WRKSRC} | ${CUT} -d: -f1 | \ ${XARGS} ${REINPLACE_CMD} -e "s|env python|env ${PYTHON_CMD}|" do-install: - ${INSTALL_SCRIPT} ${WRKSRC}/tumgreyspfsupp.py ${PYTHONPREFIX_SITELIBDIR} - ${INSTALL_SCRIPT} ${WRKSRC}/tumgreyspf ${PREFIX}/bin - ${INSTALL_SCRIPT} ${WRKSRC}/tumgreyspf-clean ${PREFIX}/bin - ${INSTALL_SCRIPT} ${WRKSRC}/tumgreyspf-configtest ${PREFIX}/bin - ${INSTALL_SCRIPT} ${WRKSRC}/gentest ${PREFIX}/bin/tumgreyspf-gentest - ${INSTALL_SCRIPT} ${WRKSRC}/tumgreyspf-stat ${PREFIX}/bin - ${INSTALL_DATA} ${WRKSRC}/tumgreyspf.conf ${PREFIX}/etc/tumgreyspf.conf.default + cd ${WRKSRC}/ && \ + ${INSTALL_SCRIPT} tumgreyspf tumgreyspf-clean tumgreyspf-configtest tumgreyspf-stat ${PREFIX}/bin/ && \ + ${INSTALL_SCRIPT} gentest ${PREFIX}/bin/tumgreyspf-gentest && \ + ${INSTALL_SCRIPT} tumgreyspfsupp.py ${PYTHONPREFIX_SITELIBDIR}/ && \ + ${INSTALL_DATA} tumgreyspf.conf ${PREFIX}/etc/tumgreyspf.conf.default .if !exists(${PREFIX}/etc/tumgreyspf.conf) - ${INSTALL_DATA} ${WRKSRC}/tumgreyspf.conf ${PREFIX}/etc + ${INSTALL_DATA} ${WRKSRC}/tumgreyspf.conf ${PREFIX}/etc/ .endif post-install: - @${MKDIR} ${DATADIR} - ${INSTALL_DATA} ${WRKSRC}/__default__.dist ${DATADIR} -.if !defined(NOPORTDOCS) - @${MKDIR} ${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/README* ${DOCSDIR} + ${MKDIR} ${DATADIR}/ + ${INSTALL_DATA} ${WRKSRC}/__default__.dist ${DATADIR}/ +.if ${PORT_OPTIONS:MDOCS} + ${MKDIR} ${DOCSDIR}/ + ${INSTALL_DATA} ${WRKSRC}/README* ${DOCSDIR}/ .endif @${CAT} ${PKGMESSAGE} .if !defined(PACKAGE_BUILDING) diff --git a/mail/tumgreyspf/distinfo b/mail/tumgreyspf/distinfo index 515549741ce9..7a98aef4d6d2 100644 --- a/mail/tumgreyspf/distinfo +++ b/mail/tumgreyspf/distinfo @@ -1,2 +1,2 @@ -SHA256 (tumgreyspf-1.36.tar.gz) = 3f8539bb9c5b828d5c59b94b8bcda3b5700742c1ffc9314d456cfbc1cc26ac17 -SIZE (tumgreyspf-1.36.tar.gz) = 29244 +SHA256 (tumgreyspf-1.37.tar.gz) = 33ac82c827db10e5a1fe1fac4dad18623df7b7c7415e270a896146989bcf96a4 +SIZE (tumgreyspf-1.37.tar.gz) = 30523 diff --git a/mail/tumgreyspf/files/patch-tumgreyspf b/mail/tumgreyspf/files/patch-tumgreyspf deleted file mode 100644 index c630f6509795..000000000000 --- a/mail/tumgreyspf/files/patch-tumgreyspf +++ /dev/null @@ -1,10 +0,0 @@ ---- tumgreyspf.orig 2007-11-29 20:58:31.000000000 -0200 -+++ tumgreyspf 2008-04-13 14:18:04.000000000 -0300 -@@ -12,7 +12,6 @@ - - import syslog, os, sys, string, re, time, popen2, urllib, stat, errno, socket - import spf --sys.path.append('/usr/local/lib/tumgreyspf') - import tumgreyspfsupp - - syslog.openlog(os.path.basename(sys.argv[0]), syslog.LOG_PID, syslog.LOG_MAIL) diff --git a/mail/tumgreyspf/files/patch-tumgreyspf-clean b/mail/tumgreyspf/files/patch-tumgreyspf-clean deleted file mode 100644 index b7b6b408ad4f..000000000000 --- a/mail/tumgreyspf/files/patch-tumgreyspf-clean +++ /dev/null @@ -1,10 +0,0 @@ ---- tumgreyspf-clean.orig Wed Aug 31 21:43:32 2005 -+++ tumgreyspf-clean Wed Aug 31 21:43:48 2005 -@@ -8,7 +8,6 @@ - # <jafo@tummy.com> - - import os, re, string, syslog, sys, time --sys.path.append('/usr/local/lib/tumgreyspf') - import tumgreyspfsupp - - ################### diff --git a/mail/tumgreyspf/files/patch-tumgreyspf-stat b/mail/tumgreyspf/files/patch-tumgreyspf-stat deleted file mode 100644 index 8b0eea9cbc58..000000000000 --- a/mail/tumgreyspf/files/patch-tumgreyspf-stat +++ /dev/null @@ -1,10 +0,0 @@ ---- tumgreyspf-stat.orig Wed Aug 31 21:44:32 2005 -+++ tumgreyspf-stat Wed Aug 31 21:44:42 2005 -@@ -7,7 +7,6 @@ - # <jafo@tummy.com> - - import os, re, string, syslog, sys, time --sys.path.append('/usr/local/lib/tumgreyspf') - import tumgreyspfsupp - - ################### diff --git a/mail/tumgreyspf/files/patch-tumgreyspf.conf b/mail/tumgreyspf/files/patch-tumgreyspf.conf deleted file mode 100644 index a99ff8ce1f18..000000000000 --- a/mail/tumgreyspf/files/patch-tumgreyspf.conf +++ /dev/null @@ -1,28 +0,0 @@ ---- tumgreyspf.conf.orig Tue Aug 29 21:02:05 2006 -+++ tumgreyspf.conf Sat Sep 9 23:06:26 2006 -@@ -15,21 +15,21 @@ - # Path to the directory-based configuration. This can be used to override - # the configuration values for certain remote hosts, senders or - # recipients. --configPath = 'file:///var/local/lib/tumgreyspf/config' -+configPath = 'file://%%TUMGREYSPF_DIR%%/config' - - # Directory where the greylist resides. --greylistDir = '/var/local/lib/tumgreyspf/data' -+greylistDir = '%%TUMGREYSPF_DIR%%/data' - - # Path to the program used for SPF checking. This can either be the - # perl version available from http://www.openspf.com/ or the - # "spfquery-static" program built from libspf2, also available from - # http://www.openspf.com/ --spfqueryPath = '/usr/local/lib/tumgreyspf/spfquery' -+spfqueryPath = '%%PREFIX%%/bin/spfquery' - - # Directory where the blackhole information goes. "ips" sub-directory - # contains IPs that have touched us with a bad address. "addresses" - # sub-directory has a file per address named after the bad addresses. --blackholeDir = '/var/lib/tumgreyspf/blackhole' -+blackholeDir = '%%TUMGREYSPF_DIR%%/blackhole' - - # If set to 1, the last byte of the sender's IP address will be ignored. - # So, if mail from 1.2.3.4 was delayed, then redelivered by 1.2.3.58, diff --git a/mail/tumgreyspf/files/patch-tumgreyspfsupp.py b/mail/tumgreyspf/files/patch-tumgreyspfsupp.py deleted file mode 100644 index c8f77bf4f162..000000000000 --- a/mail/tumgreyspf/files/patch-tumgreyspfsupp.py +++ /dev/null @@ -1,23 +0,0 @@ ---- tumgreyspfsupp.py.orig Tue May 30 07:24:11 2006 -+++ tumgreyspfsupp.py Tue Jun 13 22:00:23 2006 -@@ -9,15 +9,15 @@ - - - # default values --defaultConfigFilename = '/var/local/lib/tumgreyspf/config/tumgreyspf.conf' -+defaultConfigFilename = '%%PREFIX%%/etc/tumgreyspf.conf' - defaultConfigData = { - 'debugLevel' : 0, - 'defaultSeedOnly' : 0, - 'defaultAllowTime' : 600, -- 'configPath' : 'file:///var/local/lib/tumgreyspf/config', -- 'greylistDir' : '/var/local/lib/tumgreyspf/data', -- 'blackholeDir' : '/var/local/lib/tumgreyspf/blackhole', -- 'spfqueryPath' : '/usr/local/lib/tumgreyspf/spfquery', -+ 'configPath' : 'file://%%TUMGREYSPF_DIR%%/config', -+ 'greylistDir' : '%%TUMGREYSPF_DIR%%/data', -+ 'blackholeDir' : '%%TUMGREYSPF_DIR%%/blackhole', -+ 'spfqueryPath' : '%%LOCALBASE%%/bin/spfquery', - 'ignoreLastByte' : 0, - } - |