aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/munin-common
diff options
context:
space:
mode:
authormat <mat@FreeBSD.org>2014-09-03 00:13:40 +0800
committermat <mat@FreeBSD.org>2014-09-03 00:13:40 +0800
commitbaff6f4bae864faec9f82fa36115f8840d2226c7 (patch)
tree7845cb9ccbf1cce3468f50e3820dade6ba638e48 /sysutils/munin-common
parent539942b59dae95202fa14521885ad419414faa7a (diff)
downloadfreebsd-ports-gnome-baff6f4bae864faec9f82fa36115f8840d2226c7.tar.gz
freebsd-ports-gnome-baff6f4bae864faec9f82fa36115f8840d2226c7.tar.zst
freebsd-ports-gnome-baff6f4bae864faec9f82fa36115f8840d2226c7.zip
- Stage
- Move a few patches around to stay consistent - add a JAVA option to munin-node. Sponsored by: Absolight
Diffstat (limited to 'sysutils/munin-common')
-rw-r--r--sysutils/munin-common/Makefile15
-rw-r--r--sysutils/munin-common/files/patch-Makefile144
-rw-r--r--sysutils/munin-common/files/patch-Makefile.config97
-rw-r--r--sysutils/munin-common/pkg-plist16
4 files changed, 237 insertions, 35 deletions
diff --git a/sysutils/munin-common/Makefile b/sysutils/munin-common/Makefile
index f41c629d00b3..a694518443b7 100644
--- a/sysutils/munin-common/Makefile
+++ b/sysutils/munin-common/Makefile
@@ -3,6 +3,7 @@
PORTNAME= munin
PORTVERSION= ${MUNIN_VERSION}
+PORTREVISION= 1
CATEGORIES= sysutils perl5
MASTER_SITES= ${MUNIN_SITES}
PKGNAMESUFFIX= -common
@@ -17,24 +18,12 @@ RUN_DEPENDS= p5-Net-SSLeay>=0:${PORTSDIR}/security/p5-Net-SSLeay
USES= gmake perl5
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:S/.r/rc/}
-NO_STAGE= yes
.include "${.CURDIR}/../munin-common/munin.mk"
ALL_TARGET= build-common-prime
INSTALL_TARGET= install-common
-MAN3= Munin::Common::Config.3 \
- Munin::Common::Defaults.3 \
- Munin::Common::TLS.3 \
- Munin::Common::TLSClient.3 \
- Munin::Common::TLSServer.3 \
- Munin::Common::Timeout.3
-
post-install:
- @${MKDIR} ${LOGDIR} ${STATEDIR} ${SPOOLDIR}
- @${CHOWN} ${USERS}:${GROUPS} ${LOGDIR} ${STADEDIR} ${SPOOLDIR}
- @(cd ${WRKSRC}/common/blib/libdoc && for man in ${MAN3} ; do \
- ${INSTALL_MAN} -C $$man ${PREFIX}/man/man3; \
- done)
+ ${MKDIR} ${STAGEDIR}${LOGDIR} ${STAGEDIR}${STATEDIR} ${STAGEDIR}${SPOOLDIR}
.include <bsd.port.mk>
diff --git a/sysutils/munin-common/files/patch-Makefile b/sysutils/munin-common/files/patch-Makefile
index 962dd45ca0e5..4202408dcc37 100644
--- a/sysutils/munin-common/files/patch-Makefile
+++ b/sysutils/munin-common/files/patch-Makefile
@@ -1,27 +1,143 @@
---- Makefile.orig 2012-08-31 17:22:50.000000000 +0200
-+++ Makefile 2012-09-08 00:38:17.000000000 +0200
-@@ -68,11 +68,11 @@
+--- Makefile.orig 2013-07-19 16:30:03 UTC
++++ Makefile
+@@ -68,60 +68,48 @@
install-pre: Makefile Makefile.config
@$(CHECKUSER)
- mkdir -p $(LOGDIR)
- mkdir -p $(STATEDIR)
- mkdir -p $(SPOOLDIR)
-+# mkdir -p $(LOGDIR)
-+# mkdir -p $(STATEDIR)
-+# mkdir -p $(SPOOLDIR)
- mkdir -p $(CONFDIR)
+- mkdir -p $(CONFDIR)
- $(CHOWN) $(USER) $(LOGDIR) $(STATEDIR) $(SPOOLDIR)
-+# $(CHOWN) $(USER) $(LOGDIR) $(STATEDIR) $(SPOOLDIR)
++ mkdir -p $(DESTDIR)$(CONFDIR)
install-master-prime: $(INFILES_MASTER) install-pre install-master
- mkdir -p $(CONFDIR)/templates
-@@ -144,7 +144,7 @@
- mkdir -p $(LIBDIR)/plugins
+- mkdir -p $(CONFDIR)/templates
+- mkdir -p $(CONFDIR)/static
+- mkdir -p $(CONFDIR)/templates/partial
+- mkdir -p $(CONFDIR)/munin-conf.d
+- mkdir -p $(LIBDIR)
+- mkdir -p $(BINDIR)
+- mkdir -p $(PERLLIB)
+- mkdir -p $(PERLLIB)/Munin/Master
+- mkdir -p $(HTMLDIR)
+- mkdir -p $(DBDIR)
+- mkdir -p $(DBDIR)/cgi-tmp
+- mkdir -p $(CGIDIR)
+-
+- $(CHOWN) $(USER) $(HTMLDIR) $(DBDIR)
+- $(CHMOD) 0755 $(DBDIR)
+-
+- $(CHOWN) $(CGIUSER) $(DBDIR)/cgi-tmp
+- $(CHMOD) 0755 $(DBDIR)/cgi-tmp
++ mkdir -p $(DESTDIR)$(CONFDIR)/templates
++ mkdir -p $(DESTDIR)$(CONFDIR)/static
++ mkdir -p $(DESTDIR)$(CONFDIR)/templates/partial
++ mkdir -p $(DESTDIR)$(CONFDIR)/munin-conf.d
++ mkdir -p $(DESTDIR)$(LIBDIR)
++ mkdir -p $(DESTDIR)$(BINDIR)
++ mkdir -p $(DESTDIR)$(HTMLDIR)
++ mkdir -p $(DESTDIR)$(DBDIR)
++ mkdir -p $(DESTDIR)$(DBDIR)/cgi-tmp
++ mkdir -p $(DESTDIR)$(CGIDIR)
+
+ for p in master/www/*.tmpl ; do \
+- $(INSTALL) -m 0644 "$$p" $(CONFDIR)/templates/ ; \
++ $(INSTALL) -m 0644 "$$p" $(DESTDIR)$(CONFDIR)/templates/ ; \
+ done
+
+ for p in master/static/* ; do \
+- $(INSTALL) -m 0644 "$$p" $(CONFDIR)/static/ ; \
++ $(INSTALL) -m 0644 "$$p" $(DESTDIR)$(CONFDIR)/static/ ; \
+ done
+
+ for p in master/www/partial/*.tmpl; do \
+- $(INSTALL) -m 0644 "$$p" $(CONFDIR)/templates/partial/ ; \
++ $(INSTALL) -m 0644 "$$p" $(DESTDIR)$(CONFDIR)/templates/partial/ ; \
+ done
+
+- $(INSTALL) -m 0644 master/DejaVuSansMono.ttf $(LIBDIR)/
+- $(INSTALL) -m 0644 master/DejaVuSans.ttf $(LIBDIR)/
++ $(INSTALL) -m 0644 master/DejaVuSansMono.ttf $(DESTDIR)$(LIBDIR)/
++ $(INSTALL) -m 0644 master/DejaVuSans.ttf $(DESTDIR)$(LIBDIR)/
+
+- test -f $(HTMLDIR)/.htaccess || $(INSTALL) -m 0644 build/master/www/munin-htaccess $(HTMLDIR)/.htaccess
+- test -f "$(CONFDIR)/munin.conf" || $(INSTALL) -m 0644 build/master/munin.conf $(CONFDIR)/
++ $(INSTALL) -m 0644 build/master/www/munin-htaccess $(DESTDIR)$(HTMLDIR)/.htaccess
++ $(INSTALL) -m 0644 build/master/munin.conf $(DESTDIR)$(CONFDIR)/
+
+- $(INSTALL) -m 0755 build/master/_bin/munin-cron $(BINDIR)/
+- $(INSTALL) -m 0755 build/master/_bin/munin-check $(BINDIR)/
+- $(INSTALL) -m 0755 build/master/_bin/munin-update $(LIBDIR)/
+- $(INSTALL) -m 0755 build/master/_bin/munin-html $(LIBDIR)/
+- $(INSTALL) -m 0755 build/master/_bin/munin-graph $(LIBDIR)/
+- $(INSTALL) -m 0755 build/master/_bin/munin-limits $(LIBDIR)/
+- $(INSTALL) -m 0755 build/master/_bin/munin-datafile2storable $(LIBDIR)/
+- $(INSTALL) -m 0755 build/master/_bin/munin-storable2datafile $(LIBDIR)/
+- $(INSTALL) -m 0755 build/master/_bin/munin-cgi-graph $(CGIDIR)/munin-cgi-graph
+- $(INSTALL) -m 0755 build/master/_bin/munin-cgi-html $(CGIDIR)/munin-cgi-html
++ $(INSTALL) -m 0755 build/master/_bin/munin-cron $(DESTDIR)$(BINDIR)/
++ $(INSTALL) -m 0755 build/master/_bin/munin-check $(DESTDIR)$(BINDIR)/
++ $(INSTALL) -m 0755 build/master/_bin/munin-update $(DESTDIR)$(LIBDIR)/
++ $(INSTALL) -m 0755 build/master/_bin/munin-html $(DESTDIR)$(LIBDIR)/
++ $(INSTALL) -m 0755 build/master/_bin/munin-graph $(DESTDIR)$(LIBDIR)/
++ $(INSTALL) -m 0755 build/master/_bin/munin-limits $(DESTDIR)$(LIBDIR)/
++ $(INSTALL) -m 0755 build/master/_bin/munin-datafile2storable $(DESTDIR)$(LIBDIR)/
++ $(INSTALL) -m 0755 build/master/_bin/munin-storable2datafile $(DESTDIR)$(LIBDIR)/
++ $(INSTALL) -m 0755 build/master/_bin/munin-cgi-graph $(DESTDIR)$(CGIDIR)/munin-cgi-graph
++ $(INSTALL) -m 0755 build/master/_bin/munin-cgi-html $(DESTDIR)$(CGIDIR)/munin-cgi-html
+
+ # Not ready to be installed yet
+ # $(INSTALL) -m 0755 build/master/_bin/munin-gather $(LIBDIR)/
+@@ -139,33 +127,29 @@
+ install-plugins-prime: install-plugins build $(PLUGINS) Makefile Makefile.config
+ @$(CHECKGROUP)
+
+- mkdir -p $(CONFDIR)/plugins
+- mkdir -p $(CONFDIR)/plugin-conf.d
+- mkdir -p $(LIBDIR)/plugins
++ mkdir -p $(DESTDIR)$(CONFDIR)/plugins
++ mkdir -p $(DESTDIR)$(CONFDIR)/plugin-conf.d
++ mkdir -p $(DESTDIR)$(LIBDIR)/plugins
mkdir -p $(PLUGSTATE)
- $(CHOWN) root:root $(PLUGSTATE)
-+ $(CHOWN) root:wheel $(PLUGSTATE)
- $(CHMOD) 0755 $(PLUGSTATE)
- $(CHMOD) 0755 $(CONFDIR)/plugin-conf.d
+- $(CHMOD) 0755 $(PLUGSTATE)
+- $(CHMOD) 0755 $(CONFDIR)/plugin-conf.d
+-
+ for p in build/plugins/node.d/* build/plugins/node.d.$(OSTYPE)/* ; do \
+ if test -f "$$p" ; then \
+ echo Installing $$p; \
+- $(INSTALL) -m 0755 $$p $(LIBDIR)/plugins/; \
++ $(INSTALL) -m 0755 $$p $(DESTDIR)$(LIBDIR)/plugins/; \
+ fi \
+ done
+- $(HPUXONLY) mv $(LIBDIR)/plugins/*.adv $(LIBDIR)
+- $(INSTALL) -m 0644 build/plugins/plugins.history $(LIBDIR)/plugins/
+- $(INSTALL) -m 0644 build/plugins/plugin.sh $(LIBDIR)/plugins/
++ $(HPUXONLY) mv $(DESTDIR)$(LIBDIR)/plugins/*.adv $(DESTDIR)$(LIBDIR)
++ $(INSTALL) -m 0644 build/plugins/plugins.history $(DESTDIR)$(LIBDIR)/plugins/
++ $(INSTALL) -m 0644 build/plugins/plugin.sh $(DESTDIR)$(LIBDIR)/plugins/
+
+ install-plugins-java: build-plugins-java
+ mkdir -p $(JAVALIBDIR)
+- $(INSTALL) -m 0644 build/plugins/javalib/munin-jmx-plugins.jar $(JAVALIBDIR)/
+- mkdir -p $(LIBDIR)/plugins
++ $(INSTALL) -m 0644 build/plugins/javalib/munin-jmx-plugins.jar $(DESTDIR)$(JAVALIBDIR)/
++ mkdir -p $(DESTDIR)$(LIBDIR)/plugins
+ for p in build/plugins/node.d.java/*; do \
+ if test -f "$$p" ; then \
+ echo Installing $$p; \
+- $(INSTALL) -m 0755 $$p $(LIBDIR)/plugins/; \
++ $(INSTALL) -m 0755 $$p $(DESTDIR)$(LIBDIR)/plugins/; \
+ fi \
+ done
+
+@@ -426,6 +410,7 @@
+ --install_path sbin=$(SBINDIR) \
+ --install_path bindoc=$(MANDIR)/man1 \
+ --install_path libdoc=$(MANDIR)/man3 \
++ --destdir=$(DESTDIR)
+ test-%: %/Build
+ cd $* && $(PERL) Build test --verbose=0 || true
diff --git a/sysutils/munin-common/files/patch-Makefile.config b/sysutils/munin-common/files/patch-Makefile.config
index 98a7052bf8ae..c154efd70e27 100644
--- a/sysutils/munin-common/files/patch-Makefile.config
+++ b/sysutils/munin-common/files/patch-Makefile.config
@@ -1,6 +1,97 @@
---- Makefile.config.orig 2009-12-30 05:55:56.000000000 -0700
-+++ Makefile.config 2010-01-30 11:17:34.000000000 -0700
-@@ -126,9 +129,8 @@
+--- Makefile.config.orig 2013-07-19 16:30:03 UTC
++++ Makefile.config
+@@ -17,62 +17,62 @@
+ #
+ # the base of the Munin installation.
+ #
+-PREFIX = $(DESTDIR)/opt/munin
++PREFIX ?= $(DESTDIR)/opt/munin
+
+ # Where Munin keeps its configurations (server.conf, client.conf, ++)
+-CONFDIR = $(DESTDIR)/etc/opt/munin
++CONFDIR ?= $(DESTDIR)/etc/opt/munin
+
+ # Server only - where to put munin-cron
+-BINDIR = $(PREFIX)/bin
++BINDIR ?= $(PREFIX)/bin
+
+ # Client only - where to put munin-node, munin-node-configure, and munin-run
+-SBINDIR = $(PREFIX)/sbin
++SBINDIR ?= $(PREFIX)/sbin
+
+ # Where to put text and html documentation
+-DOCDIR = $(PREFIX)/doc
++DOCDIR ?= $(PREFIX)/doc
+
+ # Where to put man pages
+-MANDIR = $(PREFIX)/man
++MANDIR ?= $(PREFIX)/man
+
+ # Where to put internal binaries and plugin repository
+-LIBDIR = $(PREFIX)/lib
++LIBDIR ?= $(PREFIX)/lib
+
+ # Server only - Output directory
+-HTMLDIR = $(PREFIX)/www/docs
+-CGIDIR = $(PREFIX)/www/cgi
++HTMLDIR ?= $(PREFIX)/www/docs
++CGIDIR ?= $(PREFIX)/www/cgi
+
+ # Where to put internal data for master (RRD, internal files, ...)
+-DBDIR = $(DESTDIR)/var/opt/munin
++DBDIR ?= $(DESTDIR)/var/opt/munin
+
+ # Where to put internal data for node (plugin state, ...)
+-DBDIRNODE = $(DESTDIR)/var/opt/munin-node
++DBDIRNODE ?= $(DESTDIR)/var/opt/munin-node
+
+ # Client only - Where the spool files are written. Must be writable by
+ # group "munin", and should be preserved between reboots
+-SPOOLDIR = $(DBDIR)/spool
++SPOOLDIR ?= $(DBDIR)/spool
+
+ # Client only - Where plugins should put their states. Must be writable by
+ # group "munin", and should be preserved between reboots
+-PLUGSTATE = $(DBDIRNODE)/plugin-state
++PLUGSTATE ?= $(DBDIRNODE)/plugin-state
+
+ # Where Munin should place its logs.
+-LOGDIR = $(PREFIX)/log/munin
++LOGDIR ?= $(PREFIX)/log/munin
+
+ # Location of PID files and other statefiles. On the server, must be
+ # writable by the user "munin".
+-STATEDIR = $(DESTDIR)/var/run/munin
++STATEDIR ?= $(DESTDIR)/var/run/munin
+
+ # The perl interpreter to use
+-PERL := $(shell which perl)
++PERL := /usr/local/bin/perl
+
+ # The python interpreter to use (used by some plugins)
+-PYTHON := /usr/bin/env python
++PYTHON := /usr/local/bin/python
+
+ # The ruby interpreter to use (used by some plugins)
+-RUBY := /usr/bin/env ruby
++RUBY := /usr/local/bin/ruby
+
+ # The java runtime to use (used by some plugins)
+-JAVARUN := /usr/bin/java
++JAVARUN := /usr/local/bin/java
+
+ # The java library dir to use (used by some plugins)
+ # this is needed in order to be able to install
+@@ -92,7 +92,7 @@
+ GOODSH := $(shell PATH=`getconf PATH 2>/dev/null || echo $(PATH)` LANG=C sh -c 'type sh | sed "s/.* //"')
+
+ # Path of bash for bash specific plugins
+-BASH := /bin/bash
++BASH := /usr/local/bin/bash
+
+ # Server only - Where to install the perl libraries
+ PERLSITELIB := $(shell $(PERL) -V:sitelib | cut -d"'" -f2)
+@@ -129,9 +129,8 @@
# Which command to use to check if the USER and GROUP to run Munin as, exists.
# These will work on most modern OSes:
#
diff --git a/sysutils/munin-common/pkg-plist b/sysutils/munin-common/pkg-plist
index 73257e8de25b..52eb8a059c7f 100644
--- a/sysutils/munin-common/pkg-plist
+++ b/sysutils/munin-common/pkg-plist
@@ -6,8 +6,14 @@
%%SITE_PERL%%/Munin/Common/TLSClient.pm
%%SITE_PERL%%/Munin/Common/TLSServer.pm
%%SITE_PERL%%/Munin/Common/Timeout.pm
-@dirrm %%SITE_PERL%%/Munin/Common
-@dirrm %%SITE_PERL%%/Munin
-@exec mkdir -p %%LOGDIR%% %%STATEDIR%% %%SPOOLDIR%%
-@exec chown %%USER%%:%%GROUP%% %%LOGDIR%% %%STATEDIR%% %%SPOOLDIR%%
-@unexec rmdir %%DBDIR%% %%LOGDIR%% %%STATEDIR%% %%SPOOLDIR%% 2>/dev/null || /usr/bin/true
+man/man3/Munin::Common::Config.3.gz
+man/man3/Munin::Common::Defaults.3.gz
+man/man3/Munin::Common::TLS.3.gz
+man/man3/Munin::Common::TLSClient.3.gz
+man/man3/Munin::Common::TLSServer.3.gz
+man/man3/Munin::Common::Timeout.3.gz
+@dirrmtry %%SITE_PERL%%/Munin/Common
+@dirrmtry %%SITE_PERL%%/Munin
+@dirrmtry(%%USER%%,%%GROUP%%,) %%LOGDIR%%
+@dirrmtry(%%USER%%,%%GROUP%%,) %%STATEDIR%%
+@dirrmtry(%%USER%%,%%GROUP%%,) %%SPOOLDIR%%