1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-28 10:08:24 +00:00

Add port net-mgmt/horde-nic - a very simple network service monitor

WWW: http://horde.org/nic/

PR:		ports/110541
Submitted by:	Beech Rintoul <beech@alaskaparadise.com>
This commit is contained in:
Andrew Pantyukhin 2007-03-19 22:33:48 +00:00
parent 0944fcdafb
commit 74a05dfa3b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=187748
9 changed files with 265 additions and 0 deletions

View File

@ -63,6 +63,7 @@
SUBDIR += gps
SUBDIR += grepcidr
SUBDIR += grepip
SUBDIR += horde-nic
SUBDIR += icmpmonitor
SUBDIR += icmpquery
SUBDIR += ifgraph

View File

@ -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>

View File

@ -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

View File

@ -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 ================

View File

@ -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

View File

@ -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

View File

@ -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.
************************************************************************

View File

@ -0,0 +1,3 @@
Nic is a basic network for Horde.
WWW: http://horde.org/nic/

View File

@ -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%%