Merge branch 'master' of mathias-kettner.de:omd
[omd.git] / packages / icinga / Makefile
blob06db2fc0e9f0e63c594cf66aa9eca5691423cccb
1 include ../../Makefile.omd
3 NAME = icinga
4 VERSION = 1.13.3
5 DIR = $(NAME)-$(VERSION)
7 # Configure options for Icinga. Since we want to compile
8 # as non-root, we use our own user and group for compiling.
9 # All files will be packaged as user 'root' later anyway.
10 CONFIGUREOPTS = \
11 --sbindir=$(OMD_ROOT)/lib/icinga/cgi-bin \
12 --bindir=$(OMD_ROOT)/bin \
13 --datarootdir=$(OMD_ROOT)/share/icinga/htdocs \
14 --with-icinga-user=$$(id -un) \
15 --with-icinga-group=$$(id -gn) \
16 --with-web-user=$$(id -un) \
17 --with-web-group=$$(id -gn) \
18 --with-perlcache \
19 --enable-embedded-perl \
20 --with-cgiurl="./cgi-bin" \
21 --with-htmurl="." \
22 --enable-idoutils=no \
24 build:
25 tar xzf $(DIR).tar.gz
27 set -e ; for p in patches/*.dif ; do \
28 echo "applying $$p..." ; \
29 ( cd $(DIR) ; patch -p1 -b ) < $$p ; \
30 done
32 cd $(DIR) ; ./configure $(CONFIGUREOPTS)
33 $(MAKE) -C $(DIR) all
36 $(MAKE) -C $(DIR)/module/idoutils/src idomod.so
39 install:
40 $(MAKE) DESTDIR=$(DESTDIR) -C $(DIR) install-base install-cgis install-html
41 rm -f $(DESTDIR)$(OMD_ROOT)/share/icinga/htdocs/config.php.inc
43 mkdir -p $(DESTDIR)$(OMD_ROOT)/lib/icinga
44 install -m 664 $(DIR)/p1.pl $(DESTDIR)$(OMD_ROOT)/lib/icinga
45 install -m 664 $(DIR)/module/idoutils/src/idomod.so $(DESTDIR)$(OMD_ROOT)/lib/icinga
47 mkdir -p $(DESTDIR)$(OMD_ROOT)/share/icinga/htdocs/ssi
48 install -m 755 ssi-wrapper.pl $(DESTDIR)$(OMD_ROOT)/share/icinga/htdocs/ssi
50 for f in common avail cmd config extinfo histogram history notifications outages showlog status statusmap statuswml statuswrl summary tac trends ; do \
51 ln -sfn ssi-wrapper.pl $(DESTDIR)$(OMD_ROOT)/share/icinga/htdocs/ssi/$$f-header.ssi ; \
52 ln -sfn ssi-wrapper.pl $(DESTDIR)$(OMD_ROOT)/share/icinga/htdocs/ssi/$$f-footer.ssi ; \
53 done
55 # Copy package documentations to have these information in the binary packages
56 mkdir -p $(DESTDIR)$(OMD_ROOT)/share/doc/$(NAME)
57 for file in README THANKS LEGAL LICENSE ; do \
58 install -m 644 $(DIR)/$$file $(DESTDIR)$(OMD_ROOT)/share/doc/$(NAME); \
59 done
61 mkdir -p $(DESTDIR)$(OMD_ROOT)/bin
62 install -m 755 merge-icinga-config $(DESTDIR)$(OMD_ROOT)/bin
64 # remove empty folders
65 rm -rf $(DESTDIR)/usr
67 clean:
68 rm -rf $(DIR)