openbsd-ports/net/munin/patches/patch-Makefile_config

100 lines
3.4 KiB
Plaintext

$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 @@
#
# 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
@@ -28,6 +28,9 @@ BINDIR = $(PREFIX)/bin
# 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
@@ -35,11 +38,11 @@ DOCDIR = $(PREFIX)/doc
MANDIR = $(PREFIX)/man
# Where to put internal binaries and plugin repository
-LIBDIR = $(PREFIX)/lib
+LIBDIR = $(PREFIX)/libexec/munin
# Server only - Output directory
-HTMLDIR = $(PREFIX)/www/docs
-CGIDIR = $(PREFIX)/www/cgi
+HTMLDIR = $(DESTDIR)/var/www/htdocs/munin
+CGIDIR = $(DESTDIR)/var/www/cgi-bin
# 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
# 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.
-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)
# The python interpreter to use (used by some plugins)
-PYTHON := /usr/bin/env python
+#PYTHON := /usr/bin/env python
# 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]')
# How to figure out the hostname. (Only used in default configuration
# files)
-HOSTNAME := $(shell hostname)
+HOSTNAME := localhost
# What is the safest way to create a tempfile.
# Default is to figure it out by testing various methods.
@@ -117,8 +120,8 @@ MKTEMP := $(shell ./test-mktemp)
VERSION := $(shell ./getversion)
# User to run munin as
-USER := munin
-GROUP := munin
+USER := _munin
+GROUP := _munin
# Default user to run the plugins as
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
#