]> TLD Linux GIT Repositories - packages/munin.git/blob - munin-Makefile.patch
5fd99671429723e1a7a49b5df3d9fa52ad2a50d9
[packages/munin.git] / munin-Makefile.patch
1 diff -urNp munin-2.0.25.orig/Makefile munin-2.0.25/Makefile
2 --- munin-2.0.25.orig/Makefile  2014-11-24 21:46:24.000000000 +0000
3 +++ munin-2.0.25/Makefile       2015-09-08 10:02:24.392593251 +0000
4 @@ -81,6 +81,7 @@ install-master-prime: $(INFILES_MASTER)
5         mkdir -p $(CONFDIR)/munin-conf.d
6         mkdir -p $(LIBDIR)
7         mkdir -p $(BINDIR)
8 +       mkdir -p $(SBINDIR)
9         mkdir -p $(PERLLIB)
10         mkdir -p $(PERLLIB)/Munin/Master
11         mkdir -p $(HTMLDIR)
12 @@ -112,8 +113,8 @@ install-master-prime: $(INFILES_MASTER)
13         test -f $(HTMLDIR)/.htaccess || $(INSTALL) -m 0644 build/master/www/munin-htaccess $(HTMLDIR)/.htaccess
14         test -f "$(CONFDIR)/munin.conf"  || $(INSTALL) -m 0644 build/master/munin.conf $(CONFDIR)/
15  
16 -       $(INSTALL) -m 0755 build/master/_bin/munin-cron $(BINDIR)/
17 -       $(INSTALL) -m 0755 build/master/_bin/munin-check $(BINDIR)/
18 +       $(INSTALL) -m 0755 build/master/_bin/munin-cron $(SBINDIR)/
19 +       $(INSTALL) -m 0755 build/master/_bin/munin-check $(LIBDIR)/
20         $(INSTALL) -m 0755 build/master/_bin/munin-update $(LIBDIR)/
21         $(INSTALL) -m 0755 build/master/_bin/munin-html $(LIBDIR)/
22         $(INSTALL) -m 0755 build/master/_bin/munin-graph $(LIBDIR)/
23 diff -urNp munin-2.0.25.orig/Makefile.config munin-2.0.25/Makefile.config
24 --- munin-2.0.25.orig/Makefile.config   2014-11-24 21:46:24.000000000 +0000
25 +++ munin-2.0.25/Makefile.config        2015-09-08 10:02:24.393593251 +0000
26 @@ -17,10 +17,10 @@
27  #
28  # the base of the Munin installation.
29  #
30 -PREFIX     = $(DESTDIR)/opt/munin
31 +PREFIX     = $(DESTDIR)/usr
32  
33  # Where Munin keeps its configurations (server.conf, client.conf, ++)
34 -CONFDIR    = $(DESTDIR)/etc/opt/munin
35 +CONFDIR    = $(DESTDIR)/etc/munin
36  
37  # Server only - where to put munin-cron
38  BINDIR     = $(PREFIX)/bin
39 @@ -32,31 +32,31 @@ SBINDIR    = $(PREFIX)/sbin
40  DOCDIR     = $(PREFIX)/doc
41  
42  # Where to put man pages
43 -MANDIR     = $(PREFIX)/man
44 +MANDIR     = $(PREFIX)/share/man
45  
46  # Where to put internal binaries and plugin repository
47 -LIBDIR     = $(PREFIX)/lib
48 +LIBDIR     = $(PREFIX)/share/munin
49  
50  # Server only - Output directory
51 -HTMLDIR    = $(PREFIX)/www/docs
52 -CGIDIR     = $(PREFIX)/www/cgi
53 +HTMLDIR    = $(DESTDIR)/var/lib/munin/html
54 +CGIDIR     = $(LIBDIR)/cgi
55  
56  # Where to put internal data for master (RRD, internal files, ...)
57 -DBDIR      = $(DESTDIR)/var/opt/munin
58 +DBDIR      = $(DESTDIR)/var/lib/munin/db
59  
60  # Where to put internal data for node (plugin state, ...)
61 -DBDIRNODE  = $(DESTDIR)/var/opt/munin-node
62 +DBDIRNODE  = $(DESTDIR)/var/lib/munin/db-node
63  
64  # Client only - Where the spool files are written. Must be writable by
65  # group "munin", and should be preserved between reboots
66 -SPOOLDIR   = $(DBDIR)/spool
67 +SPOOLDIR  = $(DESTDIR)/var/spool/munin
68  
69  # Client only - Where plugins should put their states. Must be writable by
70  # group "munin", and should be preserved between reboots
71 -PLUGSTATE  = $(DBDIRNODE)/plugin-state
72 +PLUGSTATE  = $(DESTDIR)/var/lib/munin/plugin-state
73  
74  # Where Munin should place its logs.
75 -LOGDIR     = $(PREFIX)/log/munin
76 +LOGDIR     = $(DESTDIR)/var/log/munin
77  
78  # Location of PID files and other statefiles. On the server, must be
79  # writable by the user "munin".
80 @@ -95,7 +95,7 @@ GOODSH     := $(shell PATH=`getconf PATH
81  BASH       := /bin/bash
82  
83  # Server only - Where to install the perl libraries
84 -PERLSITELIB := $(shell $(PERL) -V:sitelib | cut -d"'" -f2)
85 +PERLSITELIB := $(shell $(PERL) -V:vendorlib | cut -d"'" -f2)
86  PERLLIB    = $(DESTDIR)$(PERLSITELIB)
87  
88  # Client only - Install plugins for this architecture
89 @@ -106,7 +106,7 @@ OSTYPE     := $(shell uname | LANG=C tr
90  
91  # How to figure out the hostname. (Only used in default configuration
92  # files)
93 -HOSTNAME   := $(shell hostname)
94 +HOSTNAME   := localhost
95  
96  # What is the safest way to create a tempfile.
97  # Default is to figure it out by testing various methods.
98 @@ -129,9 +129,9 @@ CGIUSER := nobody
99  # Which command to use to check if the USER and GROUP to run Munin as, exists.
100  # These will work on most modern OSes:
101  #
102 -GETENT     := $(shell which getent || which true 2>/dev/null)
103 -CHECKUSER  := $(shell $(GETENT) passwd $(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistent. Create the user and retry; exit 2"))
104 -CHECKGROUP := $(shell $(GETENT) group $(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistent. Create the group and retry; exit 2"))
105 +GETENT     := /bin/true
106 +CHECKUSER  := /bin/true
107 +CHECKGROUP := /bin/true
108  
109  # For OSX, comment out the previous two lines and comment in these
110  #
111 @@ -153,9 +153,9 @@ CHECKGROUP := $(shell $(GETENT) group $(
112  #CHECKUSER  := $(shell id $(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistent. Create the user and retry; exit 2"))
113  #CHECKGROUP := $(shell grep ^$(GROUP): /etc/group >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistent. Create the group and retry; exit 2"))
114  
115 -CHOWN      := chown
116 -CHMOD      := chmod
117 -CHGRP      := chgrp
118 +CHOWN      := /bin/true
119 +CHMOD      := /bin/true
120 +CHGRP      := /bin/true
121  
122  # Java compiler stuff - only needed on the buildhost
123  JC         := javac