aboutsummaryrefslogtreecommitdiff
path: root/mail/postfix-policyd-spf-python
diff options
context:
space:
mode:
authorPawel Pekala <pawel@FreeBSD.org>2014-02-01 13:20:58 +0000
committerPawel Pekala <pawel@FreeBSD.org>2014-02-01 13:20:58 +0000
commit4a2bdda67628e0bc2d4068d160c74eda368246c3 (patch)
tree931c5597f8da0a7dd2b10a59092ce3f4337c32e6 /mail/postfix-policyd-spf-python
parent8e0c7690ff3c53b1d372cfba6038172c3a5ba8ae (diff)
downloadports-4a2bdda67628e0bc2d4068d160c74eda368246c3.tar.gz
ports-4a2bdda67628e0bc2d4068d160c74eda368246c3.zip
Notes
Diffstat (limited to 'mail/postfix-policyd-spf-python')
-rw-r--r--mail/postfix-policyd-spf-python/Makefile28
-rw-r--r--mail/postfix-policyd-spf-python/files/patch-setup.py17
-rw-r--r--mail/postfix-policyd-spf-python/pkg-plist3
3 files changed, 23 insertions, 25 deletions
diff --git a/mail/postfix-policyd-spf-python/Makefile b/mail/postfix-policyd-spf-python/Makefile
index 6c90ccdc945d..967fcb5807dc 100644
--- a/mail/postfix-policyd-spf-python/Makefile
+++ b/mail/postfix-policyd-spf-python/Makefile
@@ -21,10 +21,6 @@ USE_PYTHON= yes
USE_PYDISTUTILS= yes
PYDISTUTILS_PKGNAME= pypolicyd-spf
-MAN1= policyd-spf.1
-MAN5= policyd-spf.conf.5 \
- policyd-spf.peruser.5
-
PORTDOCS= CHANGES \
COPYING \
README \
@@ -39,11 +35,10 @@ SUB_LIST= PYTHON_CMD=${PYTHON_CMD}
OPTIONS_DEFINE= DOCS
OPTIONSFILE= ${PORT_DBDIR}/py-${PORTNAME}/options
-NO_STAGE= yes
.include <bsd.port.options.mk>
post-patch:
- @${REINPLACE_CMD} -e '\/etc/s|/etc|etc|' ${WRKSRC}/setup.py
+ @${MV} ${WRKSRC}/policyd-spf.conf ${WRKSRC}/policyd-spf.conf.sample
@${REINPLACE_CMD} -e "s|/etc/python-policyd-spf/|${PREFIX}/etc/postfix-policyd-spf-python/|" \
${WRKSRC}/policyd-spf
@${REINPLACE_CMD} -e "s|/etc/policyd-spf/|${PREFIX}/etc/postfix-policyd-spf-python/|" \
@@ -55,25 +50,8 @@ post-patch:
-e "s|/etc/pypolicyd-spf/|${PREFIX}/etc/postfix-policyd-spf-python/|" \
${WRKSRC}/policyd-spf.peruser.5
-do-install:
- @# Install data to an unused directory to ensure it doesn't pollute the system
- @(cd ${INSTALL_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} \
- ${PYDISTUTILS_INSTALL_TARGET} ${PYDISTUTILS_INSTALLARGS} \
- --install-data ${WRKDIR}/tmp-datadump-dir)
- ${INSTALL_MAN} ${WRKSRC}/policyd-spf.1 ${MANPREFIX}/man/man1
- ${INSTALL_MAN} ${WRKSRC}/policyd-spf.conf.5 ${MANPREFIX}/man/man5
- ${INSTALL_MAN} ${WRKSRC}/policyd-spf.peruser.5 ${MANPREFIX}/man/man5
- @${INSTALL} -d ${ETCDIR}/
- ${INSTALL_DATA} ${WRKSRC}/policyd-spf.conf ${ETCDIR}/policyd-spf.conf.sample
-.if ${PORT_OPTIONS:MDOCS}
- @${INSTALL} -d ${DOCSDIR}/
- cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}/
-.endif
-
post-install:
-.if !exists(${ETCDIR}/policyd-spf.conf)
- ${CP} -p ${ETCDIR}/policyd-spf.conf.sample ${ETCDIR}/policyd-spf.conf
-.endif
- @${CAT} ${PKGMESSAGE}
+ @${INSTALL} -d ${STAGEDIR}/${DOCSDIR}
+ cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>
diff --git a/mail/postfix-policyd-spf-python/files/patch-setup.py b/mail/postfix-policyd-spf-python/files/patch-setup.py
new file mode 100644
index 000000000000..5fb3736362dc
--- /dev/null
+++ b/mail/postfix-policyd-spf-python/files/patch-setup.py
@@ -0,0 +1,17 @@
+--- setup.py.orig 2013-05-14 12:57:04.000000000 +0900
++++ setup.py 2014-01-14 10:15:11.000000000 +0900
+@@ -13,10 +13,10 @@
+ py_modules=['policydspfsupp', 'policydspfuser'],
+ keywords = ['Postfix','spf','email'],
+ scripts = ['policyd-spf'],
+- data_files=[(os.path.join('share', 'man', 'man1'),
+- ['policyd-spf.1']), (os.path.join('share', 'man', 'man5'),
+- ['policyd-spf.conf.5']), (os.path.join('/etc', 'python-policyd-spf'),
+- ['policyd-spf.conf']), (os.path.join('share', 'man', 'man5'),
++ data_files=[(os.path.join('man', 'man1'),
++ ['policyd-spf.1']), (os.path.join('man', 'man5'),
++ ['policyd-spf.conf.5']), (os.path.join('etc', 'postfix-policyd-spf-python'),
++ ['policyd-spf.conf.sample']), (os.path.join('man', 'man5'),
+ ['policyd-spf.peruser.5'])],
+ classifiers = [
+ 'Development Status :: 5 - Production/Stable',
diff --git a/mail/postfix-policyd-spf-python/pkg-plist b/mail/postfix-policyd-spf-python/pkg-plist
index 42ce67c9234f..d6f2cd881cb1 100644
--- a/mail/postfix-policyd-spf-python/pkg-plist
+++ b/mail/postfix-policyd-spf-python/pkg-plist
@@ -2,6 +2,9 @@
%%ETCDIR%%/policyd-spf.conf.sample
@exec if [ ! -f %D/%%ETCDIR%%/policyd-spf.conf ] ; then cp -p %D/%F %B/policyd-spf.conf; fi
bin/policyd-spf
+man/man1/policyd-spf.1.gz
+man/man5/policyd-spf.conf.5.gz
+man/man5/policyd-spf.peruser.5.gz
%%PYTHON_SITELIBDIR%%/policydspfsupp.py
%%PYTHON_SITELIBDIR%%/policydspfsupp.pyo
%%PYTHON_SITELIBDIR%%/policydspfsupp.pyc