Refactoring: Changed all check parameters starting with an 'o' to the new rulespec...
[check_mk.git] / omd / debian / rules
blob575eb0a589661b6b92c8d8f1ee343ab2e9c23a08
1 #!/usr/bin/make -f
2 # Sample debian/rules that uses debhelper.
3 # This file is public domain software, originally written by Joey Hess.
5 # This version is for packages that are architecture dependent.
7 # Uncomment this to turn on verbose mode.
8 #export DH_VERBOSE=1
10 _PWD=`pwd`
12 include Makefile.omd
13 -include .config
15 build: patch build-stamp
16 build-stamp:
17 dh_testdir
18 $(MAKE) EDITION=$(EDITION) -j 4 build
19 touch build-stamp
21 clean: clean-patched unpatch
22 dh_testdir
23 dh_testroot
24 rm -f build-stamp
26 $(MAKE) EDITION=$(EDITION) clean
27 rm -f $(_PWD)/debian/postinst
28 rm -f $(_PWD)/debian/preinst
29 rm -f $(_PWD)/debian/prerm
30 rm -f $(_PWD)/debian/postrm
31 rm -f $(_PWD)/debian/init
32 rm -f $(_PWD)/debian/links
33 rm -f $(_PWD)/debian/*.debhelper
34 rm -rf $(_PWD)/debian/check-mk-*-[0-9].[0-9.]*
35 rm -rf $(_PWD)/debian/check-mk-*-[1-9][0-9].[0-9.]*
37 dh_clean
39 clean-patched:
40 dh_testdir
41 dh_testroot
42 ${MAKE} EDITION=$(EDITION) clean
44 patch: patch-stamp
45 patch-stamp:
46 dpatch apply-all
47 dpatch cat-all >patch-stamp
49 unpatch:
50 dpatch deapply-all
51 rm -rf patch-stamp debian/patched
53 install: build
54 dh_testdir
55 dh_testroot
56 dh_prep
57 dh_installdirs
59 $(MAKE) EDITION=$(EDITION) DESTDIR=$(_PWD)/debian/`dh_listpackages` pack
60 # -- remove version independent dirs, will be created later by postinst
61 rm -f $(_PWD)/debian/`dh_listpackages`/usr/bin/omd
62 rmdir $(_PWD)/debian/`dh_listpackages`/usr/bin
63 rm -f $(_PWD)/debian/`dh_listpackages`/usr/share/man/man8/omd.8.gz
64 rm -f $(_PWD)/debian/`dh_listpackages`/omd
65 rmdir $(_PWD)/debian/`dh_listpackages`/opt/omd/apache
66 rmdir $(_PWD)/debian/`dh_listpackages`/opt/omd/sites
67 rm -f $(_PWD)/debian/`dh_listpackages`/opt/omd/versions/default
68 rm -rf $(_PWD)/debian/`dh_listpackages`/etc/apache2
69 rm -f $(_PWD)/debian/`dh_listpackages`/etc/init.d/omd
70 rm -f $(_PWD)/debian/`dh_listpackages`/etc/systemd/system/omd.service
71 mv -f $(_PWD)/check-mk-$(EDITION)-bin-$(OMD_VERSION).tar.gz $(_PWD)/..
73 sed -e 's/###OMD_VERSION###/$(OMD_VERSION)/g' \
74 -e 's/###OMD_SERIAL###/$(OMD_SERIAL)/g' \
75 $(_PWD)/debian/postinst.in > $(_PWD)/debian/postinst
76 sed -e 's/###OMD_VERSION###/$(OMD_VERSION)/g' \
77 $(_PWD)/debian/preinst.in > $(_PWD)/debian/preinst
78 sed -e 's/###OMD_VERSION###/$(OMD_VERSION)/g' \
79 $(_PWD)/debian/prerm.in > $(_PWD)/debian/prerm
80 sed -e 's/###OMD_VERSION###/$(OMD_VERSION)/g' \
81 $(_PWD)/debian/postrm.in > $(_PWD)/debian/postrm
82 sed -e 's/###OMD_VERSION###/$(OMD_VERSION)/g' \
83 $(_PWD)/debian/init.in > $(_PWD)/debian/init
84 sed -e 's/###OMD_VERSION###/$(OMD_VERSION)/g' \
85 $(_PWD)/debian/links.in > $(_PWD)/debian/links
87 # Build architecture-independent files here.
88 binary-indep: install
89 # We have nothing to do by default.
91 # Build architecture-dependent files here.
92 binary-arch: install
93 dh_testdir
94 dh_testroot
95 dh_installchangelogs
96 dh_installdocs
97 dh_installexamples
98 # dh_install
99 # dh_installmenu
100 dh_installdebconf -n
101 # dh_installlogrotate
102 # dh_installemacsen
103 # dh_installcatalogs
104 # dh_installpam
105 # dh_installmime
106 dh_installinit
107 # dh_installcron
108 # dh_installinfo
109 # dh_installwm
110 # dh_installudev
111 # dh_lintian
112 # dh_bugfiles
113 # dh_undocumented
114 dh_installman
115 dh_link
116 dh_strip --exclude=wkhtmltopdf --exclude=cmc --exclude=waitmax --exclude agent_modbus
117 dh_compress
118 dh_fixperms
119 # dh_perl
120 # dh_makeshlibs
121 dh_installdeb
122 # dh_shlibdeps
123 dh_gencontrol
124 dh_md5sums
125 dh_builddeb
127 binary: binary-indep binary-arch
128 .PHONY: build clean binary-indep binary-arch binary install