aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorleeym <leeym@FreeBSD.org>2003-06-30 09:24:54 +0800
committerleeym <leeym@FreeBSD.org>2003-06-30 09:24:54 +0800
commit4c5d9a5de6c58d5ecc8bba88b3b51ddcabd77e2f (patch)
tree9ba4898d4a2217fc61ca0ccc45c329cfc9d50676 /mail
parentdc635589fd7b4b0eaf47d410d279d606ab0b57f3 (diff)
downloadfreebsd-ports-gnome-4c5d9a5de6c58d5ecc8bba88b3b51ddcabd77e2f.tar.gz
freebsd-ports-gnome-4c5d9a5de6c58d5ecc8bba88b3b51ddcabd77e2f.tar.zst
freebsd-ports-gnome-4c5d9a5de6c58d5ecc8bba88b3b51ddcabd77e2f.zip
generate PLIST in pre-install phase.
Requested by: Sergey Matveychuk <sem@ciam.ru>
Diffstat (limited to 'mail')
-rw-r--r--mail/openwebmail/Makefile22
-rw-r--r--mail/openwebmail/pkg-plist2
2 files changed, 17 insertions, 7 deletions
diff --git a/mail/openwebmail/Makefile b/mail/openwebmail/Makefile
index 14b025c1d5d1..1d8945ce652c 100644
--- a/mail/openwebmail/Makefile
+++ b/mail/openwebmail/Makefile
@@ -105,6 +105,22 @@ post-patch:
@${PERL} -pi.bak -e 's,/usr/bin/suidperl,${PERL},g' ${PATCH_WRKSRC}/openwebmail*pl
.endif
+pre-install:
+ @${FIND} ${WRKSRC}/*/openwebmail \( -name "*.bak" -or -name "*.orig" \) -delete
+.if !exists(${PLIST})
+ @${FIND} ${WRKSRC}/*/openwebmail -type f -o -type l | ${SED} -e 's,${WRKSRC},www,g' | sort -u > ${PLIST}
+.for file in b2g g2b lunar
+ @${ECHO} "www/cgi-bin/openwebmail/etc/${file}.db" >> ${PLIST}
+.endfor
+.if defined(WITHOUT_SPEEDYCGI)
+ @${FIND} ${WRKSRC}/*/openwebmail -name "openwebmail*pl" | \
+ ${SED} -e 's,${WRKSRC},www,g' \
+ -e 's,openwebmail/openwebmail,openwebmail/.openwebmail,g' \
+ >> ${PLIST}
+.endif
+ @${FIND} ${WRKSRC}/*/openwebmail -type d | sort -ur | ${SED} -e 's,${WRKSRC},@dirrm www,g' >> ${PLIST}
+.endif
+
do-install:
@${MKDIR} ${OWCGIDIR} ${OWDATADIR}
@cd ${WRKSRC}/cgi-bin/openwebmail && ${FIND} . | cpio -dpum -R ${BINOWN}:mail ${OWCGIDIR}
@@ -115,10 +131,4 @@ do-install:
@${PERL} ${OWCGIDIR}/uty/wrapsuid.pl ${OWCGIDIR}
.endif
@${OWCGIDIR}/openwebmail-tool.pl --init --no
- @${FIND} ${OWCGIDIR} \( -name "*.bak" -or -name "*.orig" \) -delete
-.if !exists(${PLIST})
- @cd ${PREFIX} && ${FIND} ${OWCGIDIR:S,${PREFIX}/,,} ${OWDATADIR:S,${PREFIX}/,,} -type f -or -type l | sort -u > ${PLIST}
- @cd ${PREFIX} && ${FIND} ${OWCGIDIR:S,${PREFIX}/,,} ${OWDATADIR:S,${PREFIX}/,,} -type d | sort -ur | ${SED} -e 's,^,@dirrm ,g' >> ${PLIST}
-.endif
-
.include <bsd.port.post.mk>
diff --git a/mail/openwebmail/pkg-plist b/mail/openwebmail/pkg-plist
index a8cb03cf2897..d0ac09258d04 100644
--- a/mail/openwebmail/pkg-plist
+++ b/mail/openwebmail/pkg-plist
@@ -1 +1 @@
-@comment real PLIST will be generated in do-install phase
+@comment real PLIST will be generated in pre-install phase