check_oracle_health: update to 1.9.3.5
[omd.git] / packages / thruk / Makefile
blobb1a3ecf8319c59ec5aa8010756466c051446423c
1 include ../../Makefile.omd
3 NAME = Thruk
4 VERSION = 1.82
5 DIR = $(NAME)-$(VERSION)
6 PERLARCH = $(shell $(PERL) -e 'use Config; print $$Config{archname}')
8 .PHONY: skel
10 build:
11 rm -rf $(DIR)
12 tar xzf $(DIR)*.tar.gz
13 for p in patches/*.patch ; do \
14 echo "applying $$p..." ; \
15 ( cd $(DIR) ; patch -p1 ) < $$p || exit 1; \
16 done
17 find $(DIR) -name \*.orig -exec rm {} \;
20 install:
21 mkdir -p $(DESTDIR)$(OMD_ROOT)/share
22 mkdir -p $(DESTDIR)$(OMD_ROOT)/bin
23 rm -rf $(DESTDIR)$(OMD_ROOT)/share/thruk
24 cp -rp $(DIR)/script/thruk $(DESTDIR)$(OMD_ROOT)/bin/thruk
25 cp -rp $(DIR)/script/naglint $(DESTDIR)$(OMD_ROOT)/bin/naglint
26 cp -rp $(DIR) $(DESTDIR)$(OMD_ROOT)/share/thruk
27 mkdir -p $(DESTDIR)$(OMD_ROOT)/skel/etc/thruk
28 rm -rf $(DESTDIR)$(OMD_ROOT)/share/thruk/plugins-enabled
29 rm -rf $(DESTDIR)$(OMD_ROOT)/share/thruk/themes-enabled
30 rm -rf $(DESTDIR)$(OMD_ROOT)/share/thruk/t
31 mv $(DESTDIR)$(OMD_ROOT)/share/thruk/script/thruk $(DESTDIR)$(OMD_ROOT)/bin/thruk
32 chmod 755 $(DESTDIR)$(OMD_ROOT)/bin/thruk
33 chmod 755 $(DESTDIR)$(OMD_ROOT)/bin/naglint
34 if [ `uname -m` = 'x86_64' ]; then \
35 cp -p wkhtmltopdf-amd64 $(DESTDIR)$(OMD_ROOT)/bin/wkhtmltopdf; \
36 else \
37 cp -p wkhtmltopdf-i386 $(DESTDIR)$(OMD_ROOT)/bin/wkhtmltopdf; \
41 skel:
42 # logfile has to be group writeable for shared apache
43 mkdir -p $(SKEL)/var/log $(SKEL)/var/thruk $(SKEL)/etc/init.d
44 touch $(SKEL)/var/log/thruk.log
45 mkdir -p $(SKEL)/etc/thruk/plugins-enabled
46 # set links for enabled plugins
47 for link in `ls -1 $(DIR)/plugins/plugins-enabled/`; do cd $(SKEL)/etc/thruk/plugins-enabled && ln -sfn ../../../share/thruk/plugins/plugins-available/$$link $$link; done
48 # set links for enabled themes
49 mkdir -p $(SKEL)/etc/thruk/themes-enabled
50 for link in `ls -1 $(DIR)/themes/themes-enabled/`; do cd $(SKEL)/etc/thruk/themes-enabled && ln -sfn ../../../share/thruk/themes/themes-available/$$link $$link; done
51 cp $(DIR)/support/thruk.init $(SKEL)/etc/init.d/thruk
52 mkdir -p $(SKEL)/etc/nagios/conf.d
53 cp $(DIR)/support/thruk_templates.cfg $(SKEL)/etc/nagios/conf.d/
54 cp $(DIR)/thruk.conf $(SKEL)/etc/thruk/thruk.conf
55 for p in patches/*.skel_patch ; do \
56 echo "applying $$p..." ; \
57 ( cd $(SKEL) ; patch -p1 -b ) < $$p || exit 1; \
58 done
59 find $(SKEL) -name \*.orig -exec rm {} \;
61 clean:
62 rm -rf $(DIR)