diff -Nuar --exclude '*~' munin-1.3.2.orig/Makefile munin-1.3.2/Makefile --- munin-1.3.2.orig/Makefile 2005-04-15 13:37:29.000000000 -0700 +++ munin-1.3.2/Makefile 2006-07-10 13:03:36.000000000 -0700 @@ -17,64 +17,65 @@ install-main: build $(CHECKUSER) - mkdir -p $(CONFDIR)/templates - mkdir -p $(LIBDIR) - mkdir -p $(BINDIR) - mkdir -p $(PERLLIB) - - mkdir -p $(LOGDIR) - mkdir -p $(STATEDIR) - mkdir -p $(HTMLDIR) - mkdir -p $(DBDIR) - mkdir -p $(CGIDIR) + mkdir -p $(DESTDIR)$(CONFDIR)/templates + mkdir -p $(DESTDIR)$(LIBDIR) + mkdir -p $(DESTDIR)$(BINDIR) + mkdir -p $(DESTDIR)$(PERLLIB) + + mkdir -p $(DESTDIR)$(LOGDIR) + mkdir -p $(DESTDIR)$(STATEDIR) + mkdir -p $(DESTDIR)$(HTMLDIR) + mkdir -p $(DESTDIR)$(DBDIR) + mkdir -p $(DESTDIR)$(CGIDIR) - $(CHOWN) $(USER) $(LOGDIR) $(STATEDIR) $(RUNDIR) $(HTMLDIR) $(DBDIR) + $(CHOWN) $(USER) $(DESTDIR)$(LOGDIR) $(DESTDIR)$(STATEDIR) $(DESTDIR)$(RUNDIR) $(DESTDIR)$(HTMLDIR) $(DESTDIR)$(DBDIR) for p in build/server/*.tmpl; do \ - $(INSTALL) -m 0644 "$$p" $(CONFDIR)/templates/ ; \ + $(INSTALL) -m 0644 "$$p" $(DESTDIR)$(CONFDIR)/templates/ ; \ done - $(INSTALL) -m 0644 server/logo.png $(CONFDIR)/templates/ - $(INSTALL) -m 0644 server/style.css $(CONFDIR)/templates/ - $(INSTALL) -m 0644 server/definitions.html $(CONFDIR)/templates/ + $(INSTALL) -m 0644 server/logo.png $(DESTDIR)$(CONFDIR)/templates/ + $(INSTALL) -m 0644 server/style.css $(DESTDIR)$(CONFDIR)/templates/ + $(INSTALL) -m 0644 server/definitions.html $(DESTDIR)$(CONFDIR)/templates/ - test -f "$(CONFDIR)/munin.conf" || $(INSTALL) -m 0644 build/server/munin.conf $(CONFDIR)/ + test -f "$(DESTDIR)$(CONFDIR)/munin.conf" || $(INSTALL) -m 0644 build/server/munin.conf $(DESTDIR)$(CONFDIR)/ - $(INSTALL) -m 0755 build/server/munin-cron $(BINDIR)/ + $(INSTALL) -m 0755 build/server/munin-cron $(DESTDIR)$(BINDIR)/ - $(INSTALL) -m 0755 build/server/munin-update $(LIBDIR)/ - $(INSTALL) -m 0755 build/server/munin-graph $(LIBDIR)/ - $(INSTALL) -m 0755 build/server/munin-html $(LIBDIR)/ - $(INSTALL) -m 0755 build/server/munin-limits $(LIBDIR)/ - $(INSTALL) -m 0755 build/server/munin-cgi-graph $(CGIDIR)/ + $(INSTALL) -m 0755 build/server/munin-update $(DESTDIR)$(LIBDIR)/ + $(INSTALL) -m 0755 build/server/munin-graph $(DESTDIR)$(LIBDIR)/ + $(INSTALL) -m 0755 build/server/munin-html $(DESTDIR)$(LIBDIR)/ + $(INSTALL) -m 0755 build/server/munin-limits $(DESTDIR)$(LIBDIR)/ + $(INSTALL) -m 0755 build/server/munin-cgi-graph $(DESTDIR)$(CGIDIR)/ - $(INSTALL) -m 0644 build/server/Munin.pm $(PERLLIB)/ + $(INSTALL) -m 0644 build/server/Munin.pm $(DESTDIR)$(PERLLIB)/ install-node: build install-node-non-snmp install-node-snmp echo Done. install-node-snmp: build - $(INSTALL) -m 0755 build/node/munin-node-configure-snmp $(SBINDIR)/ + mkdir -p $(DESTDIR)$(SBINDIR) + $(INSTALL) -m 0755 build/node/munin-node-configure-snmp $(DESTDIR)$(SBINDIR)/ install-node-non-snmp: build $(CHECKGROUP) - mkdir -p $(CONFDIR)/plugins - mkdir -p $(CONFDIR)/plugin-conf.d - mkdir -p $(LIBDIR)/plugins - mkdir -p $(SBINDIR) - mkdir -p $(PERLLIB)/Munin/Plugin - - mkdir -p $(LOGDIR) - mkdir -p $(STATEDIR) - mkdir -p $(PLUGSTATE) - - $(CHGRP) $(GROUP) $(PLUGSTATE) - $(CHMOD) 775 $(PLUGSTATE) - $(CHMOD) 755 $(CONFDIR)/plugin-conf.d - - $(INSTALL) -m 0755 build/node/munin-node $(SBINDIR)/ - $(INSTALL) -m 0755 build/node/munin-node-configure $(SBINDIR)/ - test -f "$(CONFDIR)/munin-node.conf" || $(INSTALL) -m 0644 build/node/munin-node.conf $(CONFDIR)/ - $(INSTALL) -m 0755 build/node/munin-run $(SBINDIR)/ + mkdir -p $(DESTDIR)$(CONFDIR)/plugins + mkdir -p $(DESTDIR)$(CONFDIR)/plugin-conf.d + mkdir -p $(DESTDIR)$(LIBDIR)/plugins + mkdir -p $(DESTDIR)$(SBINDIR) + mkdir -p $(DESTDIR)$(PERLLIB)/Munin/Plugin + + mkdir -p $(DESTDIR)$(LOGDIR) + mkdir -p $(DESTDIR)$(STATEDIR) + mkdir -p $(DESTDIR)$(PLUGSTATE) + + $(CHGRP) $(GROUP) $(DESTDIR)$(PLUGSTATE) + $(CHMOD) 775 $(DESTDIR)$(PLUGSTATE) + $(CHMOD) 755 $(DESTDIR)$(CONFDIR)/plugin-conf.d + + $(INSTALL) -m 0755 build/node/munin-node $(DESTDIR)$(SBINDIR)/ + $(INSTALL) -m 0755 build/node/munin-node-configure $(DESTDIR)$(SBINDIR)/ + test -f "$(CONFDIR)/munin-node.conf" || $(INSTALL) -m 0644 build/node/munin-node.conf $(DESTDIR)$(CONFDIR)/ + $(INSTALL) -m 0755 build/node/munin-run $(DESTDIR)$(SBINDIR)/ install-node-plugins: build for p in build/node/node.d.$(OSTYPE)/* build/node/node.d/*; do \ @@ -82,41 +83,41 @@ family=`sed -n 's/^#%# family=\(.*\)$$/\1/p' $$p`; \ test "$$family" || family=contrib; \ if echo $(INSTALL_PLUGINS) | grep $$family >/dev/null; then \ - test -f "$(LIBDIR)/plugins/`basename $$p`" \ - || $(INSTALL) -m 0755 $$p $(LIBDIR)/plugins/; \ + test -f "$(DESTDIR)$(LIBDIR)/plugins/`basename $$p`" \ + || $(INSTALL) -m 0755 $$p $(DESTDIR)$(LIBDIR)/plugins/; \ fi; \ fi \ done - $(INSTALL) -m 0644 build/node/plugins.history $(LIBDIR)/plugins/ + $(INSTALL) -m 0644 build/node/plugins.history $(DESTDIR)$(LIBDIR)/plugins/ #TODO: #configure plugins. install-man: build-man - mkdir -p $(MANDIR)/man1 $(MANDIR)/man5 $(MANDIR)/man8 - $(INSTALL) -m 0644 build/doc/munin-node.conf.5 $(MANDIR)/man5/ - $(INSTALL) -m 0644 build/doc/munin.conf.5 $(MANDIR)/man5/ - $(INSTALL) -m 0644 build/doc/munin-node.8 $(MANDIR)/man8/ - $(INSTALL) -m 0644 build/doc/munin-node-configure.8 $(MANDIR)/man8/ - $(INSTALL) -m 0644 build/doc/munin-node-configure-snmp.8 $(MANDIR)/man8/ - $(INSTALL) -m 0644 build/doc/munin-run.8 $(MANDIR)/man8/ - $(INSTALL) -m 0644 build/doc/munin-graph.8 $(MANDIR)/man8/ - $(INSTALL) -m 0644 build/doc/munin-update.8 $(MANDIR)/man8/ - $(INSTALL) -m 0644 build/doc/munin-limits.8 $(MANDIR)/man8/ - $(INSTALL) -m 0644 build/doc/munin-html.8 $(MANDIR)/man8/ - $(INSTALL) -m 0644 build/doc/munin-cron.8 $(MANDIR)/man8/ + mkdir -p $(DESTDIR)$(MANDIR)/man1 $(DESTDIR)$(MANDIR)/man5 $(DESTDIR)$(MANDIR)/man8 + $(INSTALL) -m 0644 build/doc/munin-node.conf.5 $(DESTDIR)$(MANDIR)/man5/ + $(INSTALL) -m 0644 build/doc/munin.conf.5 $(DESTDIR)$(MANDIR)/man5/ + $(INSTALL) -m 0644 build/doc/munin-node.8 $(DESTDIR)$(MANDIR)/man8/ + $(INSTALL) -m 0644 build/doc/munin-node-configure.8 $(DESTDIR)$(MANDIR)/man8/ + $(INSTALL) -m 0644 build/doc/munin-node-configure-snmp.8 $(DESTDIR)$(MANDIR)/man8/ + $(INSTALL) -m 0644 build/doc/munin-run.8 $(DESTDIR)$(MANDIR)/man8/ + $(INSTALL) -m 0644 build/doc/munin-graph.8 $(DESTDIR)$(MANDIR)/man8/ + $(INSTALL) -m 0644 build/doc/munin-update.8 $(DESTDIR)$(MANDIR)/man8/ + $(INSTALL) -m 0644 build/doc/munin-limits.8 $(DESTDIR)$(MANDIR)/man8/ + $(INSTALL) -m 0644 build/doc/munin-html.8 $(DESTDIR)$(MANDIR)/man8/ + $(INSTALL) -m 0644 build/doc/munin-cron.8 $(DESTDIR)$(MANDIR)/man8/ install-doc: build-doc - mkdir -p $(DOCDIR) - $(INSTALL) -m 0644 build/doc/munin-doc.html $(DOCDIR)/ - $(INSTALL) -m 0644 build/doc/munin-doc.pdf $(DOCDIR)/ - $(INSTALL) -m 0644 build/doc/munin-doc.txt $(DOCDIR)/ - $(INSTALL) -m 0644 build/doc/munin-faq.html $(DOCDIR)/ - $(INSTALL) -m 0644 build/doc/munin-faq.pdf $(DOCDIR)/ - $(INSTALL) -m 0644 build/doc/munin-faq.txt $(DOCDIR)/ - $(INSTALL) -m 0644 README.* $(DOCDIR)/ - $(INSTALL) -m 0644 COPYING $(DOCDIR)/ - $(INSTALL) -m 0644 node/node.d/README $(DOCDIR)/README.plugins + mkdir -p $(DESTDIR)$(DOCDIR) + $(INSTALL) -m 0644 build/doc/munin-doc.html $(DESTDIR)$(DOCDIR)/ + $(INSTALL) -m 0644 build/doc/munin-doc.pdf $(DESTDIR)$(DOCDIR)/ + $(INSTALL) -m 0644 build/doc/munin-doc.txt $(DESTDIR)$(DOCDIR)/ + $(INSTALL) -m 0644 build/doc/munin-faq.html $(DESTDIR)$(DOCDIR)/ + $(INSTALL) -m 0644 build/doc/munin-faq.pdf $(DESTDIR)$(DOCDIR)/ + $(INSTALL) -m 0644 build/doc/munin-faq.txt $(DESTDIR)$(DOCDIR)/ + $(INSTALL) -m 0644 README.* $(DESTDIR)$(DOCDIR)/ + $(INSTALL) -m 0644 COPYING $(DESTDIR)$(DOCDIR)/ + $(INSTALL) -m 0644 node/node.d/README $(DESTDIR)$(DOCDIR)/README.plugins build: build-stamp diff -Nuar --exclude '*~' munin-1.3.2.orig/Makefile.config munin-1.3.2/Makefile.config --- munin-1.3.2.orig/Makefile.config 2005-04-15 13:29:18.000000000 -0700 +++ munin-1.3.2/Makefile.config 2006-07-10 13:04:07.000000000 -0700 @@ -7,10 +7,10 @@ # # the base of the Munin installation. # -PREFIX = $(DESTDIR)/opt/munin +PREFIX = /usr # Where Munin keeps its configurations (server.conf, client.conf, ++) -CONFDIR = $(DESTDIR)/etc/opt/munin +CONFDIR = /etc/munin # Server only - where to put munin-cron BINDIR = $(PREFIX)/bin @@ -19,31 +19,31 @@ SBINDIR = $(PREFIX)/sbin # Where to put text and html documentation -DOCDIR = $(PREFIX)/doc +DOCDIR = $(PREFIX)/share/doc/munin-$(VERSION) # Where to put man pages MANDIR = $(PREFIX)/man # Where to put internal binaries and plugin repository -LIBDIR = $(PREFIX)/lib +LIBDIR = $(PREFIX)/libexec/munin # Server only - Output directory -HTMLDIR = $(PREFIX)/var/www -CGIDIR = $(HTMLDIR)/cgi +HTMLDIR = /var/www/localhost/htdocs/munin +CGIDIR = /var/www/localhost/cgi-bin # Client only - Where to put RRD files and other intenal data -DBDIR = $(DESTDIR)/var/opt/munin +DBDIR = /var/lib/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 # 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) @@ -52,10 +52,11 @@ 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 = $(shell $(PERL) -V:sitelib | cut -d= -f2 | sed "s/[\';]//g") # Client only - Install plugins for this architecture -OSTYPE = $(shell uname | tr '[A-Z]' '[a-z]') +# LANG=C is because some locales are a bit different in their alphabet (eg ee_EE). +OSTYPE = $(shell uname | LANG=C tr '[A-Z]' '[a-z]') # How to figure out the hostname. (Only used in default configuration # files)