ports/sysutils/munin-common/files/patch-Makefile.config
Mathieu Arnold 368b1f37cb Update to 2.0.25.
Sponsored by:	Absolight
2014-11-25 15:07:23 +00:00

105 lines
3.8 KiB
Text

--- Makefile.config.orig 2014-11-24 21:46:24 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 @@ JAVALIBDIR = $(LIBDIR)
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 @@ CGIUSER := nobody
# Which command to use to check if the USER and GROUP to run Munin as, exists.
# These will work on most modern OSes:
#
-GETENT := $(shell which getent || which true 2>/dev/null)
-CHECKUSER := $(shell $(GETENT) passwd $(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistent. Create the user and retry; exit 2"))
-CHECKGROUP := $(shell $(GETENT) group $(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistent. Create the group and retry; exit 2"))
+CHECKUSER:= $(shell /usr/sbin/pw user show $(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistant. Create the user and retry; exit 2"))
+CHECKGROUP:= $(shell /usr/sbin/pw group show $(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistant. Create the group and retry; exit 2"))
# For OSX, comment out the previous two lines and comment in these
#