aboutsummaryrefslogtreecommitdiffstats
path: root/www/rt3
diff options
context:
space:
mode:
authorflz <flz@FreeBSD.org>2005-03-06 00:04:46 +0800
committerflz <flz@FreeBSD.org>2005-03-06 00:04:46 +0800
commit659980315767e10fd4c34207a670c1016728bd5a (patch)
tree5ccea26a34993d0a06eb4a84490a535b29c75ad5 /www/rt3
parent3cdfa59ff5cd265244868ee08ab5160c2a3b6b5d (diff)
downloadfreebsd-ports-gnome-659980315767e10fd4c34207a670c1016728bd5a.tar.gz
freebsd-ports-gnome-659980315767e10fd4c34207a670c1016728bd5a.tar.zst
freebsd-ports-gnome-659980315767e10fd4c34207a670c1016728bd5a.zip
- Add a patch that installs RT_SiteConfig.pm as RT_SiteConfig.pm-dist.
- Instanciate RT_SiteConfig.pm from RT_SiteConfig.pm-dist at install stage if it doesn't exist yet and remove it at deinstall if it hasn't been changed. PR: ports/75558 Submitted by: edwin Reviewed by: edwin Approved by: pav (mentor), maintainer timeout (2 months)
Diffstat (limited to 'www/rt3')
-rw-r--r--www/rt3/Makefile3
-rw-r--r--www/rt3/files/patch-Makefile.in37
-rw-r--r--www/rt3/pkg-plist4
3 files changed, 43 insertions, 1 deletions
diff --git a/www/rt3/Makefile b/www/rt3/Makefile
index 69efe0421b0b..57f06d398f8f 100644
--- a/www/rt3/Makefile
+++ b/www/rt3/Makefile
@@ -7,6 +7,7 @@
PORTNAME= rt
PORTVERSION?= 3.0.12
+PORTREVISION= 1
CATEGORIES= www
MASTER_SITES?= http://download.bestpractical.com/pub/rt/release/ \
http://download.bestpractical.com/pub/rt/devel/ \
@@ -136,6 +137,8 @@ post-patch:
post-install:
@${INSTALL_DATA} ${WRKSRC}/README ${RT_PATH}/README
+ @[ -f ${RT_PATH}/etc/RT_SiteConfig.pm ] ||
+ ${CP} -p ${RT_PATH}/etc/RT_SiteConfig.pm-dist ${RT_PATH}/etc/RT_SiteConfig.pm
@PKG_PREFIX=${PREFIX} RT_PATH=${RT_PATH} \
DB_DBA_USER=${DB_DBA_USER} DB_DBA_PASSWORD=${DB_DBA_USER} \
INITIAL_INSTALL=${INITIAL_INSTALL} PKGMESSAGE=${PKGMESSAGE} \
diff --git a/www/rt3/files/patch-Makefile.in b/www/rt3/files/patch-Makefile.in
new file mode 100644
index 000000000000..6452e0a5c06d
--- /dev/null
+++ b/www/rt3/files/patch-Makefile.in
@@ -0,0 +1,37 @@
+--- Makefile.in.orig
++++ Makefile.in
+@@ -246,7 +246,7 @@
+ chgrp -R $(RTGROUP) $(DESTDIR)/$(RT_ETC_PATH)
+
+ chmod 0550 $(DESTDIR)/$(CONFIG_FILE)
+- chmod 0550 $(DESTDIR)/$(SITE_CONFIG_FILE)
++ chmod 0550 $(DESTDIR)/$(SITE_CONFIG_FILE)-dist
+
+ # Make the interfaces executable and setgid rt
+ chown $(BIN_OWNER) $(BINARIES)
+@@ -276,7 +276,7 @@
+ @echo "You should never be running RT this way. it's unsafe"
+ chmod 0555 $(SETGID_BINARIES)
+ chmod 0555 $(DESTDIR)/$(CONFIG_FILE)
+- chmod 0555 $(DESTDIR)/$(SITE_CONFIG_FILE)
++ chmod 0555 $(DESTDIR)/$(SITE_CONFIG_FILE)-dist
+
+ # {{{ dirs
+ dirs:
+@@ -300,13 +300,13 @@
+ config-install:
+ mkdir -p $(DESTDIR)/$(CONFIG_FILE_PATH)
+ cp etc/RT_Config.pm $(DESTDIR)/$(CONFIG_FILE)
+- [ -f $(DESTDIR)/$(SITE_CONFIG_FILE) ] || cp etc/RT_SiteConfig.pm $(DESTDIR)/$(SITE_CONFIG_FILE)
++ cp etc/RT_SiteConfig.pm $(DESTDIR)/$(SITE_CONFIG_FILE)-dist
+
+ chgrp $(RTGROUP) $(DESTDIR)/$(CONFIG_FILE)
+ chown $(BIN_OWNER) $(DESTDIR)/$(CONFIG_FILE)
+
+- chgrp $(RTGROUP) $(DESTDIR)/$(SITE_CONFIG_FILE)
+- chown $(BIN_OWNER) $(DESTDIR)/$(SITE_CONFIG_FILE)
++ chgrp $(RTGROUP) $(DESTDIR)/$(SITE_CONFIG_FILE)-dist
++ chown $(BIN_OWNER) $(DESTDIR)/$(SITE_CONFIG_FILE)-dist
+
+ @echo "Installed configuration. about to install rt in $(RT_PATH)"
+
diff --git a/www/rt3/pkg-plist b/www/rt3/pkg-plist
index 8642fbe7a26b..f2c42743de6a 100644
--- a/www/rt3/pkg-plist
+++ b/www/rt3/pkg-plist
@@ -7,7 +7,9 @@ rt3/bin/rt-crontool
rt3/bin/rt-mailgate
rt3/bin/webmux.pl
rt3/etc/RT_Config.pm
-rt3/etc/RT_SiteConfig.pm
+@unexec cmp -s %D/rt3/etc/RT_SiteConfig.pm %D/rt3/etc/RT_SiteConfig.pm-dist; then rm -f %D/rt3/etc/RT_SiteConfig.pm
+rt3/etc/RT_SiteConfig.pm-dist
+@exec [ -f %B/RT_SiteConfig.pm ] || cp %B/%f %B/RT_SiteConfig.pm
rt3/etc/acl.Informix
rt3/etc/acl.Oracle
rt3/etc/acl.Pg