diff options
author | joerg <joerg@pkgsrc.org> | 2011-11-11 18:43:43 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2011-11-11 18:43:43 +0000 |
commit | c80143f9cb38d99ec2fe67ff06f79945f73f20cf (patch) | |
tree | 7a86c68aafed1020944ee0e82f83b09c891e55fb /misc/jitterbug | |
parent | b68b0ef62c25deec47f7123047e1b753f090cbf2 (diff) | |
download | pkgsrc-c80143f9cb38d99ec2fe67ff06f79945f73f20cf.tar.gz |
Add DESTDIR support.
XXX The @exec logic in PLIST is a mess and needs fixing.
Diffstat (limited to 'misc/jitterbug')
-rw-r--r-- | misc/jitterbug/Makefile | 105 | ||||
-rw-r--r-- | misc/jitterbug/PLIST | 4 |
2 files changed, 56 insertions, 53 deletions
diff --git a/misc/jitterbug/Makefile b/misc/jitterbug/Makefile index 84109b5bc45..6330da0ca30 100644 --- a/misc/jitterbug/Makefile +++ b/misc/jitterbug/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.33 2010/12/31 07:57:14 obache Exp $ +# $NetBSD: Makefile,v 1.34 2011/11/11 18:43:43 joerg Exp $ DISTNAME= jitterbug-1.6.2 PKGREVISION= 2 @@ -9,6 +9,8 @@ MAINTAINER= wennmach@NetBSD.org HOMEPAGE= http://jitterbug.samba.org/ COMMENT= Web-oriented bug-tracking tool +PKG_DESTDIR_SUPPORT= destdir + WRKSRC= ${WRKDIR}/${PKGNAME_NOREV}/source CONFIGDIR= ${WRKDIR}/${PKGNAME_NOREV}/config DOCSDIR= ${WRKDIR}/${PKGNAME_NOREV}/docs @@ -44,6 +46,8 @@ PKG_USERS= ${JB_USER}:${JB_GROUP} PKG_GROUPS_VARS+= JB_GROUP PKG_USERS_VARS+= JB_USER +USERGROUP_PHASE= pre-install + GNU_CONFIGURE= yes MESSAGE_SUBST+= JB_USER=${JB_USER:Q} \ @@ -148,63 +152,64 @@ pre-install: > ${WRKDIR}/httpd.conf do-install: - ${INSTALL_DATA_DIR} ${PREFIX}/${JB_CONFIGDIR} - ${INSTALL_DATA_DIR} ${PREFIX}/${JB_DATADIR} + ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/${JB_CONFIGDIR} + ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/${JB_DATADIR} ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ - ${CONFIGDIR}/footer.html ${PREFIX}/${JB_CONFIGDIR} - [ -f ${PREFIX}/${JB_DATADIR}/footer.html ] || \ + ${CONFIGDIR}/footer.html ${DESTDIR}${PREFIX}/${JB_CONFIGDIR} + [ -f ${DESTDIR}${PREFIX}/${JB_DATADIR}/footer.html ] || \ ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ - ${CONFIGDIR}/footer.html ${PREFIX}/${JB_DATADIR} + ${CONFIGDIR}/footer.html ${DESTDIR}${PREFIX}/${JB_DATADIR} ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ - ${CONFIGDIR}/guest.prefs ${PREFIX}/${JB_CONFIGDIR} - [ -f ${PREFIX}/${JB_DATADIR}/guest.prefs ] || \ + ${CONFIGDIR}/guest.prefs ${DESTDIR}${PREFIX}/${JB_CONFIGDIR} + [ -f ${DESTDIR}${PREFIX}/${JB_DATADIR}/guest.prefs ] || \ ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ - ${CONFIGDIR}/guest.prefs ${PREFIX}/${JB_DATADIR} + ${CONFIGDIR}/guest.prefs ${DESTDIR}${PREFIX}/${JB_DATADIR} ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ - ${CONFIGDIR}/guestintro.html ${PREFIX}/${JB_CONFIGDIR} - [ -f ${PREFIX}/${JB_DATADIR}/guestintro.html ] || \ + ${CONFIGDIR}/guestintro.html ${DESTDIR}${PREFIX}/${JB_CONFIGDIR} + [ -f ${DESTDIR}${PREFIX}/${JB_DATADIR}/guestintro.html ] || \ ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ - ${CONFIGDIR}/guestintro.html ${PREFIX}/${JB_DATADIR} + ${CONFIGDIR}/guestintro.html ${DESTDIR}${PREFIX}/${JB_DATADIR} ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ - ${CONFIGDIR}/intro.html ${PREFIX}/${JB_CONFIGDIR} - [ -f ${PREFIX}/${JB_DATADIR}/intro.html ] || \ + ${CONFIGDIR}/intro.html ${DESTDIR}${PREFIX}/${JB_CONFIGDIR} + [ -f ${DESTDIR}${PREFIX}/${JB_DATADIR}/intro.html ] || \ ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ - ${CONFIGDIR}/intro.html ${PREFIX}/${JB_DATADIR} + ${CONFIGDIR}/intro.html ${DESTDIR}${PREFIX}/${JB_DATADIR} ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ - ${CONFIGDIR}/reportform.html ${PREFIX}/${JB_CONFIGDIR} - [ -f ${PREFIX}/${JB_DATADIR}/reportform.html ] || \ + ${CONFIGDIR}/reportform.html ${DESTDIR}${PREFIX}/${JB_CONFIGDIR} + [ -f ${DESTDIR}${PREFIX}/${JB_DATADIR}/reportform.html ] || \ ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ - ${CONFIGDIR}/reportform.html ${PREFIX}/${JB_DATADIR} + ${CONFIGDIR}/reportform.html ${DESTDIR}${PREFIX}/${JB_DATADIR} ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ - ${CONFIGDIR}/users ${PREFIX}/${JB_CONFIGDIR} - [ -f ${PREFIX}/${JB_DATADIR}/users ] || \ + ${CONFIGDIR}/users ${DESTDIR}${PREFIX}/${JB_CONFIGDIR} + [ -f ${DESTDIR}${PREFIX}/${JB_DATADIR}/users ] || \ ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ - ${CONFIGDIR}/users ${PREFIX}/${JB_DATADIR} - ${INSTALL_PROGRAM_DIR} ${PREFIX}/${CGIBINDIR} - ${INSTALL} -c -o ${ROOT_USER} -g nobody -m 4710 \ - ${WRKSRC}/jitterbug ${PREFIX}/${CGIBINDIR}/${JB_PACKAGE} - ${LN} -f ${PREFIX}/${CGIBINDIR}/${JB_PACKAGE} ${PREFIX}/${CGIBINDIR}/${JB_PACKAGE}.private - ${CHOWN} ${ROOT_USER} ${PREFIX}/${CGIBINDIR}/${JB_PACKAGE}.private - ${CHGRP} nobody ${PREFIX}/${CGIBINDIR}/${JB_PACKAGE}.private - ${CHMOD} 4710 ${PREFIX}/${CGIBINDIR}/${JB_PACKAGE}.private - ${INSTALL_PROGRAM_DIR} ${PREFIX}/${JB_USER}/bin + ${CONFIGDIR}/users ${DESTDIR}${PREFIX}/${JB_DATADIR} + ${INSTALL_PROGRAM_DIR} ${DESTDIR}${PREFIX}/${CGIBINDIR} + ${INSTALL} -c -o ${ROOT_USER} -g nobody -m 4710 \ + ${WRKSRC}/jitterbug ${DESTDIR}${PREFIX}/${CGIBINDIR}/${JB_PACKAGE} + ${LN} -f ${DESTDIR}${PREFIX}/${CGIBINDIR}/${JB_PACKAGE} \ + ${DESTDIR}${PREFIX}/${CGIBINDIR}/${JB_PACKAGE}.private + ${CHOWN} ${ROOT_USER} ${DESTDIR}${PREFIX}/${CGIBINDIR}/${JB_PACKAGE}.private + ${CHGRP} nobody ${DESTDIR}${PREFIX}/${CGIBINDIR}/${JB_PACKAGE}.private + ${CHMOD} 4710 ${DESTDIR}${PREFIX}/${CGIBINDIR}/${JB_PACKAGE}.private + ${INSTALL_PROGRAM_DIR} ${DESTDIR}${PREFIX}/${JB_USER}/bin ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 755 \ - ${WRKSRC}/new_message ${PREFIX}/${JB_USER}/bin + ${WRKSRC}/new_message ${DESTDIR}${PREFIX}/${JB_USER}/bin ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ - ${WRKSRC}/jitterbug ${PREFIX}/${JB_USER}/bin - ${INSTALL_DATA_DIR} ${PREFIX}/${JB_USER}/etc - [ -f ${PREFIX}/${JB_USER}/etc ] || \ + ${WRKSRC}/jitterbug ${DESTDIR}${PREFIX}/${JB_USER}/bin + ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/${JB_USER}/etc + [ -f ${DESTDIR}${PREFIX}/${JB_USER}/etc ] || \ ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 755 \ - ${WRKDIR}/jitterbug.auth ${PREFIX}/${JB_USER}/etc - ${INSTALL_DATA_DIR} ${PREFIX}/${JB_USER}/doc + ${WRKDIR}/jitterbug.auth ${DESTDIR}${PREFIX}/${JB_USER}/etc + ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/${JB_USER}/doc ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ - ${WRKDIR}/NEWPACKAGE ${PREFIX}/${JB_USER}/doc + ${WRKDIR}/NEWPACKAGE ${DESTDIR}${PREFIX}/${JB_USER}/doc ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ - ${DOCSDIR}/CONFIG.txt ${PREFIX}/${JB_USER}/doc + ${DOCSDIR}/CONFIG.txt ${DESTDIR}${PREFIX}/${JB_USER}/doc ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ - ${DOCSDIR}/INSTALL ${PREFIX}/${JB_USER}/doc + ${DOCSDIR}/INSTALL ${DESTDIR}${PREFIX}/${JB_USER}/doc ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ - ${DOCSDIR}/JitterBug.txt ${PREFIX}/${JB_USER}/doc + ${DOCSDIR}/JitterBug.txt ${DESTDIR}${PREFIX}/${JB_USER}/doc @${SED} \ -e 's|@JB_EMAIL@|${JB_EMAIL}|g' \ -e 's|@JB_DATADIR@|${JB_DATADIR}|g' \ @@ -212,20 +217,20 @@ do-install: -e 's|@JB_GROUPID@|${JB_GROUPID}|g' \ -e 's|@PREFIX@|${PREFIX}|g' \ <${FILESDIR}/jitterbug.config \ - >${PREFIX}/${JB_CONFIGDIR}/jitterbug.config - ${CHOWN} -R ${JB_USER} ${PREFIX}/${JB_USER} - ${CHGRP} -R ${JB_GROUP} ${PREFIX}/${JB_USER} - ${INSTALL_DATA_DIR} ${PREFIX}/etc/jitterbug - [ -f ${PREFIX}/etc/jitterbug/${JB_PACKAGE} ] || \ + >${DESTDIR}${PREFIX}/${JB_CONFIGDIR}/jitterbug.config + ${CHOWN} -R ${JB_USER} ${DESTDIR}${PREFIX}/${JB_USER} + ${CHGRP} -R ${JB_GROUP} ${DESTDIR}${PREFIX}/${JB_USER} + ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/etc/jitterbug + [ -f ${DESTDIR}${PREFIX}/etc/jitterbug/${JB_PACKAGE} ] || \ ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ - ${PREFIX}/${JB_CONFIGDIR}/jitterbug.config \ - ${PREFIX}/etc/jitterbug/${JB_PACKAGE} - [ -f ${PREFIX}/etc/jitterbug/${JB_PACKAGE}.private ] || \ + ${DESTDIR}${PREFIX}/${JB_CONFIGDIR}/jitterbug.config \ + ${DESTDIR}${PREFIX}/etc/jitterbug/${JB_PACKAGE} + [ -f ${DESTDIR}${PREFIX}/etc/jitterbug/${JB_PACKAGE}.private ] || \ ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ - ${PREFIX}/${JB_CONFIGDIR}/jitterbug.config \ - ${PREFIX}/etc/jitterbug/${JB_PACKAGE}.private + ${DESTDIR}${PREFIX}/${JB_CONFIGDIR}/jitterbug.config \ + ${DESTDIR}${PREFIX}/etc/jitterbug/${JB_PACKAGE}.private ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ ${WRKDIR}/httpd.conf \ - ${PREFIX}/etc/jitterbug/httpd.conf.add + ${DESTDIR}${PREFIX}/etc/jitterbug/httpd.conf.add .include "../../mk/bsd.pkg.mk" diff --git a/misc/jitterbug/PLIST b/misc/jitterbug/PLIST index bb4f43ce02b..b34398027e5 100644 --- a/misc/jitterbug/PLIST +++ b/misc/jitterbug/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.7 2009/06/14 18:07:23 joerg Exp $ +@comment $NetBSD: PLIST,v 1.8 2011/11/11 18:43:43 joerg Exp $ ${JB_USER}/config/footer.html @exec if [ ! -d %D/${JB_DATADIR} ]; then ${MKDIR} %D/${JB_DATADIR}; fi @exec if [ ! -f %D/${JB_DATADIR}/footer.html ]; then /bin/cp -p %D/%F %D/${JB_DATADIR}/footer.html; fi @@ -13,8 +13,6 @@ ${JB_USER}/config/reportform.html ${JB_USER}/config/users @exec if [ ! -f %D/${JB_DATADIR}/users ]; then /bin/cp -p %D/%F %D/${JB_DATADIR}/users; fi ${JB_USER}/config/jitterbug.config -@exec if [ ! -d %D/etc/jitterbug/${JB_PACKAGE} ]; then ${MKDIR} %D/etc/jitterbug/${JB_PACKAGE}; fi -@exec if [ ! -f %D/etc/jitterbug/${JB_PACKAGE} ]; then /bin/cp -p %D/%F %D/etc/jitterbug/${JB_PACKAGE}; fi etc/jitterbug/${JB_PACKAGE} @exec if [ ! -f %D/etc/jitterbug/${JB_PACKAGE}.private ]; then /bin/cp -p %D/%F %D/etc/jitterbug/${JB_PACKAGE}.private; fi etc/jitterbug/${JB_PACKAGE}.private |