1 #!/usr/bin/make -f
2 # -*- makefile -*-
4 # Uncomment this to turn on verbose mode.
5 #export DH_VERBOSE=1
7 include /usr/share/dpatch/dpatch.make
8 DEST = debian/nagvis
10 configure: configure-stamp
11 configure-stamp:
12 dh_testdir
13 touch configure-stamp
15 build: build-stamp patch-stamp
16 build-stamp: configure-stamp
17 dh_testdir
18 #$(MAKE)
19 #docbook-to-man debian/nagvis.sgml > nagvis.1
20 touch $@
22 clean: unpatch
23 dh_testdir
24 dh_testroot
25 rm -f build-stamp configure-stamp
26 # Add here commands to clean up after the build process.
27 #-$(MAKE) clean
28 dh_clean
30 install: build
31 dh_testdir
32 dh_testroot
33 dh_clean -k
34 dh_installdirs
35 dh_install
37 [ -x /usr/bin/html2text ] && \
38 /usr/bin/html2text -ascii -nobs < docs/en_US/changelog.html > docs/Changelog
39 mv $(DEST)/etc/nagvis/nagvis.ini.php-sample \
40 $(DEST)/usr/share/nagvis/debian/
41 sed -e 's/^[; ]*\(\<dbhost\) *=.*$$/\1=_DBC_DBSERVER_/' \
42 -e 's/^[; ]*\(\<dbport\) *=.*$$/\1=_DBC_DBPORT_/' \
43 -e 's/^[; ]*\(\<dbname\) *=.*$$/\1=_DBC_DBNAME_/' \
44 -e 's/^[; ]*\(\<dbuser\) *=.*$$/\1=_DBC_DBUSER_/' \
45 -e 's/^[; ]*\(\<dbpass\) *=.*$$/\1=_DBC_DBPASS_/' \
46 < $(DEST)/usr/share/nagvis/debian/nagvis.ini.php-sample \
47 > $(DEST)/usr/share/nagvis/debian/nagvis.ini.php-sample.new && \
48 mv $(DEST)/usr/share/nagvis/debian/nagvis.ini.php-sample.new \
49 $(DEST)/usr/share/nagvis/debian/nagvis.ini.php-sample
51 # demo site
52 install -d $(DEST)/demo/nagvis/images/maps $(DEST)/demo/etc/nagvis/maps
53 mv $(DEST)/etc/nagvis/maps/demo*.cfg $(DEST)/demo/etc/nagvis/maps/
54 mv $(DEST)/usr/share/nagvis/htdocs/nagvis/images/maps/nagvis-demo.png \
55 $(DEST)/demo/nagvis/images/maps/
56 rm -rf $(DEST)/usr/share/nagvis/htdocs/nagvis/images/maps
58 dh_link
59 dh_lintian
61 # Build architecture-dependent files here.
62 binary-arch: build install
63 # We have nothing to do by default.
65 # Build architecture-independent files here.
66 binary-indep: build install
67 dh_testdir
68 dh_testroot
69 dh_installchangelogs
70 dh_installdocs
71 dh_installexamples
72 dh_installdebconf
73 dh_compress
74 dh_fixperms
75 dh_installdeb
76 dh_shlibdeps
77 dh_gencontrol
78 dh_md5sums
79 dh_builddeb
81 binary: binary-indep binary-arch
82 .PHONY: build clean binary-indep binary-arch binary install configure