aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/pnp
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2008-08-18 23:42:50 +0800
committerpav <pav@FreeBSD.org>2008-08-18 23:42:50 +0800
commit4527a07610451ee54e302053f2f8586ce96cf6de (patch)
tree88e30dba14fce8be83d490f3926160074141f899 /net-mgmt/pnp
parent132c9d8e34abdc5195a6ad773d41ab75de4891d1 (diff)
downloadfreebsd-ports-gnome-4527a07610451ee54e302053f2f8586ce96cf6de.tar.gz
freebsd-ports-gnome-4527a07610451ee54e302053f2f8586ce96cf6de.tar.zst
freebsd-ports-gnome-4527a07610451ee54e302053f2f8586ce96cf6de.zip
- Correct dependencies, install manpage, fix directory permissions
Submitted by: Eygene Ryabinkin <rea-fbsd@codelabs.ru> (maintainer)
Diffstat (limited to 'net-mgmt/pnp')
-rw-r--r--net-mgmt/pnp/Makefile11
-rw-r--r--net-mgmt/pnp/files/patch-man::Makefile.in10
-rw-r--r--net-mgmt/pnp/files/patch-sample-config::Makefile.in55
-rw-r--r--net-mgmt/pnp/files/patch-scripts::Makefile.in34
-rw-r--r--net-mgmt/pnp/files/patch-share::Makefile.in68
-rw-r--r--net-mgmt/pnp/files/patch-src::Makefile.in12
-rw-r--r--net-mgmt/pnp/files/pkg-deinstall.in3
7 files changed, 169 insertions, 24 deletions
diff --git a/net-mgmt/pnp/Makefile b/net-mgmt/pnp/Makefile
index 37124d1771aa..5e63cebf36df 100644
--- a/net-mgmt/pnp/Makefile
+++ b/net-mgmt/pnp/Makefile
@@ -1,5 +1,5 @@
# New ports collection makefile for: pnp
-# Date created: unknown
+# Date created: 16 August 2008
# Whom: rea-fbsd@codelabs.ru
#
# $FreeBSD$
@@ -7,7 +7,7 @@
PORTNAME= pnp
PORTVERSION= 0.4.10
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net-mgmt
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= pnp4nagios
@@ -21,9 +21,10 @@ RUN_DEPENDS= ${LOCALBASE}/bin/rrdtool:${PORTSDIR}/databases/rrdtool \
OPTIONS= PDF "Use built-in fpdf library to produce PDF views" ON
-USE_PHP= yes
+USE_PHP= zlib gd xml
WANT_PHP_WEB= yes
USE_RC_SUBR= npcd.sh
+MAN1= pnpsender.1
NAGIOSDIR?= /var/spool/nagios
NAGIOSHTMURL?= /nagios
@@ -35,7 +36,6 @@ PNP_SPOOL= ${PNP_STATE}/perfspool
FPDF_DIR?= share/fpdf
.if defined(WITH_PDF)
-USE_PHP= zlib
.else
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-share::pnp::include::function.inc.php
.endif
@@ -85,6 +85,9 @@ post-patch:
.endfor
post-install:
+.for m in ${MAN1}
+ ${INSTALL_MAN} ${WRKSRC}/man/man1/${m} ${MAN1PREFIX}/man/man1/${m}
+.endfor
@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${CAT} ${PKGMESSAGE}
diff --git a/net-mgmt/pnp/files/patch-man::Makefile.in b/net-mgmt/pnp/files/patch-man::Makefile.in
new file mode 100644
index 000000000000..376ce217d910
--- /dev/null
+++ b/net-mgmt/pnp/files/patch-man::Makefile.in
@@ -0,0 +1,10 @@
+--- man/Makefile.in.orig 2008-08-18 18:45:56.000000000 +0400
++++ man/Makefile.in 2008-08-18 18:48:41.000000000 +0400
+@@ -36,7 +36,6 @@
+ devclean: distclean
+
+ install:
+- $(MAKE) install-basic
+
+ install-basic:
+ $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(MANDIR)/man1/
diff --git a/net-mgmt/pnp/files/patch-sample-config::Makefile.in b/net-mgmt/pnp/files/patch-sample-config::Makefile.in
index 74b8179e80b8..18ca7b983306 100644
--- a/net-mgmt/pnp/files/patch-sample-config::Makefile.in
+++ b/net-mgmt/pnp/files/patch-sample-config::Makefile.in
@@ -1,28 +1,53 @@
---- sample-config/Makefile.in.orig 2008-08-16 23:03:08.000000000 +0400
-+++ sample-config/Makefile.in 2008-08-16 23:04:53.000000000 +0400
-@@ -28,22 +28,18 @@
+--- sample-config/Makefile.in.orig 2008-06-18 12:02:38.000000000 +0400
++++ sample-config/Makefile.in 2008-08-18 18:50:24.000000000 +0400
+@@ -13,6 +13,9 @@
+
+ CP=@CP@
+
++DIRMODE=755
++FILEMODE=644
++
+ all html:
+
+ clean:
+@@ -28,26 +31,22 @@
devclean: distclean
install:
- -rm -f $(HTMLDIR)/conf/config.php
-
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)/check_commands
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)/pages
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)/check_commands
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)/pages
- $(INSTALL) -m 664 $(INSTALL_OPTS) pnp/config.php $(DESTDIR)$(CFGDIR)
- $(INSTALL) -m 664 $(INSTALL_OPTS) pnp/background.pdf $(DESTDIR)$(CFGDIR)
-+ $(INSTALL) -m 664 $(INSTALL_OPTS) pnp/config.php $(DESTDIR)$(CFGDIR)/config.php-sample
-+ $(INSTALL) -m 664 $(INSTALL_OPTS) pnp/background.pdf $(DESTDIR)$(CFGDIR)/background.pdf-sample
++ $(INSTALL) -m $(DIRMODE) $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)
++ $(INSTALL) -m $(DIRMODE) $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)/check_commands
++ $(INSTALL) -m $(DIRMODE) $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)/pages
++ $(INSTALL) -m $(FILEMODE) $(INSTALL_OPTS) pnp/config.php $(DESTDIR)$(CFGDIR)/config.php-sample
++ $(INSTALL) -m $(FILEMODE) $(INSTALL_OPTS) pnp/background.pdf $(DESTDIR)$(CFGDIR)/background.pdf-sample
install-config:
- -rm -f $(DESTDIR)$(HTMLDIR)/conf/config.php
-
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)/check_commands
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)/pages
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)/check_commands
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)/pages
++ $(INSTALL) -m $(DIRMODE) $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)
++ $(INSTALL) -m $(DIRMODE) $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)/check_commands
++ $(INSTALL) -m $(DIRMODE) $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)/pages
- $(INSTALL) -m 664 $(INSTALL_OPTS) pnp/config.php $(DESTDIR)$(CFGDIR)
-+ $(INSTALL) -m 664 $(INSTALL_OPTS) pnp/config.php $(DESTDIR)$(CFGDIR)/config.php-sample
- $(INSTALL) -m 664 $(INSTALL_OPTS) pnp/process_perfdata.cfg-sample $(DESTDIR)$(CFGDIR)
- $(INSTALL) -m 664 $(INSTALL_OPTS) pnp/rra.cfg-sample $(DESTDIR)$(CFGDIR)
- $(INSTALL) -m 664 $(INSTALL_OPTS) pnp/check_commands/check_nwstat.cfg-sample $(DESTDIR)$(CFGDIR)/check_commands
+- $(INSTALL) -m 664 $(INSTALL_OPTS) pnp/process_perfdata.cfg-sample $(DESTDIR)$(CFGDIR)
+- $(INSTALL) -m 664 $(INSTALL_OPTS) pnp/rra.cfg-sample $(DESTDIR)$(CFGDIR)
+- $(INSTALL) -m 664 $(INSTALL_OPTS) pnp/check_commands/check_nwstat.cfg-sample $(DESTDIR)$(CFGDIR)/check_commands
+- $(INSTALL) -m 664 $(INSTALL_OPTS) pnp/pages/web_traffic.cfg-sample $(DESTDIR)$(CFGDIR)/pages
++ $(INSTALL) -m $(FILEMODE) $(INSTALL_OPTS) pnp/config.php $(DESTDIR)$(CFGDIR)/config.php-sample
++ $(INSTALL) -m $(FILEMODE) $(INSTALL_OPTS) pnp/process_perfdata.cfg-sample $(DESTDIR)$(CFGDIR)
++ $(INSTALL) -m $(FILEMODE) $(INSTALL_OPTS) pnp/rra.cfg-sample $(DESTDIR)$(CFGDIR)
++ $(INSTALL) -m $(FILEMODE) $(INSTALL_OPTS) pnp/check_commands/check_nwstat.cfg-sample $(DESTDIR)$(CFGDIR)/check_commands
++ $(INSTALL) -m $(FILEMODE) $(INSTALL_OPTS) pnp/pages/web_traffic.cfg-sample $(DESTDIR)$(CFGDIR)/pages
+
+- $(INSTALL) -m 664 $(INSTALL_OPTS) pnp/npcd.cfg-sample $(DESTDIR)$(CFGDIR)
++ $(INSTALL) -m $(FILEMODE) $(INSTALL_OPTS) pnp/npcd.cfg-sample $(DESTDIR)$(CFGDIR)
+
diff --git a/net-mgmt/pnp/files/patch-scripts::Makefile.in b/net-mgmt/pnp/files/patch-scripts::Makefile.in
index 2add42254768..c148a5969ed4 100644
--- a/net-mgmt/pnp/files/patch-scripts::Makefile.in
+++ b/net-mgmt/pnp/files/patch-scripts::Makefile.in
@@ -1,10 +1,34 @@
---- scripts/Makefile.in.orig 2008-08-17 00:52:43.000000000 +0400
-+++ scripts/Makefile.in 2008-08-17 00:52:47.000000000 +0400
-@@ -37,7 +37,6 @@
- $(INSTALL) -m 774 $(INSTALL_OPTS) net2pnp.pl $(DESTDIR)$(BINDIR)
+--- scripts/Makefile.in.orig 2008-06-18 12:02:39.000000000 +0400
++++ scripts/Makefile.in 2008-08-18 18:53:43.000000000 +0400
+@@ -13,6 +13,8 @@
+ PERFDATADIR=@PERFDATA_DIR@
+ DATAROOTDIR=@datarootdir@
+
++BINMODE=755
++
+ CP=@CP@
+
+ all html:
+@@ -26,19 +28,15 @@
+ devclean: distclean
+
+ install-init:
+- $(INSTALL) -m 755 -d $(INIT_OPTS) $(DESTDIR)$(INIT_DIR)
+- $(INSTALL) -m 755 $(INIT_OPTS) rc.npcd $(DESTDIR)$(INIT_DIR)/npcd
++ $(INSTALL) -m $(BINMODE) $(INIT_OPTS) rc.npcd $(DESTDIR)$(INIT_DIR)/npcd
+
+ install-processperfdata:
+- $(INSTALL) -m 774 $(INSTALL_OPTS) process_perfdata.pl $(DESTDIR)$(LIBEXECDIR)
++ $(INSTALL) -m $(BINMODE) $(INSTALL_OPTS) process_perfdata.pl $(DESTDIR)$(LIBEXECDIR)
+
+ install-net2pnp:
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(BINDIR)
+- $(INSTALL) -m 774 $(INSTALL_OPTS) net2pnp.pl $(DESTDIR)$(BINDIR)
++ $(INSTALL) -m $(BINMODE) $(INSTALL_OPTS) net2pnp.pl $(DESTDIR)$(BINDIR)
install:
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(PERFDATADIR)
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBEXECDIR)
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBEXECDIR)
$(MAKE) install-processperfdata
+
diff --git a/net-mgmt/pnp/files/patch-share::Makefile.in b/net-mgmt/pnp/files/patch-share::Makefile.in
new file mode 100644
index 000000000000..e73cc4e5e271
--- /dev/null
+++ b/net-mgmt/pnp/files/patch-share::Makefile.in
@@ -0,0 +1,68 @@
+--- share/Makefile.in.orig 2008-06-18 12:02:41.000000000 +0400
++++ share/Makefile.in 2008-08-18 18:55:45.000000000 +0400
+@@ -11,6 +11,9 @@
+
+ CP=@CP@
+
++DIRMODE=755
++FILEMODE=644
++
+ all html:
+
+ clean:
+@@ -24,38 +27,38 @@
+ devclean: distclean
+
+ install:
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/images
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/include
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/include/font
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/include/font/makefont
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/include/js
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/lang/
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/templates/
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/templates.dist/
++ $(INSTALL) -m $(DIRMODE) $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)
++ $(INSTALL) -m $(DIRMODE) $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/images
++ $(INSTALL) -m $(DIRMODE) $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/include
++ $(INSTALL) -m $(DIRMODE) $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/include/font
++ $(INSTALL) -m $(DIRMODE) $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/include/font/makefont
++ $(INSTALL) -m $(DIRMODE) $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/include/js
++ $(INSTALL) -m $(DIRMODE) $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/lang/
++ $(INSTALL) -m $(DIRMODE) $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/templates/
++ $(INSTALL) -m $(DIRMODE) $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/templates.dist/
+
+ for file in pnp/*.php; \
+- do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR); done
++ do $(INSTALL) -m $(FILEMODE) $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR); done
+
+ for file in pnp/templates.dist/*.php; \
+- do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/templates.dist; done
++ do $(INSTALL) -m $(FILEMODE) $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/templates.dist; done
+
+ for file in pnp/lang/*.php; \
+- do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/lang; done
++ do $(INSTALL) -m $(FILEMODE) $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/lang; done
+
+ for file in pnp/images/*; \
+- do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/images; done
++ do $(INSTALL) -m $(FILEMODE) $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/images; done
+
+ for file in pnp/include/*.*; \
+- do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/include; done
++ do $(INSTALL) -m $(FILEMODE) $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/include; done
+
+ for file in pnp/include/js/*; \
+- do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/include/js; done
++ do $(INSTALL) -m $(FILEMODE) $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/include/js; done
+
+ for file in pnp/include/font/*.php; \
+- do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/include/font; done
++ do $(INSTALL) -m $(FILEMODE) $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/include/font; done
+
+ for file in pnp/include/font/makefont/*; \
+- do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/include/font/makefont; done
++ do $(INSTALL) -m $(FILEMODE) $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/include/font/makefont; done
+
+
diff --git a/net-mgmt/pnp/files/patch-src::Makefile.in b/net-mgmt/pnp/files/patch-src::Makefile.in
new file mode 100644
index 000000000000..9b5866e4474b
--- /dev/null
+++ b/net-mgmt/pnp/files/patch-src::Makefile.in
@@ -0,0 +1,12 @@
+--- src/Makefile.in.orig 2008-06-18 12:02:39.000000000 +0400
++++ src/Makefile.in 2008-08-18 18:56:20.000000000 +0400
+@@ -93,8 +93,7 @@
+ $(MAKE) install-basic
+
+ install-basic:
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(BINDIR)
+- $(INSTALL) -m 774 $(INSTALL_OPTS) @npcd_name@ $(DESTDIR)$(BINDIR)
++ $(INSTALL) -m 755 $(INSTALL_OPTS) @npcd_name@ $(DESTDIR)$(BINDIR)
+
+ strip-post-install:
+ $(STRIP) $(DESTDIR)$(BINDIR)/@npcd_name@
diff --git a/net-mgmt/pnp/files/pkg-deinstall.in b/net-mgmt/pnp/files/pkg-deinstall.in
index 631082094eda..553b3744b91d 100644
--- a/net-mgmt/pnp/files/pkg-deinstall.in
+++ b/net-mgmt/pnp/files/pkg-deinstall.in
@@ -13,6 +13,9 @@ dirs () {
local notempty
for i in "$PNP_RRDS" "$PNP_SPOOL" "$PNP_STATE"; do
+ if ! [ -d "$i" ]; then
+ continue
+ fi
if ! rmdir "$i" > /dev/null 2>&1; then
notempty="$notempty $i"
fi