aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/argus-monitor
diff options
context:
space:
mode:
authorohauer <ohauer@FreeBSD.org>2012-10-08 02:44:44 +0800
committerohauer <ohauer@FreeBSD.org>2012-10-08 02:44:44 +0800
commitda05bf94f2d4f1f3697d91cac09dfa6b14408054 (patch)
treefdb6ce92a2bc29c846b03b3fe6ec3984867bf7d4 /net-mgmt/argus-monitor
parentc48fed1985da82859feb38b0f54fb27578b3316c (diff)
downloadfreebsd-ports-gnome-da05bf94f2d4f1f3697d91cac09dfa6b14408054.tar.gz
freebsd-ports-gnome-da05bf94f2d4f1f3697d91cac09dfa6b14408054.tar.zst
freebsd-ports-gnome-da05bf94f2d4f1f3697d91cac09dfa6b14408054.zip
- rewrite for options NG framework
- /USE_APACHE/USE_APACHE_RUN/ - make usage of ETCDIR, WWWDIR instead PREFIX/(etc|www)/PORTNAME - add pkg-install script to adjust directory file mode, else they differ when installed by package - use @dirrmtry to preserve existing stats ... - bump PORTREVISION PR: 171475 Submitted by: ohauer Approved by: (old) maintainer timeout (port was moved today to ports@)
Diffstat (limited to 'net-mgmt/argus-monitor')
-rw-r--r--net-mgmt/argus-monitor/Makefile55
-rw-r--r--net-mgmt/argus-monitor/files/apache.conf.in10
-rw-r--r--net-mgmt/argus-monitor/files/argusd.in10
-rw-r--r--net-mgmt/argus-monitor/files/pkg-install.in22
-rw-r--r--net-mgmt/argus-monitor/files/pkg-message.in7
-rw-r--r--net-mgmt/argus-monitor/pkg-plist132
6 files changed, 131 insertions, 105 deletions
diff --git a/net-mgmt/argus-monitor/Makefile b/net-mgmt/argus-monitor/Makefile
index 704bca9a17e5..401e64a5d93f 100644
--- a/net-mgmt/argus-monitor/Makefile
+++ b/net-mgmt/argus-monitor/Makefile
@@ -3,7 +3,7 @@
PORTNAME= argus-monitor
PORTVERSION= 20100109
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= net-mgmt
MASTER_SITES= http://www.tcp4me.com/code/argus-archive/
DISTNAME= argus-dev-${PORTVERSION}
@@ -12,7 +12,7 @@ EXTRACT_SUFX= .tgz
MAINTAINER= ports@FreeBSD.org
COMMENT= Argus - The All Seeing System and Network Monitoring Software
-SUB_FILES= pkg-message apache.conf
+SUB_FILES= pkg-message apache.conf pkg-install
SUB_LIST= PORTNAME=${PORTNAME} APACHEETCDIR=${APACHEETCDIR}
PKGMESSAGE= ${WRKDIR}/pkg-message
EXTRA_PATCHES= ${FILESDIR}/patch.001
@@ -23,44 +23,49 @@ WRKSRC= ${WRKDIR}/${DISTNAME}
USE_PERL5= yes
USE_RC_SUBR= argusd
HAS_CONFIGURE= yes
-USE_APACHE= 22+
+USE_APACHE_RUN= 22+
CONFIGURE_SCRIPT= Configure
-CONFIGURE_ARGS= --bin_dir=${PREFIX}/bin --sbin_dir=${PREFIX}/sbin \
- --lib_dir=${PREFIX}/lib/argus-monitor --data_dir=${PREFIX}/etc/argus-monitor \
- --cgi_dir=${PREFIX}/www/${PORTNAME}/cgi-bin
-OPTIONS= QPAGE "qpage support" Off \
- FPING "fping support" Off \
- GD "GD graphics support" On
+OPTIONS_DEFINE= QPAGE FPING GD
+OPTIONS_DEFAULT=GD
-.include <bsd.port.pre.mk>
+QPAGE_DESC= qpage support
+FPING_DESC= fping support
-.if defined(WITH_QPAGE)
-RUN_DEPENDS+= qpage:${PORTSDIR}/comms/qpage
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MQPAGE}
BUILD_DEPENDS+= qpage:${PORTSDIR}/comms/qpage
+RUN_DEPENDS+= qpage:${PORTSDIR}/comms/qpage
.endif
-.if defined(WITH_FPING)
-RUN_DEPENDS+= fping:${PORTSDIR}/net/fping
+.if ${PORT_OPTIONS:MFPING}
BUILD_DEPENDS+= fping:${PORTSDIR}/net/fping
+RUN_DEPENDS+= fping:${PORTSDIR}/net/fping
.endif
-.if !defined(WITHOUT_GD)
+.if ${PORT_OPTIONS:MGD}
BUILD_DEPENDS+= p5-GD>=0:${PORTSDIR}/graphics/p5-GD
RUN_DEPENDS+= p5-GD>=0:${PORTSDIR}/graphics/p5-GD
.endif
+CONFIGURE_ARGS= --bin_dir=${PREFIX}/bin \
+ --sbin_dir=${PREFIX}/sbin \
+ --lib_dir=${PREFIX}/lib/argus-monitor \
+ --data_dir=${ETCDIR} \
+ --cgi_dir=${WWWDIR}/cgi-bin
+
post-install:
- ${MKDIR} ${PREFIX}/www/${PORTNAME} ${PREFIX}/www/${PORTNAME}/docroot ${PREFIX}/www/${PORTNAME}/docroot/img ${PREFIX}/www/${PORTNAME}/docroot/sound ${PREFIX}/etc/argus-monitor/notify
- ${CP} ${WRKSRC}/misc/argus.css ${WRKSRC}/misc/argus.js ${PREFIX}/www/${PORTNAME}/docroot
- ${CP} ${WRKSRC}/misc/argus.logo.gif ${WRKSRC}/misc/nospkr.gif ${WRKSRC}/misc/sad.gif ${WRKSRC}/misc/sadred.gif ${WRKSRC}/misc/smile.gif ${PREFIX}/www/${PORTNAME}/docroot/img
- ${CP} ${WRKSRC}/misc/whoopwhoop.wav ${PREFIX}/www/${PORTNAME}/docroot/sound
- ${TOUCH} ${PREFIX}/etc/argus-monitor/notno ${PREFIX}/etc/argus-monitor/log
- ${CHMOD} 755 ${PREFIX}/www/${PORTNAME} ${PREFIX}/www/${PORTNAME}/docroot ${PREFIX}/www/${PORTNAME}/docroot/img ${PREFIX}/www/${PORTNAME}/docroot/sound ${PREFIX}/etc/argus-monitor/notify
- ${CHMOD} 644 ${PREFIX}/www/${PORTNAME}/docroot/argus.* ${PREFIX}/www/${PORTNAME}/docroot/img/*.gif ${PREFIX}/www/${PORTNAME}/docroot/sound/*.wav ${PREFIX}/etc/argus-monitor/notno ${PREFIX}/etc/argus-monitor/log
- ${MKDIR} ${PREFIX}/${APACHEETCDIR}/Includes
- ${INSTALL_DATA} ${WRKDIR}/apache.conf ${PREFIX}/${APACHEETCDIR}/Includes/${PORTNAME}.conf.sample
+ @${INSTALL} -m 755 -d ${WWWDIR} ${WWWDIR}/docroot ${WWWDIR}/docroot/img ${WWWDIR}/docroot/sound ${ETCDIR}/notify
+ @${CP} ${WRKSRC}/misc/argus.css ${WRKSRC}/misc/argus.js ${WWWDIR}/docroot/
+ @${CP} ${WRKSRC}/misc/argus.logo.gif ${WRKSRC}/misc/nospkr.gif ${WRKSRC}/misc/sad.gif \
+ ${WRKSRC}/misc/sadred.gif ${WRKSRC}/misc/smile.gif ${WWWDIR}/docroot/img/
+ @${CP} ${WRKSRC}/misc/whoopwhoop.wav ${WWWDIR}/docroot/sound/
+ @${TOUCH} ${ETCDIR}/notno ${ETCDIR}/log
+ @${MKDIR} ${PREFIX}/${APACHEETCDIR}/Includes
+ @${INSTALL_DATA} ${WRKDIR}/apache.conf ${PREFIX}/${APACHEETCDIR}/Includes/${PORTNAME}.conf.sample
+ @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${ECHO_CMD}
@${CAT} ${PKGMESSAGE}
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/net-mgmt/argus-monitor/files/apache.conf.in b/net-mgmt/argus-monitor/files/apache.conf.in
index 9462ce479e5c..9bc784c40917 100644
--- a/net-mgmt/argus-monitor/files/apache.conf.in
+++ b/net-mgmt/argus-monitor/files/apache.conf.in
@@ -4,10 +4,10 @@
# cgi-bin directory; we single this URL out from
# the normal alias parsing below.
#
-ScriptAliasMatch ^/argus/$ "%%PREFIX%%/www/%%PORTNAME%%/cgi-bin/arguscgi"
-ScriptAlias ^/argus/cgi-bin/$ "%%PREFIX%%/www/%%PORTNAME%%/cgi-bin/"
+ScriptAliasMatch ^/argus/$ "%%WWWDIR%%/cgi-bin/arguscgi"
+ScriptAlias ^/argus/cgi-bin/$ "%%WWWDIR%%/cgi-bin/"
-<Directory "%%PREFIX%%/www/%%PORTNAME%%/cgi-bin">
+<Directory "%%WWWDIR%%/cgi-bin">
options ExecCGI
AllowOverride none
allow from all
@@ -18,9 +18,9 @@ ScriptAlias ^/argus/cgi-bin/$ "%%PREFIX%%/www/%%PORTNAME%%/cgi-bin/"
# /img/sad.gif, /img/nospkr.gif and on top level /argus.css and
# optionally /argus.js.
#
-Alias /argus/ "%%PREFIX%%/www/%%PORTNAME%%/docroot/"
+Alias /argus/ "%%WWWDIR%%/docroot/"
-<Directory "%%PREFIX%%/www/%%PORTNAME%%/docroot">
+<Directory "%%WWWDIR%%/docroot">
options none
AllowOverride none
allow from all
diff --git a/net-mgmt/argus-monitor/files/argusd.in b/net-mgmt/argus-monitor/files/argusd.in
index d44f9425b538..44aa956901a0 100644
--- a/net-mgmt/argus-monitor/files/argusd.in
+++ b/net-mgmt/argus-monitor/files/argusd.in
@@ -17,14 +17,14 @@ rcvar=argusd_enable
command=%%PREFIX%%/sbin/${name}
# pidfile=/var/run/${name}.pid
required_files="
- %%PREFIX%%/etc/argus-monitor/log \
- %%PREFIX%%/etc/argus-monitor/notno \
- %%PREFIX%%/etc/argus-monitor/config \
- %%PREFIX%%/etc/argus-monitor/users"
+ %%ETCDIR%%/log \
+ %%ETCDIR%%/notno \
+ %%ETCDIR%%/config \
+ %%ETCDIR%%/users"
stop_cmd="%%PREFIX%%/sbin/argusctl shutdown reason=\"rc.argusd stop\""
-start_precmd="/usr/bin/touch %%PREFIX%%/etc/argus-monitor/log"
+start_precmd="/usr/bin/touch %%ETCDIR%%/log"
extra_commands="console hup"
console_cmd="%%PREFIX%%/sbin/argusctl -k console"
hup_cmd="%%PREFIX%%/sbin/argusctl -k hup"
diff --git a/net-mgmt/argus-monitor/files/pkg-install.in b/net-mgmt/argus-monitor/files/pkg-install.in
new file mode 100644
index 000000000000..ed62b19cb8e1
--- /dev/null
+++ b/net-mgmt/argus-monitor/files/pkg-install.in
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# $FreeBSD$
+
+ETCDIR=%%ETCDIR%%
+WWWDIR=%%WWWDIR%%
+
+if [ "$2" = "POST-INSTALL" ]; then
+ [ ! -d ${ETCDIR}/gcache ] && mkdir ${ETCDIR}/gcache
+ [ ! -d ${ETCDIR}/gdata ] && mkdir ${ETCDIR}/gdata
+ [ ! -d ${ETCDIR}/html ] && mkdir ${ETCDIR}/html
+ [ ! -d ${ETCDIR}/locale ] && mkdir ${ETCDIR}/locale
+ [ ! -d ${ETCDIR}/perl ] && mkdir ${ETCDIR}/perl
+
+ chmod a+rwx ${ETCDIR}/gcache ${ETCDIR}/gdata ${ETCDIR}/perl
+ chmod a+rx ${ETCDIR}/locale
+ chmod a+r ${ETCDIR}/html
+ chmod 755 ${WWWDIR} ${WWWDIR}/docroot ${WWWDIR}/docroot/img \
+ ${WWWDIR}/docroot/sound ${ETCDIR} ${ETCDIR}/notify
+ chmod 644 ${WWWDIR}/docroot/argus.* ${WWWDIR}/docroot/img/*.gif \
+ ${WWWDIR}/docroot/sound/*.wav ${ETCDIR}/notno ${ETCDIR}/log
+fi
diff --git a/net-mgmt/argus-monitor/files/pkg-message.in b/net-mgmt/argus-monitor/files/pkg-message.in
index 2d819804c92f..ac3ca90e4d3d 100644
--- a/net-mgmt/argus-monitor/files/pkg-message.in
+++ b/net-mgmt/argus-monitor/files/pkg-message.in
@@ -2,16 +2,15 @@
An apache configuration file has been created which maps /%%PORTNAME%%/:
%%PREFIX%%/%%APACHEETCDIR%%/Includes/%%PORTNAME%%.conf.sample
- %%PREFIX%%/%%APACHEETCDIR%%/Includes/%%PORTNAME%%.conf.sample
Edit it, move it in place. Next move and edit
- %%PREFIX%%/etc/%%PORTNAME%%/config.example
- %%PREFIX%%/etc/%%PORTNAME%%/users.example
+ %%ETCDIR%%/config.example
+ %%ETCDIR%%/users.example
into place, then restart apache.
-Ensure that ensure that argus_enable=YES is set in your rc.conf prior to
+Ensure that argus_enable=YES is set in your rc.conf prior to
starting the argusd daemon.
================================================================================
diff --git a/net-mgmt/argus-monitor/pkg-plist b/net-mgmt/argus-monitor/pkg-plist
index f3e489987880..9be607f1070f 100644
--- a/net-mgmt/argus-monitor/pkg-plist
+++ b/net-mgmt/argus-monitor/pkg-plist
@@ -1,29 +1,44 @@
bin/argus-config
-etc/argus-monitor/config.example
-etc/argus-monitor/locale/de_DE
-etc/argus-monitor/locale/el_gr
-etc/argus-monitor/locale/fr_fr
-etc/argus-monitor/locale/lt_LT
-etc/argus-monitor/locale/nl_NL
-etc/argus-monitor/locale/ru_RU
-etc/argus-monitor/locale/piglatin
-etc/argus-monitor/locale/sp_ar
-etc/argus-monitor/locale/template
-etc/argus-monitor/log
-etc/argus-monitor/notno
-etc/argus-monitor/users.example
+%%APACHEETCDIR%%/Includes/argus-monitor.conf.sample
+%%ETCDIR%%/config.example
+%%ETCDIR%%/locale/de_DE
+%%ETCDIR%%/locale/el_gr
+%%ETCDIR%%/locale/fr_fr
+%%ETCDIR%%/locale/lt_LT
+%%ETCDIR%%/locale/nl_NL
+%%ETCDIR%%/locale/piglatin
+%%ETCDIR%%/locale/ru_RU
+%%ETCDIR%%/locale/sp_ar
+%%ETCDIR%%/locale/template
+%%ETCDIR%%/log
+%%ETCDIR%%/notno
+%%ETCDIR%%/users.example
lib/argus-monitor/Alias.pm
lib/argus-monitor/Argus/Agent.pm
+lib/argus-monitor/Argus/Archive.pm
+lib/argus-monitor/Argus/Archivist.pm
lib/argus-monitor/Argus/Asterisk.pm
+lib/argus-monitor/Argus/Compute.pm
lib/argus-monitor/Argus/Ctl.pm
lib/argus-monitor/Argus/Encode.pm
+lib/argus-monitor/Argus/Freeswitch.pm
+lib/argus-monitor/Argus/Graph/Data.pm
+lib/argus-monitor/Argus/HashDir.pm
lib/argus-monitor/Argus/IP.pm
+lib/argus-monitor/Argus/MonEl/Expand.pm
+lib/argus-monitor/Argus/MonEl/Noise.pm
+lib/argus-monitor/Argus/MonEl/Trans.pm
lib/argus-monitor/Argus/RPC.pm
lib/argus-monitor/Argus/RPC/TCP.pm
lib/argus-monitor/Argus/RPC/UDP.pm
+lib/argus-monitor/Argus/ReadConfig.pm
lib/argus-monitor/Argus/SIP.pm
lib/argus-monitor/Argus/SIP/TCP.pm
lib/argus-monitor/Argus/SIP/UDP.pm
+lib/argus-monitor/Argus/SNMP.pm
+lib/argus-monitor/Argus/SNMP/Helper.pm
+lib/argus-monitor/Argus/Schedule.pm
+lib/argus-monitor/Argus/Web/Overview.pm
lib/argus-monitor/Artistic
lib/argus-monitor/BaseIO.pm
lib/argus-monitor/Chart/Strip.pm
@@ -32,11 +47,20 @@ lib/argus-monitor/Conf.pm
lib/argus-monitor/Configable.pm
lib/argus-monitor/Control.pm
lib/argus-monitor/Cron.pm
+lib/argus-monitor/DARP.pm
+lib/argus-monitor/DARP/Conf.pm
+lib/argus-monitor/DARP/Master.pm
+lib/argus-monitor/DARP/Misc.pm
+lib/argus-monitor/DARP/Service.pm
+lib/argus-monitor/DARP/Slave.pm
+lib/argus-monitor/DARP/Watch.pm
lib/argus-monitor/DNS.pm
lib/argus-monitor/DNS/TCP.pm
lib/argus-monitor/DNS/UDP.pm
lib/argus-monitor/DataBase.pm
lib/argus-monitor/Doc.pm
+lib/argus-monitor/Encoding/BER.pm
+lib/argus-monitor/Encoding/BER/SNMP.pm
lib/argus-monitor/Error.pm
lib/argus-monitor/Graph.pm
lib/argus-monitor/Group.pm
@@ -77,68 +101,44 @@ lib/argus-monitor/web_notify.pl
lib/argus-monitor/web_override.pl
lib/argus-monitor/web_page.pl
lib/argus-monitor/web_utils.pl
-lib/argus-monitor/Argus/HashDir.pm
-lib/argus-monitor/Argus/MonEl/Expand.pm
-lib/argus-monitor/Argus/MonEl/Noise.pm
-lib/argus-monitor/Argus/MonEl/Trans.pm
-lib/argus-monitor/Argus/Archivist.pm
-lib/argus-monitor/Argus/Archive.pm
-lib/argus-monitor/Argus/Web/Overview.pm
-lib/argus-monitor/Argus/ReadConfig.pm
-lib/argus-monitor/Argus/Schedule.pm
-lib/argus-monitor/Argus/SNMP.pm
-lib/argus-monitor/Argus/SNMP/Helper.pm
-lib/argus-monitor/Argus/Freeswitch.pm
-lib/argus-monitor/Argus/Compute.pm
-lib/argus-monitor/Argus/Graph/Data.pm
-lib/argus-monitor/Encoding/BER.pm
-lib/argus-monitor/Encoding/BER/SNMP.pm
-lib/argus-monitor/DARP.pm
-lib/argus-monitor/DARP/Master.pm
-lib/argus-monitor/DARP/Slave.pm
-lib/argus-monitor/DARP/Service.pm
-lib/argus-monitor/DARP/Conf.pm
-lib/argus-monitor/DARP/Watch.pm
-lib/argus-monitor/DARP/Misc.pm
lib/argus-monitor/web_web20.pl
sbin/argus-agent
sbin/argusctl
sbin/argusd
-%%APACHEETCDIR%%/Includes/argus-monitor.conf.sample
-www/argus-monitor/docroot/argus.css
-www/argus-monitor/docroot/argus.js
-www/argus-monitor/docroot/img/argus.logo.gif
-www/argus-monitor/docroot/img/nospkr.gif
-www/argus-monitor/docroot/img/sad.gif
-www/argus-monitor/docroot/img/sadred.gif
-www/argus-monitor/docroot/img/smile.gif
-www/argus-monitor/docroot/sound/whoopwhoop.wav
-www/argus-monitor/cgi-bin/arguscgi
-www/argus-monitor/cgi-bin/argusvxml
-@dirrmtry %%APACHEETCDIR%%/Includes
+%%WWWDIR%%/cgi-bin/arguscgi
+%%WWWDIR%%/cgi-bin/argusvxml
+%%WWWDIR%%/docroot/argus.css
+%%WWWDIR%%/docroot/argus.js
+%%WWWDIR%%/docroot/img/argus.logo.gif
+%%WWWDIR%%/docroot/img/nospkr.gif
+%%WWWDIR%%/docroot/img/sad.gif
+%%WWWDIR%%/docroot/img/sadred.gif
+%%WWWDIR%%/docroot/img/smile.gif
+%%WWWDIR%%/docroot/sound/whoopwhoop.wav
+@dirrm %%WWWDIR%%/docroot/sound
+@dirrm %%WWWDIR%%/docroot/img
+@dirrm %%WWWDIR%%/docroot
+@dirrm %%WWWDIR%%/cgi-bin
+@dirrmtry %%WWWDIR%%
+@dirrm lib/argus-monitor/Encoding/BER
+@dirrm lib/argus-monitor/Encoding
@dirrm lib/argus-monitor/DNS
+@dirrm lib/argus-monitor/DARP
@dirrm lib/argus-monitor/Chart
+@dirrm lib/argus-monitor/Argus/Web
+@dirrm lib/argus-monitor/Argus/SNMP
@dirrm lib/argus-monitor/Argus/SIP
@dirrm lib/argus-monitor/Argus/RPC
@dirrm lib/argus-monitor/Argus/MonEl
-@dirrm lib/argus-monitor/Argus/Web
-@dirrm lib/argus-monitor/Argus/SNMP
@dirrm lib/argus-monitor/Argus/Graph
@dirrm lib/argus-monitor/Argus
-@dirrm lib/argus-monitor/DARP
-@dirrm lib/argus-monitor/Encoding/BER
-@dirrm lib/argus-monitor/Encoding
@dirrm lib/argus-monitor
-@dirrm etc/argus-monitor/stats
-@dirrm etc/argus-monitor/perl
-@dirrm etc/argus-monitor/notify
-@dirrm etc/argus-monitor/locale
-@dirrm etc/argus-monitor/html
-@dirrm etc/argus-monitor/gdata
-@dirrm etc/argus-monitor/gcache
-@dirrm etc/argus-monitor
-@dirrm www/argus-monitor/docroot/img
-@dirrm www/argus-monitor/docroot/sound
-@dirrm www/argus-monitor/docroot
-@dirrm www/argus-monitor/cgi-bin
-@dirrm www/argus-monitor
+@dirrmtry %%ETCDIR%%/stats
+@dirrmtry %%ETCDIR%%/perl
+@dirrmtry %%ETCDIR%%/notify
+@dirrm %%ETCDIR%%/locale
+@dirrmtry %%ETCDIR%%/html
+@dirrmtry %%ETCDIR%%/gdata
+@dirrmtry %%ETCDIR%%/gcache
+@dirrmtry %%ETCDIR%%
+@dirrmtry %%APACHEETCDIR%%/Includes