Merge branch 'master' of mathias-kettner.de:omd
[omd.git] / packages / nagvis / Makefile
blob311ace23c1e36a41c3aad72433caa0e549015fb2
1 include ../../Makefile.omd
3 NAME = nagvis
4 VERSION = 1.9-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 COPYING 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 clean:
53 rm -rf $(NAME)-*.*.[0-9] $(NAME)-*.*-nightly