check_oracle_health: update to 1.9.3.5
[omd.git] / packages / nagvis / Makefile
blob923bd57911956c99f671f80921450cce68d4fac0
1 include ../../Makefile.omd
3 NAME = nagvis
4 VERSION = 1.8-nightly
5 DIR = $(NAME)-$(VERSION)
7 .PHONY: skel
9 build:
10 tar xzf $(DIR).tar.gz
11 patch $(DIR)/share/server/core/defines/global.php global.php.patch
12 rm $(DIR)/share/server/core/defines/global.php.orig || true
14 install:
15 cd $(DIR) ; ./install.sh -q -F -c y -a n \
16 -u $$(id -un) \
17 -g $$(id -gn) \
18 -w $(DESTDIR)$(OMD_ROOT)/etc/apache \
19 -W /WILL_BE_REPLACED/nagvis \
20 -b $(DESTDIR)/usr/bin \
21 -p $(DESTDIR)$(OMD_ROOT)/share/nagvis
23 # Relocate the NagVis shared directory to have the same path as all the other packages
24 test -d $(DESTDIR)$(OMD_ROOT)/share/nagvis/share && \
25 mv $(DESTDIR)$(OMD_ROOT)/share/nagvis/share $(DESTDIR)$(OMD_ROOT)/share/nagvis/htdocs
27 mkdir -p $(DESTDIR)$(OMD_ROOT)/skel/var/nagvis/profiles
29 # Move package documentations to have these files in the binary packages
30 mkdir -p $(DESTDIR)$(OMD_ROOT)/share/doc/$(NAME)
31 for file in LICENCE README ; do \
32 mv $(DESTDIR)$(OMD_ROOT)/share/nagvis/$$file $(DESTDIR)$(OMD_ROOT)/share/doc/$(NAME); \
33 done
35 # Take the sample main configuration file from source package and overwrite the one
36 # installed by the installer.
37 mkdir -p $(DESTDIR)$(OMD_ROOT)/skel/etc/nagvis
38 cp $(DIR)/etc/nagvis.ini.php-sample $(DESTDIR)$(OMD_ROOT)/skel/etc/nagvis/nagvis.ini.php
40 # Move demo config files
41 mkdir -p $(DESTDIR)$(OMD_ROOT)/skel/etc/nagvis/conf.d
42 mkdir -p $(DESTDIR)$(OMD_ROOT)/skel/etc/nagvis/maps
43 mkdir -p $(DESTDIR)$(OMD_ROOT)/skel/etc/nagvis/geomap
44 mv $(DESTDIR)$(OMD_ROOT)/share/nagvis/etc/conf.d/*.ini.php $(DESTDIR)$(OMD_ROOT)/skel/etc/nagvis/conf.d
45 mv $(DESTDIR)$(OMD_ROOT)/share/nagvis/etc/maps/*.cfg $(DESTDIR)$(OMD_ROOT)/skel/etc/nagvis/maps
46 mv $(DESTDIR)$(OMD_ROOT)/share/nagvis/etc/geomap/demo-*.csv $(DESTDIR)$(OMD_ROOT)/skel/etc/nagvis/geomap
48 # Delete files/directories we do not want to pack
49 rm -rf $(DESTDIR)$(OMD_ROOT)/share/nagvis/var
50 rm -rf $(DESTDIR)$(OMD_ROOT)/share/nagvis/etc
52 # Update from NagVis 1.5 -> 1.6 in OMD handling needs to be handled here
53 # The var/userfiles directory is not part of 1.6 anymore. But if the packe
54 # would not contain var/nagvis/userfiles directories the "omd update" would remove
55 # the directory tree, even if there are some custom files in it. This looks
56 # like a bug in OMD. But to have a quick solution we simply create the empty
57 # directory structure here for some versions. Can be removed someday...
58 mkdir -p $(DESTDIR)$(OMD_ROOT)/skel/var/nagvis/userfiles/gadgets
59 mkdir -p $(DESTDIR)$(OMD_ROOT)/skel/var/nagvis/userfiles/images/gadgets
60 mkdir -p $(DESTDIR)$(OMD_ROOT)/skel/var/nagvis/userfiles/images/shapes
61 mkdir -p $(DESTDIR)$(OMD_ROOT)/skel/var/nagvis/userfiles/images/iconsets
62 mkdir -p $(DESTDIR)$(OMD_ROOT)/skel/var/nagvis/userfiles/images/maps
63 mkdir -p $(DESTDIR)$(OMD_ROOT)/skel/var/nagvis/userfiles/images/templates
64 mkdir -p $(DESTDIR)$(OMD_ROOT)/skel/var/nagvis/userfiles/styles
65 mkdir -p $(DESTDIR)$(OMD_ROOT)/skel/var/nagvis/userfiles/sounds
66 mkdir -p $(DESTDIR)$(OMD_ROOT)/skel/var/nagvis/userfiles/templates
69 clean:
70 rm -rf $(NAME)-*.*.[0-9] $(NAME)-*.*-nightly