From 4c5d9a5de6c58d5ecc8bba88b3b51ddcabd77e2f Mon Sep 17 00:00:00 2001 From: leeym Date: Mon, 30 Jun 2003 01:24:54 +0000 Subject: generate PLIST in pre-install phase. Requested by: Sergey Matveychuk --- mail/openwebmail/Makefile | 22 ++++++++++++++++------ mail/openwebmail/pkg-plist | 2 +- 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 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 -- cgit