aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoramdmi3 <amdmi3@FreeBSD.org>2015-10-01 02:31:32 +0800
committeramdmi3 <amdmi3@FreeBSD.org>2015-10-01 02:31:32 +0800
commit42bbdfe835f9d169926cec36a4ff44e0451bd9c6 (patch)
tree820f1143258a563b49fd845b97c2f6fa940fc5f8
parent8bf02628694f7757e010debfce3c056f029399d3 (diff)
downloadfreebsd-ports-gnome-42bbdfe835f9d169926cec36a4ff44e0451bd9c6.tar.gz
freebsd-ports-gnome-42bbdfe835f9d169926cec36a4ff44e0451bd9c6.tar.zst
freebsd-ports-gnome-42bbdfe835f9d169926cec36a4ff44e0451bd9c6.zip
- Convert pkg-install script to @dir
- Use options helpers - Remove unneeded @dir's from plist PR: 203045 Submitted by: amdmi3 Approved by: maintainer timeout (gabor, 2 weeks)
-rw-r--r--security/amavisd-new/Makefile24
-rw-r--r--security/amavisd-new/files/pkg-install.in23
-rw-r--r--security/amavisd-new/pkg-plist8
3 files changed, 21 insertions, 34 deletions
diff --git a/security/amavisd-new/Makefile b/security/amavisd-new/Makefile
index 39304abec1ec..8355807c4e22 100644
--- a/security/amavisd-new/Makefile
+++ b/security/amavisd-new/Makefile
@@ -74,7 +74,7 @@ P7ZIP_DESC= P7ZIP support with archivers/p7zip
MSWORD_DESC= Ms Word support with textproc/ripole
TNEF_DESC= Add external tnef decoder converters/tnef
-SUB_FILES= pkg-install pkg-deinstall pkg-message
+SUB_FILES= pkg-deinstall pkg-message
SUB_LIST+= AMAVISUSER=${AMAVISUSER} \
AMAVISGROUP=${AMAVISGROUP} \
@@ -83,7 +83,11 @@ SUB_LIST+= AMAVISUSER=${AMAVISUSER} \
DAEMON="${DAEMON}" \
PERL=${PERL}
-PLIST_SUB+= AMAVIS_NOP0F=${AMAVIS_NOP0F}
+PLIST_SUB+= AMAVISUSER=${AMAVISUSER} \
+ AMAVISGROUP=${AMAVISGROUP} \
+ AMAVISDIR=${AMAVISDIR} \
+ AMAVISQUARANTINE=${AMAVISQUARANTINE} \
+ AMAVIS_NOP0F=${AMAVIS_NOP0F}
.include <bsd.port.options.mk>
@@ -240,22 +244,26 @@ post-patch:
${WRKSRC}/amavisd
do-install:
-.if ${PORT_OPTIONS:MP0F}
- ${INSTALL_SCRIPT} ${WRKSRC}/p0f-analyzer.pl ${STAGEDIR}${PREFIX}/sbin
-.endif
.for i in amavisd amavisd-agent amavisd-nanny amavisd-release amavisd-snmp-subagent
${INSTALL_SCRIPT} ${WRKSRC}/${i} ${STAGEDIR}${PREFIX}/sbin
.endfor
${INSTALL_SCRIPT} ${WRKSRC}/amavisd.conf ${STAGEDIR}${PREFIX}/etc/amavisd.conf.sample
${INSTALL_SCRIPT} ${WRKSRC}/amavisd.conf-default ${STAGEDIR}${PREFIX}/etc/amavisd.conf-default
${INSTALL_SCRIPT} ${WRKSRC}/amavisd-custom.conf ${STAGEDIR}${PREFIX}/etc/amavisd-custom.conf.sample
-.if ${PORT_OPTIONS:MDOCS}
+ ${LN} -s ${PREFIX}/sbin/amavisd-release ${STAGEDIR}${PREFIX}/sbin/amavisd-requeue
+ ${MKDIR} ${STAGEDIR}${AMAVISDIR}/var
+ ${MKDIR} ${STAGEDIR}${AMAVISDIR}/tmp
+ ${MKDIR} ${STAGEDIR}${AMAVISDIR}/db
+ ${MKDIR} ${STAGEDIR}${AMAVISQUARANTINE}
+
+do-install-P0F-on:
+ ${INSTALL_SCRIPT} ${WRKSRC}/p0f-analyzer.pl ${STAGEDIR}${PREFIX}/sbin
+
+do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}/images
.for i in ${DOCS}
${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}
.endfor
@${CP} -pr ${WRKSRC}/README_FILES/images/ ${STAGEDIR}${DOCSDIR}/images
-.endif
- ${LN} -s ${PREFIX}/sbin/amavisd-release ${STAGEDIR}${PREFIX}/sbin/amavisd-requeue
.include <bsd.port.post.mk>
diff --git a/security/amavisd-new/files/pkg-install.in b/security/amavisd-new/files/pkg-install.in
deleted file mode 100644
index 994fd4c8fd03..000000000000
--- a/security/amavisd-new/files/pkg-install.in
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-#
-
-USER=%%AMAVISUSER%%
-GROUP=%%AMAVISGROUP%%
-DIR=%%AMAVISDIR%%
-QUARANTINE=%%AMAVISQUARANTINE%%
-
-if [ "$2" = "PRE-INSTALL" ]; then
-
- /usr/bin/install -o ${USER} -g ${GROUP} -m 750 -d ${DIR}
- echo "Created \"${DIR}\" directory."
- /usr/bin/install -o ${USER} -g ${GROUP} -m 750 -d ${DIR}/db
- echo "Created \"${DIR}/db\" directory."
- /usr/bin/install -o ${USER} -g ${GROUP} -m 750 -d ${DIR}/tmp
- echo "Created \"${DIR}/tmp\" directory."
- /usr/bin/install -o ${USER} -g ${GROUP} -m 750 -d ${DIR}/var
- echo "Created \"${DIR}/var\" directory."
- /usr/bin/install -o ${USER} -g ${GROUP} -m 750 -d ${QUARANTINE}
- echo "Created \"${QUARANTINE}\" directory."
-fi
diff --git a/security/amavisd-new/pkg-plist b/security/amavisd-new/pkg-plist
index a022847844cb..87ce6b80ff24 100644
--- a/security/amavisd-new/pkg-plist
+++ b/security/amavisd-new/pkg-plist
@@ -61,9 +61,6 @@
%%PORTDOCS%%%%DOCSDIR%%/images/toc-plus.png
%%PORTDOCS%%%%DOCSDIR%%/images/up.png
%%PORTDOCS%%%%DOCSDIR%%/images/warning.png
-%%PORTDOCS%%@dir %%DOCSDIR%%/images/callouts
-%%PORTDOCS%%@dir %%DOCSDIR%%/images
-%%PORTDOCS%%@dir %%DOCSDIR%%
@sample etc/amavisd-custom.conf.sample
etc/amavisd.conf-default
@sample etc/amavisd.conf.sample
@@ -74,3 +71,8 @@ sbin/amavisd-nanny
sbin/amavisd-release
sbin/amavisd-requeue
sbin/amavisd-snmp-subagent
+@dir(%%AMAVISUSER%%,%%AMAVISGROUP%%,750) %%AMAVISQUARANTINE%%
+@dir(%%AMAVISUSER%%,%%AMAVISGROUP%%,750) %%AMAVISDIR%%/var
+@dir(%%AMAVISUSER%%,%%AMAVISGROUP%%,750) %%AMAVISDIR%%/tmp
+@dir(%%AMAVISUSER%%,%%AMAVISGROUP%%,750) %%AMAVISDIR%%/db
+@dir(%%AMAVISUSER%%,%%AMAVISGROUP%%,750) %%AMAVISDIR%%