aboutsummaryrefslogtreecommitdiff
path: root/www/rt40
diff options
context:
space:
mode:
authorMatthew Seaman <matthew@FreeBSD.org>2013-09-27 21:53:44 +0000
committerMatthew Seaman <matthew@FreeBSD.org>2013-09-27 21:53:44 +0000
commit8b996e0d96c2fed2048ed0c19d31fd62d72d4741 (patch)
tree52b6871a11b114b62fbf6f77a3c8a0f90fbb3f40 /www/rt40
parentd22ea88436409f5bd24501e8680c97bef075cc9e (diff)
downloadports-8b996e0d96c2fed2048ed0c19d31fd62d72d4741.tar.gz
ports-8b996e0d96c2fed2048ed0c19d31fd62d72d4741.zip
Notes
Diffstat (limited to 'www/rt40')
-rw-r--r--www/rt40/Makefile14
-rw-r--r--www/rt40/files/pkg-install.in20
-rw-r--r--www/rt40/pkg-plist2
3 files changed, 26 insertions, 10 deletions
diff --git a/www/rt40/Makefile b/www/rt40/Makefile
index 83f78fc1b696..6c8807ec3da0 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 000000000000..531b2d2ad192
--- /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 081eef42e9a1..282801c8e71a 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