2010-10-23 11:52:22 -04:00
$OpenBSD: patch-Makefile_config,v 1.2 2010/10/23 15:52:22 sthen Exp $
--- Makefile.config.orig Fri Nov 6 15:35:44 2009
+++ Makefile.config Fri Oct 15 15:13:11 2010
@@ -17,10 +17,10 @@
2009-11-17 06:11:20 -05:00
#
# 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
2010-10-23 11:52:22 -04:00
@@ -28,6 +28,9 @@ BINDIR = $(PREFIX)/bin
2009-11-17 06:11:20 -05:00
# Client only - where to put munin-node, munin-node-configure, and munin-run
SBINDIR = $(PREFIX)/sbin
+# Where to put templates and other shared files
+SHAREDIR = $(PREFIX)/share/munin
+
# Where to put text and html documentation
DOCDIR = $(PREFIX)/doc
2010-10-23 11:52:22 -04:00
@@ -35,11 +38,11 @@ DOCDIR = $(PREFIX)/doc
2009-11-17 06:11:20 -05:00
MANDIR = $(PREFIX)/man
# Where to put internal binaries and plugin repository
-LIBDIR = $(PREFIX)/lib
+LIBDIR = $(PREFIX)/libexec/munin
# Server only - Output directory
2010-10-23 11:52:22 -04:00
-HTMLDIR = $(PREFIX)/www/docs
-CGIDIR = $(PREFIX)/www/cgi
2009-11-17 06:11:20 -05:00
+HTMLDIR = $(DESTDIR)/var/www/htdocs/munin
+CGIDIR = $(DESTDIR)/var/www/cgi-bin
2010-10-23 11:52:22 -04:00
# Server only - spool directory for data gathered from nodes by
# munin-gather - experimental. Place on ramdisk to make munin
@@ -52,14 +55,14 @@ SSPOOLDIR = $(PREFIX)/spool
# SSPOOLDIR := /tmp/muninspool
2009-11-17 06:11:20 -05:00
# Client only - Where to put RRD files and other intenal data
-DBDIR = $(DESTDIR)/var/opt/munin
+DBDIR = $(DESTDIR)/var/db/munin
# Client only - Where plugins should put their states. Must be writable by
# group "munin", and should be preserved between reboots
-PLUGSTATE = $(DBDIR)/plugin-state
+PLUGSTATE = $(DESTDIR)/var/db/munin-pluginstate
# Where Munin should place its logs.
2010-10-23 11:52:22 -04:00
-LOGDIR = $(PREFIX)/log/munin
+LOGDIR = $(DESTDIR)/var/log/munin
# Location of PID files and other statefiles. On the server, must be
# writable by the user "munin".
@@ -69,7 +72,7 @@ STATEDIR = $(DESTDIR)/var/run/munin
PERL := $(shell which perl)
2009-11-17 06:11:20 -05:00
# The python interpreter to use (used by some plugins)
2010-10-23 11:52:22 -04:00
-PYTHON := /usr/bin/env python
+#PYTHON := /usr/bin/env python
2009-11-17 06:11:20 -05:00
2010-10-23 11:52:22 -04:00
# The ruby interpreter to use (used by some plugins)
RUBY := /usr/bin/env ruby
@@ -106,7 +109,7 @@ OSTYPE := $(shell uname | tr '[A-Z]' '[a-z]')
2009-11-17 06:11:20 -05:00
# How to figure out the hostname. (Only used in default configuration
# files)
2010-10-23 11:52:22 -04:00
-HOSTNAME := $(shell hostname)
+HOSTNAME := localhost
2009-11-17 06:11:20 -05:00
# What is the safest way to create a tempfile.
# Default is to figure it out by testing various methods.
2010-10-23 11:52:22 -04:00
@@ -117,8 +120,8 @@ MKTEMP := $(shell ./test-mktemp)
VERSION := $(shell ./getversion)
2009-11-17 06:11:20 -05:00
# User to run munin as
2010-10-23 11:52:22 -04:00
-USER := munin
-GROUP := munin
+USER := _munin
+GROUP := _munin
2009-11-17 06:11:20 -05:00
# Default user to run the plugins as
2010-10-23 11:52:22 -04:00
PLUGINUSER := nobody
@@ -127,8 +130,8 @@ PLUGINUSER := nobody
# 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 :=
+CHECKGROUP :=
# For OSX, comment out the previous two lines and comment in these
#