- Makefile cleanup and tweaks

PR:		ports/119511
Submitted by:	Greg Larkin <glarkin@sourcehosting.net> (maintainer)
Approved by:	linimon (mentor)
This commit is contained in:
Beech Rintoul 2008-01-10 03:54:15 +00:00
parent 8d014a66d7
commit 3a06d9de90
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=205351
2 changed files with 18 additions and 26 deletions

View file

@ -7,9 +7,10 @@
PORTNAME= WebCalendar PORTNAME= WebCalendar
PORTVERSION= 1.0.5 PORTVERSION= 1.0.5
PORTREVISION= 1
CATEGORIES= www CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITES= SF
MASTER_SITE_SUBDIR= webcalendar MASTER_SITE_SUBDIR= ${PORTNAME:L}
DISTNAME= ${PORTNAME}-${PORTVERSION} DISTNAME= ${PORTNAME}-${PORTVERSION}
MAINTAINER= glarkin@sourcehosting.net MAINTAINER= glarkin@sourcehosting.net
@ -18,23 +19,24 @@ COMMENT= A web-based calendar application
USE_PHP= pcre session USE_PHP= pcre session
WANT_PHP_WEB= yes WANT_PHP_WEB= yes
NO_BUILD= yes NO_BUILD= yes
CONFLICTS= WebCalendar-devel-[0-9]*
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
WCURL?= ${PORTNAME:L} WCURL?= ${MASTER_SITE_SUBDIR}
WCDIR?= www/${WCURL} WCDIR?= www/${WCURL}
PLIST= ${WRKDIR}/pkg-plist PLIST= ${WRKDIR}/pkg-plist
SUB_FILES= pkg-message SUB_FILES= pkg-message
SUB_LIST= WCURL=${WCURL} WCDIR=${WCDIR} SUB_LIST= WCURL=${WCURL} WCDIR=${WCDIR}
DOCSDIR?= ${PREFIX}/share/doc/${PORTNAME} DOCSDIR= ${PREFIX}/share/doc/${MASTER_SITE_SUBDIR}
DOCS= docs/README \ PORTDOCS= README \
docs/WebCalendar-Database.html \ WebCalendar-Database.html \
docs/WebCalendar-DeveloperGuide.html \ WebCalendar-DeveloperGuide.html \
docs/WebCalendar-Styling.html \ WebCalendar-Styling.html \
docs/WebCalendar-SysAdmin.html \ WebCalendar-SysAdmin.html \
docs/newwin.gif newwin.gif
OPTIONS= MYSQL "Use MySQL database backend (default)" On \ OPTIONS= MYSQL "Use MySQL database backend (default)" On \
PGSQL "Use PostgreSQL database backend" Off \ PGSQL "Use PostgreSQL database backend" Off \
@ -92,22 +94,20 @@ pre-install:
&& ${FIND} -d * -type d | \ && ${FIND} -d * -type d | \
${SED} -e 's|^|@dirrm ${WCDIR}/|' >> ${PLIST} \ ${SED} -e 's|^|@dirrm ${WCDIR}/|' >> ${PLIST} \
&& ${ECHO_CMD} @dirrm ${WCDIR} >> ${PLIST} && ${ECHO_CMD} @dirrm ${WCDIR} >> ${PLIST}
@${CAT} pkg-plist >> ${PLIST}
@${ECHO_CMD} @dirrmtry www/data-dist >> ${PLIST} @${ECHO_CMD} @dirrmtry www/data-dist >> ${PLIST}
@${ECHO_CMD} @dirrmtry www/data >> ${PLIST} @${ECHO_CMD} @dirrmtry www/data >> ${PLIST}
do-install: do-install:
@${MKDIR} ${PREFIX}/${WCDIR} @cd ${WRKSRC} && ${COPYTREE_SHARE} . ${PREFIX}/${WCDIR}
${CP} -R ${WRKSRC}/* ${PREFIX}/${WCDIR} @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${WCDIR}
${CHOWN} -R www:www ${PREFIX}/${WCDIR} @${FIND} ${PREFIX}/${WCDIR} -type f -print0 | ${XARGS} -0 ${CHMOD} 644
${FIND} ${PREFIX}/${WCDIR} -type f | ${XARGS} ${CHMOD} 644 @${ECHO_CMD} '@exec ${CHOWN} -R ${WWWOWN}:${WWWGRP} \
${WCDIR:S|^|%D/|}' >> ${TMPPLIST}
post-install: post-install:
.if !defined(NOPORTDOCS) .if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR} @${MKDIR} ${DOCSDIR}
.for i in ${DOCS} @cd ${WRKSRC}/docs && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
.endfor
.endif .endif
@${CAT} ${PKGMESSAGE} @${CAT} ${PKGMESSAGE}

View file

@ -1,8 +0,0 @@
@comment The full PLIST will be generated in pre-install phase
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/WebCalendar-Database.html
%%PORTDOCS%%%%DOCSDIR%%/WebCalendar-DeveloperGuide.html
%%PORTDOCS%%%%DOCSDIR%%/WebCalendar-Styling.html
%%PORTDOCS%%%%DOCSDIR%%/WebCalendar-SysAdmin.html
%%PORTDOCS%%%%DOCSDIR%%/newwin.gif
%%PORTDOCS%%@dirrm %%DOCSDIR%%