diff options
author | sem <sem@FreeBSD.org> | 2005-04-21 15:02:05 +0800 |
---|---|---|
committer | sem <sem@FreeBSD.org> | 2005-04-21 15:02:05 +0800 |
commit | f794fc6197b0e18e3e4ecd9cd1f2738ac7471d07 (patch) | |
tree | 6cb312f6c294903d27d85fac389f44cb641d0eca /net/cacti/Makefile | |
parent | 4b86782824e4a4e6b867cbc81a86f0aea8cf5103 (diff) | |
download | freebsd-ports-graphics-f794fc6197b0e18e3e4ecd9cd1f2738ac7471d07.tar.gz freebsd-ports-graphics-f794fc6197b0e18e3e4ecd9cd1f2738ac7471d07.tar.zst freebsd-ports-graphics-f794fc6197b0e18e3e4ecd9cd1f2738ac7471d07.zip |
- Fix removing logic for user config [1]
- Remove useless empty dirs
- Fix package
- Makefile refactoring
- Utilize SUB_FILES magic
- Update pkg-message
Reported by: kris (via pointyhat) [1]
Diffstat (limited to 'net/cacti/Makefile')
-rw-r--r-- | net/cacti/Makefile | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/net/cacti/Makefile b/net/cacti/Makefile index e8247a05758..e703f216f50 100644 --- a/net/cacti/Makefile +++ b/net/cacti/Makefile @@ -7,7 +7,7 @@ PORTNAME= cacti PORTVERSION= 0.8.6c -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net www MASTER_SITES= http://www.cacti.net/downloads/ @@ -35,32 +35,27 @@ USE_PHP= mysql pcre session xml WANT_PHP_WEB= yes NO_BUILD= yes PKGMESSAGE= ${WRKDIR}/pkg-message +PKGINSTALL= ${WRKDIR}/pkg-install +SUB_FILES= pkg-message pkg-install CACTIDIR?= share/cacti CACTIUSER?= cacti CACTIGROUP?= ${CACTIUSER} PLIST_SUB+= CACTIDIR=${CACTIDIR} - -post-extract: - @${RM} -rf ${WRKSRC}/cactid/.deps +SUB_LIST+= CACTIDIR=${CACTIDIR} CACTIUSER=${CACTIUSER} \ + CACTIGROUP=${CACTIGROUP} post-patch: - @${CAT} pkg-message | ${SED} -e 's|%%PREFIX%%|${PREFIX}| ; \ - s|%%LOCALBASE%%|${LOCALBASE}| ; \ - s|%%CACTIDIR%%|${CACTIDIR}| ; \ - s|%%CACTIUSER%%|${CACTIUSER}|' > ${PKGMESSAGE} + @${FIND} ${WRKSRC} -name \*.orig -delete; \ + ${MV} ${WRKSRC}/include/config.php ${WRKSRC}/include/config.php.orig; \ + ${RM} -d ${WRKSRC}/include/lang/en ${WRKSRC}/include/lang -# Create cacti user/group and clean *.orig files pre-install: - @PREFIX=${PREFIX} CACTIDIR=${CACTIDIR} CACTIUSER=${CACTIUSER} \ - CACTIGROUP=${CACTIGROUP} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL; \ - cd ${WRKSRC}; \ - ${FIND} . -name \*.orig -delete + @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL; \ do-install: @${MKDIR} ${PREFIX}/${CACTIDIR}; \ - ${MV} ${WRKSRC}/include/config.php ${WRKSRC}/include/config.php.orig; \ - ${CP} -R ${WRKSRC}/* ${PREFIX}/${CACTIDIR}/ + ${CP} -R ${WRKSRC}/* ${PREFIX}/${CACTIDIR}/; \ if [ ! -f ${PREFIX}/${CACTIDIR}/include/config.php ]; then \ ${CP} ${PREFIX}/${CACTIDIR}/include/config.php.orig \ ${PREFIX}/${CACTIDIR}/include/config.php; \ @@ -68,8 +63,7 @@ do-install: # Fix permissions post-install: - @PREFIX=${PREFIX} CACTIDIR=${CACTIDIR} CACTIUSER=${CACTIUSER} \ - CACTIGROUP=${CACTIGROUP} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL @${CAT} ${PKGMESSAGE} .include <bsd.port.mk> |