1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

generate PLIST in pre-install phase.

Requested by:	Sergey Matveychuk <sem@ciam.ru>
This commit is contained in:
Yen-Ming Lee 2003-06-30 01:24:54 +00:00
parent 6ba2e89612
commit 824f464b5c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=83873
2 changed files with 17 additions and 7 deletions

View File

@ -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>

View File

@ -1 +1 @@
@comment real PLIST will be generated in do-install phase
@comment real PLIST will be generated in pre-install phase