diff options
Diffstat (limited to 'net-mgmt')
-rw-r--r-- | net-mgmt/Makefile | 1 | ||||
-rw-r--r-- | net-mgmt/horde-nic/Makefile | 82 | ||||
-rw-r--r-- | net-mgmt/horde-nic/distinfo | 3 | ||||
-rw-r--r-- | net-mgmt/horde-nic/files/httpd.conf.nic | 31 | ||||
-rw-r--r-- | net-mgmt/horde-nic/files/pkg-deinstall.in | 24 | ||||
-rw-r--r-- | net-mgmt/horde-nic/files/pkg-install.in | 24 | ||||
-rw-r--r-- | net-mgmt/horde-nic/files/pkg-message.in | 11 | ||||
-rw-r--r-- | net-mgmt/horde-nic/pkg-descr | 3 | ||||
-rw-r--r-- | net-mgmt/horde-nic/pkg-plist | 86 |
9 files changed, 265 insertions, 0 deletions
diff --git a/net-mgmt/Makefile b/net-mgmt/Makefile index 846f461c5f94..c20648ad06ce 100644 --- a/net-mgmt/Makefile +++ b/net-mgmt/Makefile @@ -63,6 +63,7 @@ SUBDIR += gps SUBDIR += grepcidr SUBDIR += grepip + SUBDIR += horde-nic SUBDIR += icmpmonitor SUBDIR += icmpquery SUBDIR += ifgraph diff --git a/net-mgmt/horde-nic/Makefile b/net-mgmt/horde-nic/Makefile new file mode 100644 index 000000000000..daef49645ce8 --- /dev/null +++ b/net-mgmt/horde-nic/Makefile @@ -0,0 +1,82 @@ +# Ports collection makefile for: nic +# Date created: Fri Mar 16, 2007 +# Whom: Beech Rintoul <beech@alaskaparadise.com> +# +# $FreeBSD$ +# + +PORTNAME= nic +DISTVERSION= 0.1.beta20070316 +CATEGORIES= net-mgmt +MASTER_SITES= CENKES http://freebsd.alaskaparadise.com/source/ +PKGNAMEPREFIX= horde- + +MAINTAINER= beech@alaskaparadise.com +COMMENT= Very basic network service monitor + +RUN_DEPENDS+= ${LOCALBASE}/${LHORDEDIR}/rpc.php:${PORTSDIR}/www/horde-base + +NO_BUILD= yes +USE_APACHE= 1.3+ # needed to test APACHE_VERSION +USE_GETTEXT= yes +REINPLACE_ARGS= -i "" + +PORTDOCS= CHANGES CREDITS INSTALL TODO README +CONFFILE= conf.xml .htaccess +SUB_DIRS= config lib locale po scripts templates themes + +LHORDEDIR?= www/horde +LNICDIR= ${LHORDEDIR}/nic +PEARDIR?= ${LOCALBASE}/share/pear + +PLIST_SUB= NICDIR=${LNICDIR} HORDE_INC=${HORDE_INC:S|^${LOCALBASE}/||} +PKGMESSAGE= ${WRKDIR}/pkg-message +PKGDEINSTALL= ${WRKDIR}/pkg-deinstall +SUB_FILES= pkg-message pkg-install pkg-deinstall +SUB_LIST= NICDIR=${NICDIR} PORTSDIR=${PORTSDIR} CONFDIR=${CONFDIR} + +NICDIR= ${PREFIX}/${LNICDIR} +CONFDIR= ${NICDIR}/config + +HOSTNAME?= `/bin/hostname` +SERVOS?= ${OPSYS}-${OSREL} + +PORTREV_H?= ${LOCALBASE}/include/c-client/portrevision.h + +.include <bsd.port.pre.mk> + +.if ${APACHE_VERSION} >= 20 +HORDE_INC= ${LOCALBASE}/etc/apache${APACHE_VERSION:S/20/2/}/Includes/ +.else +HORDE_INC= ${LOCALBASE}/etc/horde/ +.endif + +post-extract: + @${MV} ${WRKSRC}/README ${WRKSRC}/docs/ + +pre-configure: + @${REINPLACE_CMD} -e "s:/usr/local:${LOCALBASE}:" ${WRKSRC}/config/conf.xml + @${SED} -e "s:/home/httpd/html/horde/nic:${NICDIR}:" \ + ${FILESDIR}/httpd.conf.nic > ${WRKDIR}/httpd-nic.conf + +do-install: + @${INSTALL} -d ${NICDIR}/ + @${CP} -Rp ${SUB_DIRS:S|^|${WRKSRC}/|} ${NICDIR}/ + @${CP} -p ${WRKSRC}/*.php ${NICDIR}/ + @${INSTALL_DATA} ${WRKSRC}/config/conf.xml ${CONFDIR}/ + @${INSTALL_DATA} ${WRKDIR}/httpd-nic.conf ${HORDE_INC}/ + @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${NICDIR}/ + @${CHMOD} -R o-rwx ${CONFDIR}/ +.if !defined(NOPORTDOCS) + @${INSTALL} -d ${DOCSDIR}/ + @${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/docs/|} ${DOCSDIR}/ + @${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}." +.endif + +post-install: + @${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + @${ECHO_MSG} + @${CAT} ${PKGMESSAGE} + @${ECHO_MSG} + +.include <bsd.port.post.mk> diff --git a/net-mgmt/horde-nic/distinfo b/net-mgmt/horde-nic/distinfo new file mode 100644 index 000000000000..dd29029314f8 --- /dev/null +++ b/net-mgmt/horde-nic/distinfo @@ -0,0 +1,3 @@ +MD5 (nic-0.1.beta20070316.tar.gz) = 2146e8f4bf0e43887d7c39688b244529 +SHA256 (nic-0.1.beta20070316.tar.gz) = 270e4c50e929faafd064a3e297e62212013b636561469f2091b3c9e2954dba1b +SIZE (nic-0.1.beta20070316.tar.gz) = 204369 diff --git a/net-mgmt/horde-nic/files/httpd.conf.nic b/net-mgmt/horde-nic/files/httpd.conf.nic new file mode 100644 index 000000000000..29a493425a83 --- /dev/null +++ b/net-mgmt/horde-nic/files/httpd.conf.nic @@ -0,0 +1,31 @@ +# This is included in Apache's httpd.conf for nic +# +# For security, don't serve pages from the nic configuration and +# library directories. +# +<Directory "/home/httpd/html/horde/nic/config"> + order deny,allow + deny from all +</Directory> +<Directory "/home/httpd/html/horde/nic/lib"> + order deny,allow + deny from all +</Directory> +<Directory "/home/httpd/html/horde/nic/locale"> + order deny,allow + deny from all +</Directory> +<Directory "/home/httpd/html/horde/nic/po"> + order deny,allow + deny from all +</Directory> +<Directory "/home/httpd/html/horde/nic/scripts"> + order deny,allow + deny from all +</Directory> +<Directory "/home/httpd/html/horde/nic/templates"> + order deny,allow + deny from all +</Directory> +# End of nic configuration ================ + diff --git a/net-mgmt/horde-nic/files/pkg-deinstall.in b/net-mgmt/horde-nic/files/pkg-deinstall.in new file mode 100644 index 000000000000..1ec68c56a52f --- /dev/null +++ b/net-mgmt/horde-nic/files/pkg-deinstall.in @@ -0,0 +1,24 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Backup trean config files, if needed. + +if [ x$2 != xDEINSTALL ]; then + exit +fi + +if [ -z "${PACKAGE_BUILDING}" ]; then + for cf in `ls %%NICDIR%%/config/*php`; do + diff -bBqw $cf $cf.dist >/dev/null 2>&1 + case $? in + 0) # original config file, delete it + rm -f $cf + ;; + 1) # config file has been updated, leave it alone + ;; + *) # not found? + ;; + esac + done +fi diff --git a/net-mgmt/horde-nic/files/pkg-install.in b/net-mgmt/horde-nic/files/pkg-install.in new file mode 100644 index 000000000000..d75112eb3810 --- /dev/null +++ b/net-mgmt/horde-nic/files/pkg-install.in @@ -0,0 +1,24 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# + +PATH=/usr/sbin:/usr/bin:/bin ; export PATH + +case $2 in + PRE-INSTALL) + ;; + + POST-INSTALL) + if [ -z "${PACKAGE_BUILDING}" ]; then + # Copy over sample config files unless they already exist + + for cf in `ls %%NICDIR%%/config/*.dist | sed -e 's/\.dist//g'`; do + if [ ! -f $cf ]; then + cp -p $cf.dist $cf + fi + done + fi + ;; +esac diff --git a/net-mgmt/horde-nic/files/pkg-message.in b/net-mgmt/horde-nic/files/pkg-message.in new file mode 100644 index 000000000000..8fb0fff164d7 --- /dev/null +++ b/net-mgmt/horde-nic/files/pkg-message.in @@ -0,0 +1,11 @@ +************************************************************************ +NIC has been installed in %%NICDIR%% with your blank +configuration files. + +Nic must be configured; if not, see `pkg_info -D -x horde'. + +Finally, you must login to Horde as a Horde Administrator to finish the +configuration. + +To protect your configuration files, you have to restart Apache. +************************************************************************ diff --git a/net-mgmt/horde-nic/pkg-descr b/net-mgmt/horde-nic/pkg-descr new file mode 100644 index 000000000000..baefb8cfc253 --- /dev/null +++ b/net-mgmt/horde-nic/pkg-descr @@ -0,0 +1,3 @@ +Nic is a basic network for Horde. + +WWW: http://horde.org/nic/ diff --git a/net-mgmt/horde-nic/pkg-plist b/net-mgmt/horde-nic/pkg-plist new file mode 100644 index 000000000000..55fc1d21e768 --- /dev/null +++ b/net-mgmt/horde-nic/pkg-plist @@ -0,0 +1,86 @@ +%%NICDIR%%/config/.cvsignore +%%NICDIR%%/config/conf.xml +%%NICDIR%%/config/devices.php.dist +%%NICDIR%%/config/prefs.php.dist +%%NICDIR%%/graph.php +%%NICDIR%%/index.php +%%NICDIR%%/lib/Device.php +%%NICDIR%%/lib/Device/SNMP.php +%%NICDIR%%/lib/Device/SNMPCustom.php +%%NICDIR%%/lib/Device/apache.php +%%NICDIR%%/lib/Device/dns.php +%%NICDIR%%/lib/Device/imap.php +%%NICDIR%%/lib/Device/jetdirect.php +%%NICDIR%%/lib/Device/mysql.php +%%NICDIR%%/lib/Device/pop3.php +%%NICDIR%%/lib/Device/smtp.php +%%NICDIR%%/lib/Device/squid.php +%%NICDIR%%/lib/Device/win2k.php +%%NICDIR%%/lib/Device/www.php +%%NICDIR%%/lib/Device/www_secure.php +%%NICDIR%%/lib/Device/xi1510.php +%%NICDIR%%/lib/Nic.php +%%NICDIR%%/lib/Status.php +%%NICDIR%%/lib/Status/sql.php +%%NICDIR%%/lib/Storage.php +%%NICDIR%%/lib/Storage/rrd.php +%%NICDIR%%/lib/Storage/sql.php +%%NICDIR%%/lib/base.php +%%NICDIR%%/lib/version.php +%%NICDIR%%/locale/de_DE/LC_MESSAGES/nic.mo +%%NICDIR%%/locale/en_US/help.xml +%%NICDIR%%/locale/es_ES/LC_MESSAGES/nic.mo +%%NICDIR%%/locale/fi_FI/LC_MESSAGES/nic.mo +%%NICDIR%%/po/de_DE.po +%%NICDIR%%/po/es_ES.po +%%NICDIR%%/po/fi_FI.po +%%NICDIR%%/po/nic.pot +%%NICDIR%%/rrdgraph.php +%%NICDIR%%/rrdviews.php +%%NICDIR%%/scripts/.htaccess +%%NICDIR%%/scripts/createRRDFiles.php +%%NICDIR%%/scripts/sql/nic.sql +%%NICDIR%%/scripts/statusMonitor.php +%%NICDIR%%/status.php +%%NICDIR%%/subsystem.php +%%NICDIR%%/templates/common-header.inc +%%NICDIR%%/templates/device/footer.inc +%%NICDIR%%/templates/device/header.inc +%%NICDIR%%/templates/device/row-graph.inc +%%NICDIR%%/templates/device/row.inc +%%NICDIR%%/templates/device/rrd-graph.inc +%%NICDIR%%/templates/menu.inc +%%NICDIR%%/templates/status/header.inc +%%NICDIR%%/templates/status/list-footer.inc +%%NICDIR%%/templates/status/list-header.inc +%%NICDIR%%/templates/status/list-row.inc +%%NICDIR%%/templates/subsystem/footer.inc +%%NICDIR%%/templates/subsystem/subsystem.inc +%%NICDIR%%/test.php +%%NICDIR%%/themes/graphics/favicon.ico +%%NICDIR%%//themes/graphics/nic.png +%%NICDIR%%/themes/screen.css +%%HORDE_INC%%httpd-nic.conf +@dirrm %%NICDIR%%/themes/graphics +@dirrm %%NICDIR%%/themes +@dirrm %%NICDIR%%/templates/subsystem +@dirrm %%NICDIR%%/templates/status +@dirrm %%NICDIR%%/templates/device +@dirrm %%NICDIR%%/templates +@dirrm %%NICDIR%%/scripts/sql +@dirrm %%NICDIR%%/scripts +@dirrm %%NICDIR%%/po +@dirrm %%NICDIR%%/locale/fi_FI/LC_MESSAGES +@dirrm %%NICDIR%%/locale/fi_FI +@dirrm %%NICDIR%%/locale/es_ES/LC_MESSAGES +@dirrm %%NICDIR%%/locale/es_ES +@dirrm %%NICDIR%%/locale/en_US +@dirrm %%NICDIR%%/locale/de_DE/LC_MESSAGES +@dirrm %%NICDIR%%/locale/de_DE +@dirrm %%NICDIR%%/locale +@dirrm %%NICDIR%%/lib/Storage +@dirrm %%NICDIR%%/lib/Status +@dirrm %%NICDIR%%/lib/Device +@dirrm %%NICDIR%%/lib +@dirrm %%NICDIR%%/config +@dirrm %%NICDIR%% |