diff options
author | matthew <matthew@FreeBSD.org> | 2013-09-28 05:53:44 +0800 |
---|---|---|
committer | matthew <matthew@FreeBSD.org> | 2013-09-28 05:53:44 +0800 |
commit | 2324d3e3fd8457c6ffeb2c944c409a7591271c88 (patch) | |
tree | 52b6871a11b114b62fbf6f77a3c8a0f90fbb3f40 /www | |
parent | 3357179248ab52769c36aa7980fcbd44e72fe2da (diff) | |
download | freebsd-ports-graphics-2324d3e3fd8457c6ffeb2c944c409a7591271c88.tar.gz freebsd-ports-graphics-2324d3e3fd8457c6ffeb2c944c409a7591271c88.tar.zst freebsd-ports-graphics-2324d3e3fd8457c6ffeb2c944c409a7591271c88.zip |
- stageify
- move post-install actions to pkg-install script
Diffstat (limited to 'www')
-rw-r--r-- | www/rt40/Makefile | 14 | ||||
-rw-r--r-- | www/rt40/files/pkg-install.in | 20 | ||||
-rw-r--r-- | www/rt40/pkg-plist | 2 |
3 files changed, 26 insertions, 10 deletions
diff --git a/www/rt40/Makefile b/www/rt40/Makefile index 83f78fc1b69..6c8807ec3da 100644 --- a/www/rt40/Makefile +++ b/www/rt40/Makefile @@ -11,6 +11,7 @@ COMMENT= RT is an industrial-grade ticketing system written in Perl CONFLICTS= rt-3.8* brlcad-[0-9]* LATEST_LINK= rt40 +NEED_ROOT= yes # See doc/web_deployment.pod for info on the choices of webserver / # webapp combinations. Note: if using apache, apache-2.2+ is @@ -51,7 +52,6 @@ GROUPS?= rt BUILD_DEPENDS+= ${LOCALBASE}/bin/jsmin:${PORTSDIR}/devel/jsmin -NO_STAGE= yes .include "${.CURDIR}/Makefile.cpan" BUILD_DEPENDS+= ${CORE_DEPS} \ @@ -195,8 +195,9 @@ CONFIGURE_ARGS+= --enable-layout=${RT_LAYOUT} \ CONFIGURE_ENV+= PERL=${LOCALBASE}/bin/perl PKGMESSAGE= ${WRKDIR}/pkg-message -SUB_FILES= pkg-message -SUB_LIST= RT_ETC_PATH=${RT_ETC_PATH} +SUB_FILES= pkg-message pkg-install +SUB_LIST= RT_ETC_PATH=${RT_ETC_PATH} \ + CFG_FILE=${RT_ETC_PATH}/RT_SiteConfig.pm run-autotools: run-autotools-autoconf @@ -229,12 +230,9 @@ pre-install: post-install: .if ${PORT_OPTIONS:MDOCS} - ${MKDIR} ${DOCSDIR}/upgrade + ${MKDIR} ${STAGEDIR}${DOCSDIR}/upgrade (cd ${WRKSRC}/etc && \ - ${COPYTREE_SHARE} upgrade ${DOCSDIR} "! -name *\.in") + ${COPYTREE_SHARE} upgrade ${STAGEDIR}${DOCSDIR} "! -name *\.in") .endif - @[ -f ${RT_ETC_PATH}/RT_SiteConfig.pm ] || \ - ${CP} -p ${RT_ETC_PATH}/RT_SiteConfig.pm-dist ${RT_ETC_PATH}/RT_SiteConfig.pm - ${CAT} ${PKGMESSAGE} .include <bsd.port.mk> diff --git a/www/rt40/files/pkg-install.in b/www/rt40/files/pkg-install.in new file mode 100644 index 00000000000..531b2d2ad19 --- /dev/null +++ b/www/rt40/files/pkg-install.in @@ -0,0 +1,20 @@ +#!/bin/sh +# +# $FreeBSD$ + +PATH=/usr/sbin:/usr/bin:/bin ; export PATH + +case $2 in + + POST-INSTALL) + + # Install a default config file if none exists + if [ ! -f ${CFG_FILE} ] ; then + cp -p ${CFG_FILE}-dist ${CFG_FILE} + fi + ;; +esac + +# +# That's All Folks! +# diff --git a/www/rt40/pkg-plist b/www/rt40/pkg-plist index 081eef42e9a..282801c8e71 100644 --- a/www/rt40/pkg-plist +++ b/www/rt40/pkg-plist @@ -2,9 +2,7 @@ bin/rt bin/rt-crontool bin/rt-mailgate etc/rt40/RT_Config.pm -@unexec if cmp -s %D/etc/rt40/RT_SiteConfig.pm %D/etc/rt40/RT_SiteConfig.pm-dist; then rm -f %D/etc/rt40/RT_SiteConfig.pm; fi etc/rt40/RT_SiteConfig.pm-dist -@exec [ -f %B/RT_SiteConfig.pm ] || cp -p %B/%f %B/RT_SiteConfig.pm etc/rt40/acl.Oracle etc/rt40/acl.Pg etc/rt40/acl.mysql |