Merge branch 'master' of mathias-kettner.de:omd
[omd.git] / packages / pnp4nagios / Makefile
blob1bac21af00bf77bd3209531a6213ea5120e91bc7
1 include ../../Makefile.omd
3 .PHONY: skel
5 NAME = pnp4nagios
6 VERSION = 0.6.25
7 DIR = $(NAME)-$(VERSION)
8 # Unset CONFIG_SITE
9 CONFIG_SITE = ''
11 # Configure options for PNP4Nagios. Since we want to compile
12 # as non-root, we use our own user and group for compiling.
13 # All files will be packaged as user 'root' later anyway.
14 CONFIGUREOPTS = \
15 --prefix=$(OMD_ROOT) \
16 --sysconfdir=$(OMD_ROOT)/etc/pnp4nagios \
17 --libexecdir=$(OMD_ROOT)/lib/pnp4nagios \
18 --docdir=$(OMD_ROOT)/share/doc/pnp4nagios \
19 --datarootdir=$(OMD_ROOT)/share/pnp4nagios/htdocs \
20 --localstatedir=$(OMD_ROOT)/var/pnp4nagios \
21 --with-perfdata-dir=$(OMD_ROOT)/var/pnp4nagios/perfdata \
22 --with-perfdata-spool-dir=$(OMD_ROOT)/tmp/pnp4nagios/spool \
23 --with-perfdata-logfile=$(OMD_ROOT)/var/pnp4nagios/log/perfdata.log \
24 --with-nagios-user=$$(id -un) \
25 --with-nagios-group=$$(id -gn) \
26 --with-rrdtool=/bin/true \
27 --with-perl_lib_path=$(OMD_ROOT)/lib/perl5/lib/perl5 \
28 --with-base-url='/\#\#\#SITE\#\#\#/pnp4nagios'
30 build:
31 tar xzf $(DIR).tar.gz
32 # for p in patches/*.diff ; do \
33 # echo "applying $$p..." ; \
34 # ( cd $(DIR) ; patch -p1 -b ) < $$p ; \
35 # done
37 cd $(DIR) ; ./configure $(CONFIGUREOPTS)
38 $(MAKE) -C $(DIR) all
40 install:
41 mkdir -p $(DESTDIR)$(APACHE_CONF_DIR)
42 $(MAKE) DESTDIR=$(DESTDIR) -C $(DIR) install
43 # Remove installer
44 rm $(DESTDIR)$(OMD_ROOT)/share/pnp4nagios/htdocs/install.php
45 rm -rf $(DESTDIR)$(OMD_ROOT)/etc/pnp4nagios
46 rm -rf $(DESTDIR)$(OMD_ROOT)/var/pnp4nagios
47 mkdir -p $(DESTDIR)$(OMD_ROOT)/share/doc/pnp4nagios
48 install -m 644 $(DIR)/README $(DESTDIR)$(OMD_ROOT)/share/doc/pnp4nagios
49 install -m 644 $(DIR)/COPYING $(DESTDIR)$(OMD_ROOT)/share/doc/pnp4nagios
50 install -m 644 $(DIR)/AUTHORS $(DESTDIR)$(OMD_ROOT)/share/doc/pnp4nagios
51 install -m 644 $(DIR)/THANKS $(DESTDIR)$(OMD_ROOT)/share/doc/pnp4nagios
53 # Move default config files to skel
54 mkdir -p skel/etc/pnp4nagios
55 mkdir -p skel/var/pnp4nagios/stats
56 mkdir -p skel/var/pnp4nagios/perfdata
57 mkdir -p skel/var/pnp4nagios/log
58 mkdir -p skel/var/pnp4nagios/spool
59 mkdir -p skel/tmp/pnp4nagios/run
61 clean:
62 rm -rf $(DIR)