summaryrefslogtreecommitdiff
path: root/sysutils/munin-master/files/patch-Makefile.config
blob: dd3aa61849dfda5895b3e02d1bddd72e22cccdd4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
--- munin-1.2.5.orig/Makefile.config	Tue Oct 17 14:27:35 2006
+++ munin-1.2.5/Makefile.config	Thu Nov  2 12:09:09 2006
@@ -7,52 +7,56 @@
 #
 # the base of the Munin installation.
 # 
-PREFIX     = $(DESTDIR)/opt/munin
+ifdef PREFIX
+UPREFIX=$(PREFIX)
+else
+UPREFIX=/usr
+endif
 
 # Where Munin keeps its configurations (server.conf, client.conf, ++)
-CONFDIR    = $(DESTDIR)/etc/opt/munin
+CONFDIR    = $(PREFIX)/etc/munin
 
 # Server only - where to put munin-cron
-BINDIR     = $(PREFIX)/bin
+BINDIR     = $(UPREFIX)/bin
 
 # Client only - where to put munin-node, munin-node-configure, and munin-run
-SBINDIR    = $(PREFIX)/sbin
+SBINDIR    = $(UPREFIX)/sbin
 
 # Where to put text and html documentation
-DOCDIR     = $(PREFIX)/doc
+DOCDIR     = $(UPREFIX)/doc
 
 # Where to put man pages
-MANDIR     = $(PREFIX)/man
+MANDIR     = $(UPREFIX)/man
 
 # Where to put internal binaries and plugin repository
-LIBDIR     = $(PREFIX)/lib
+LIBDIR     = $(DATADIR)
 
 # Server only - Output directory
-HTMLDIR    = $(PREFIX)/var/www
-CGIDIR     = $(HTMLDIR)/cgi
+HTMLDIR    = $(PREFIX)/www/munin
+CGIDIR     = $(PREFIX)/www/cgi-bin
 
 # Client only - Where to put RRD files and other intenal data
-DBDIR      = $(DESTDIR)/var/opt/munin
+DBDIR      = $(PREFIX)/var/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
 
 # Where Munin should place its logs.
-LOGDIR     = $(DESTDIR)/var/log/munin
+LOGDIR     = /var/log/munin-main
 
 # Location of PID files and other statefiles. On the server, must be
 # writable by the user "munin".
-STATEDIR   = $(DESTDIR)/var/run/munin
+STATEDIR   = /var/run/munin
 
 # The perl interpreter to use
-PERL       = $(shell which perl)
+# Passed in from FreeBSD port Makefile.
 
 # The python interpreter to use (used by some plugins)
 PYTHON     = /usr/bin/env python
 
 # Server only - Where to install the perl libraries
-PERLLIB    = $(DESTDIR)$(shell $(PERL) -V:sitelib | cut -d= -f2 | sed "s/[\';]//g")
+PERLLIB    = $(PREFIX)/$(SITE_PERL_REL)
 
 # Client only - Install plugins for this architecture
 OSTYPE     = $(shell uname | tr '[A-Z]' '[a-z]')
@@ -77,9 +81,8 @@
 PLUGINUSER = nobody
 
 # Which command to use to check if the USER and GROUP to run Munin as, exists.
-GETENT = $(shell which getent || which true 2>/dev/null)
-CHECKUSER  = $(shell $(GETENT) passwd $(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistant. Create the user and retry; exit 2"))
-CHECKGROUP = $(shell $(GETENT) group $(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistant. 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"))
 
 CHOWN      = chown
 CHMOD      = chmod