aboutsummaryrefslogtreecommitdiffstats
path: root/net/sipxpbx
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2007-03-27 16:29:57 +0800
committermiwi <miwi@FreeBSD.org>2007-03-27 16:29:57 +0800
commit2bb8846cf9778abc7d38d41270fb9cdae916abc1 (patch)
tree2af9aefb7e90014e590daebbdc92e775917d9e4d /net/sipxpbx
parent5a5023e92d297ea1c78ccdab436abd8886a8845b (diff)
downloadfreebsd-ports-gnome-2bb8846cf9778abc7d38d41270fb9cdae916abc1.tar.gz
freebsd-ports-gnome-2bb8846cf9778abc7d38d41270fb9cdae916abc1.tar.zst
freebsd-ports-gnome-2bb8846cf9778abc7d38d41270fb9cdae916abc1.zip
sipxpbx should change the ownership, if necessary, of files and directories
it installs. Perviously, the toplevel port, sipxpbx, changed ownership for not only its files, but all the dependant ports too. - Bump PORTREVISION Submitted by: Mike Durian <durian@shadetreesoftware.com> (maintainer)
Diffstat (limited to 'net/sipxpbx')
-rw-r--r--net/sipxpbx/Makefile23
-rw-r--r--net/sipxpbx/files/pkg-install.in23
2 files changed, 26 insertions, 20 deletions
diff --git a/net/sipxpbx/Makefile b/net/sipxpbx/Makefile
index 044575541bdb..ffa150fe4f88 100644
--- a/net/sipxpbx/Makefile
+++ b/net/sipxpbx/Makefile
@@ -7,7 +7,7 @@
PORTNAME= sipxpbx
PORTVERSION= 3.6.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net
MASTER_SITES= http://www.sipfoundry.org/pub/sipX/3.6/SRC/
@@ -64,7 +64,10 @@ CONFIGURE_ARGS+= --enable-sip-tls \
--with-mod_cplusplus=${PREFIX}/${APACHEINCLUDEDIR}
SUB_LIST= LOCALSTATEDIR=${LOCALSTATEDIR} \
PREFIX=${PREFIX} \
- DESTDIR=${DESTDIR}
+ DESTDIR=${DESTDIR} \
+ APACHEMODDIR=${APACHEMODDIR} \
+ APACHE_VERSION=${APACHE_VERSION}
+
SUB_FILES= pkg-deinstall sipxpbx pkg-message pkg-install
PKGMESSAGE= ${WRKDIR}/pkg-message
PKGINSTALL= ${WRKDIR}/pkg-install
@@ -89,21 +92,7 @@ pre-install:
@${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL
post-install:
- # fix up permission on sipX directories under /var
- ${MKDIR} ${LOCALSTATEDIR}/log/sipxpbx
- ${MKDIR} ${LOCALSTATEDIR}/run/sipxpbx
- ${CHOWN} -R sipx:sipx ${LOCALSTATEDIR}/log/sipxpbx
- ${CHOWN} -R sipx:sipx ${LOCALSTATEDIR}/run/sipxpbx
- ${CHOWN} -R sipx:sipx ${LOCALSTATEDIR}/sipxdata
- ${CHOWN} -R sipx:sipx ${PREFIX}/etc/sipxpbx
- ${CHOWN} -R sipx:sipx ${PREFIX}/www/sipX
@${CAT} ${PKGMESSAGE}
- @if [ ! -f ${PREFIX}/${APACHEMODDIR}/mod_ssl.so ] ; then \
- ${ECHO} "!!!!!!!!!!" ; \
- ${ECHO} "You have installed www/apache${APACHE_VERSION} without the SSL module." ; \
- ${ECHO} "sipXpbx requires the apache SSL module." ; \
- ${ECHO} "Please rebuild and reinstall www/apache${APACHE_VERSION} with -DWITH_SSL_MODULES" ; \
- ${ECHO} "!!!!!!!!!!" ; \
- fi
+ @${SH} ${PKGINSTALL} ${PORTNAME} POST-INSTALL
.include <bsd.port.post.mk>
diff --git a/net/sipxpbx/files/pkg-install.in b/net/sipxpbx/files/pkg-install.in
index b032139f778c..4984634af93a 100644
--- a/net/sipxpbx/files/pkg-install.in
+++ b/net/sipxpbx/files/pkg-install.in
@@ -2,11 +2,11 @@
PATH=/bin:/usr/sbin
+USER=sipx
+GROUP=sipx
+
case $2 in
PRE-INSTALL)
- USER=sipx
- GROUP=sipx
-
if pw group show "${GROUP}" 2> /dev/null ; then
echo "You already have a group \"${GROUP}\", so I will use it."
else
@@ -30,4 +30,21 @@ PRE-INSTALL)
fi
fi
;;
+POST-INSTALL)
+ # fix up permission on sipX directories under /var
+ mkdir -p %%LOCALSTATEDIR%%/log/sipxpbx
+ mkdir -p %%LOCALSTATEDIR%%/run/sipxpbx
+ chown ${USER}:${GROUP} %%LOCALSTATEDIR%%/log/sipxpbx
+ chown ${USER}:${GROUP} %%LOCALSTATEDIR%%/run/sipxpbx
+ chown -R ${USER}:${GROUP} %%LOCALSTATEDIR%%/sipxdata
+ chown ${USER}:${GROUP} %%PREFIX%%/etc/sipxpbx
+ chown -R ${USER}:${GROUP} %%PREFIX%%/www/sipX
+ if [ ! -f %%PREFIX%%/%%APACHEMODDIR%%/mod_ssl.so ] ; then \
+ echo "!!!!!!!!!!" ; \
+ echo "You have installed www/apache%%APACHE_VERSION%% without the SSL module." ; \
+ echo "sipXpbx requires the apache SSL module." ; \
+ echo "Please rebuild and reinstall www/apache%%APACHE_VERSION%% with -DWITH_SSL_MODULES" ; \
+ echo "!!!!!!!!!!" ; \
+ fi
+ ;;
esac