aboutsummaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2014-12-04 15:09:49 +0000
committerSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2014-12-04 15:09:49 +0000
commit2f69f3c89e7f6520586b544f7b830bd03b959394 (patch)
tree86389ff9e26675ab6e7f81cca231678efc824977 /mail
parente5b6cca274b5367c41276da806f73b349e1a7468 (diff)
downloadports-2f69f3c89e7f6520586b544f7b830bd03b959394.tar.gz
ports-2f69f3c89e7f6520586b544f7b830bd03b959394.zip
Notes
Diffstat (limited to 'mail')
-rw-r--r--mail/tumgreyspf/Makefile27
-rw-r--r--mail/tumgreyspf/files/pkg-deinstall.in21
-rw-r--r--mail/tumgreyspf/files/pkg-install.in15
-rw-r--r--mail/tumgreyspf/pkg-plist9
4 files changed, 16 insertions, 56 deletions
diff --git a/mail/tumgreyspf/Makefile b/mail/tumgreyspf/Makefile
index a2b8f393d832..1d7f3fe8f5b9 100644
--- a/mail/tumgreyspf/Makefile
+++ b/mail/tumgreyspf/Makefile
@@ -3,6 +3,7 @@
PORTNAME= tumgreyspf
PORTVERSION= 1.38
+PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES= ftp://ftp.tummy.com/pub/tummy/tumgreyspf/ \
ftp://ftp.tummy.com/pub/tummy/tumgreyspf/old-releases/ \
@@ -20,15 +21,14 @@ OPTIONS_DEFINE= DOCS
NO_BUILD= yes
USES= python shebangfix
-PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
-PKGINSTALL= ${WRKDIR}/pkg-install
PKGMESSAGE= ${WRKSRC}/pkg-message
-PORTDOCS= *
-SUB_FILES= pkg-deinstall pkg-install pkg-message
-SUB_LIST= PYTHON_CMD=${PYTHON_CMD} \
- TUMGREYSPF_DIR=${TUMGREYSPF_DIR} \
+PLIST_SUB= TUMGREYSPF_DIR=${TUMGREYSPF_DIR} \
TUMGREYSPF_USER=${TUMGREYSPF_USER} \
TUMGREYSPF_GROUP=${TUMGREYSPF_GROUP}
+PORTDOCS= *
+SUB_FILES= pkg-message
+SUB_LIST= PYTHON_CMD=${PYTHON_CMD} \
+ TUMGREYSPF_USER=${TUMGREYSPF_USER}
SHEBANG_FILES= *
python_OLD_CMD= ${SETENV} python
@@ -63,18 +63,13 @@ do-install:
cd ${WRKSRC}/ && ${INSTALL_SCRIPT} tumgreyspf tumgreyspf-clean tumgreyspf-configtest tumgreyspf-stat ${STAGEDIR}${PREFIX}/bin/
cd ${WRKSRC}/ && ${INSTALL_SCRIPT} gentest ${STAGEDIR}${PREFIX}/bin/tumgreyspf-gentest
cd ${WRKSRC}/ && ${INSTALL_SCRIPT} tumgreyspfsupp.py ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/
- cd ${WRKSRC}/ && ${INSTALL_DATA} tumgreyspf.conf ${STAGEDIR}${PREFIX}/etc/tumgreyspf.conf.default
-.if !exists(${PREFIX}/etc/tumgreyspf.conf)
- ${INSTALL_DATA} ${WRKSRC}/tumgreyspf.conf ${STAGEDIR}${PREFIX}/etc/
-.endif
-
-post-install:
+ cd ${WRKSRC}/ && ${INSTALL_DATA} tumgreyspf.conf ${STAGEDIR}${PREFIX}/etc/tumgreyspf.conf.sample
${MKDIR} ${STAGEDIR}${DATADIR}/
- ${INSTALL_DATA} ${WRKSRC}/__default__.dist ${STAGEDIR}${DATADIR}/
+ ${INSTALL_DATA} ${WRKSRC}/__default__.dist ${STAGEDIR}${DATADIR}/__default__.sample
${MKDIR} ${STAGEDIR}${DOCSDIR}/
${INSTALL_DATA} ${WRKSRC}/README* ${STAGEDIR}${DOCSDIR}/
-.if !defined(PACKAGE_BUILDING)
- @${SETENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
-.endif
+ ${MKDIR} -m 755 -p ${STAGEDIR}${TUMGREYSPF_DIR}
+ ${MKDIR} -m 755 ${STAGEDIR}${TUMGREYSPF_DIR}/config
+ ${MKDIR} -m 700 ${STAGEDIR}${TUMGREYSPF_DIR}/data
.include <bsd.port.mk>
diff --git a/mail/tumgreyspf/files/pkg-deinstall.in b/mail/tumgreyspf/files/pkg-deinstall.in
deleted file mode 100644
index 87d734bdb2b6..000000000000
--- a/mail/tumgreyspf/files/pkg-deinstall.in
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-case "$2" in
- DEINSTALL)
- if cmp -s %%DATADIR%%/__default__.dist %%TUMGREYSPF_DIR%%/config/__default__; then
- rm %%TUMGREYSPF_DIR%%/config/__default__ 2>/dev/null
- fi
- rmdir %%TUMGREYSPF_DIR%%/config 2>/dev/null
- rmdir %%TUMGREYSPF_DIR%%/data 2>/dev/null
- rmdir %%TUMGREYSPF_DIR%% 2>/dev/null
- if [ -d %%TUMGREYSPF_DIR%% ]; then
- echo ""
- echo "If you are deinstalling completely tumgreyspf, run:"
- echo ""
- echo "# rm -rf %%TUMGREYSPF_DIR%%"
- echo ""
- fi
- ;;
- *)
- ;;
-esac
diff --git a/mail/tumgreyspf/files/pkg-install.in b/mail/tumgreyspf/files/pkg-install.in
deleted file mode 100644
index ceaf19883242..000000000000
--- a/mail/tumgreyspf/files/pkg-install.in
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-case "$2" in
- POST-INSTALL)
- echo "===> Create %%TUMGREYSPF_DIR%% directories"
- install -d -o %%TUMGREYSPF_USER%% -g %%TUMGREYSPF_GROUP%% -m 755 %%TUMGREYSPF_DIR%%
- install -d -o %%TUMGREYSPF_USER%% -g %%TUMGREYSPF_GROUP%% -m 700 %%TUMGREYSPF_DIR%%/data
- install -d -m 755 %%TUMGREYSPF_DIR%%/config
- if [ ! -f %%TUMGREYSPF_DIR%%/config/__default__ ]; then
- install %%DATADIR%%/__default__.dist %%TUMGREYSPF_DIR%%/config/__default__
- fi
- ;;
- *)
- ;;
-esac
diff --git a/mail/tumgreyspf/pkg-plist b/mail/tumgreyspf/pkg-plist
index 5d751ba0e292..0d7c0bdb1564 100644
--- a/mail/tumgreyspf/pkg-plist
+++ b/mail/tumgreyspf/pkg-plist
@@ -1,10 +1,11 @@
-@unexec if cmp -s %D/etc/tumgreyspf.conf.default %D/etc/tumgreyspf.conf; then rm -f %D/etc/tumgreyspf.conf; fi
-etc/tumgreyspf.conf.default
bin/tumgreyspf
bin/tumgreyspf-clean
bin/tumgreyspf-configtest
bin/tumgreyspf-gentest
bin/tumgreyspf-stat
+@sample etc/tumgreyspf.conf.sample
%%PYTHON_SITELIBDIR%%/tumgreyspfsupp.py
-%%DATADIR%%/__default__.dist
-@dirrm %%DATADIR%%
+@sample %%DATADIR%%/__default__.sample
+@dir(%%TUMGREYSPF_USER%%,%%TUMGREYSPF_GROUP%%,700) %%TUMGREYSPF_DIR%%/data
+@dir(,,755) %%TUMGREYSPF_DIR%%/config
+@dir(%%TUMGREYSPF_USER%%,%%TUMGREYSPF_GROUP%%,755) %%TUMGREYSPF_DIR%%