check_logfiles: update to 3.7.3
[omd.git] / debian / rules
blob84cb85a7b04564e72f8b0d52233bfdff540efbd7
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 ifdef BUILD_CACHE
16 DEFAULT_BUILD=build-cached
17 else
18 DEFAULT_BUILD=build
19 endif
22 build: patch build-stamp
23 build-stamp:
24 dh_testdir
26 # Add here commands to compile the package.
27 # ./configure
28 $(MAKE) -j 4 $(DEFAULT_BUILD)
30 touch build-stamp
32 clean: clean-patched unpatch
33 dh_testdir
34 dh_testroot
35 rm -f build-stamp
37 # Add here commands to clean up after the build process.
38 $(MAKE) clean
39 #$(MAKE) distclean
40 rm -f $(_PWD)/debian/postinst
41 rm -f $(_PWD)/debian/preinst
42 rm -f $(_PWD)/debian/prerm
43 rm -f $(_PWD)/debian/postrm
44 rm -f $(_PWD)/debian/init
45 rm -f $(_PWD)/debian/links
46 rm -f $(_PWD)/debian/*.debhelper
47 rm -rf $(_PWD)/debian/omd-[0-9].[0-9.]*
48 rm -rf $(_PWD)/debian/omd-[1-9][0-9].[0-9.]*
50 dh_clean
52 clean-patched:
53 dh_testdir
54 dh_testroot
55 ${MAKE} clean
57 patch: patch-stamp
58 patch-stamp:
59 dpatch apply-all
60 dpatch cat-all >patch-stamp
62 unpatch:
63 dpatch deapply-all
64 rm -rf patch-stamp debian/patched
66 install: build
67 dh_testdir
68 dh_testroot
69 dh_prep
70 dh_installdirs
72 # Add here commands to install the package into debian/<packagename>
73 #$(MAKE) prefix=$(_PWD)/debian/`dh_listpackages`/usr install
74 $(MAKE) DESTDIR=$(_PWD)/debian/`dh_listpackages` pack
75 # -- remove version independent dirs, will be created later by postinst
76 rm -f $(_PWD)/debian/`dh_listpackages`/usr/bin/omd
77 rmdir $(_PWD)/debian/`dh_listpackages`/usr/bin
78 rm -f $(_PWD)/debian/`dh_listpackages`/usr/share/man/man8/omd.8.gz
79 rm -f $(_PWD)/debian/`dh_listpackages`/omd
80 rmdir $(_PWD)/debian/`dh_listpackages`/opt/omd/apache
81 rmdir $(_PWD)/debian/`dh_listpackages`/opt/omd/sites
82 rm -f $(_PWD)/debian/`dh_listpackages`/opt/omd/versions/default
83 rm -rf $(_PWD)/debian/`dh_listpackages`/etc/apache2
84 rm -f $(_PWD)/debian/`dh_listpackages`/etc/init.d/omd
85 mv -f $(_PWD)/omd-bin-$(OMD_VERSION).tar.gz $(_PWD)/..
87 sed -e 's/###OMD_VERSION###/$(OMD_VERSION)/g' \
88 -e 's/###OMD_SERIAL###/$(OMD_SERIAL)/g' \
89 $(_PWD)/debian/postinst.in > $(_PWD)/debian/postinst
90 sed -e 's/###OMD_VERSION###/$(OMD_VERSION)/g' \
91 $(_PWD)/debian/preinst.in > $(_PWD)/debian/preinst
92 sed -e 's/###OMD_VERSION###/$(OMD_VERSION)/g' \
93 $(_PWD)/debian/prerm.in > $(_PWD)/debian/prerm
94 sed -e 's/###OMD_VERSION###/$(OMD_VERSION)/g' \
95 $(_PWD)/debian/postrm.in > $(_PWD)/debian/postrm
96 sed -e 's/###OMD_VERSION###/$(OMD_VERSION)/g' \
97 $(_PWD)/debian/init.in > $(_PWD)/debian/init
98 sed -e 's/###OMD_VERSION###/$(OMD_VERSION)/g' \
99 $(_PWD)/debian/links.in > $(_PWD)/debian/links
101 # Build architecture-independent files here.
102 binary-indep: build install
103 # We have nothing to do by default.
105 # Build architecture-dependent files here.
106 binary-arch: build install
107 dh_testdir
108 dh_testroot
109 dh_installchangelogs
110 dh_installdocs
111 dh_installexamples
112 # dh_install
113 # dh_installmenu
114 dh_installdebconf -n
115 # dh_installlogrotate
116 # dh_installemacsen
117 # dh_installcatalogs
118 # dh_installpam
119 # dh_installmime
120 dh_installinit
121 # dh_installcron
122 # dh_installinfo
123 # dh_installwm
124 # dh_installudev
125 # dh_lintian
126 # dh_bugfiles
127 # dh_undocumented
128 dh_installman
129 dh_link
130 dh_strip --exclude=wkhtmltopdf
131 dh_compress
132 dh_fixperms
133 # dh_perl
134 # dh_makeshlibs
135 dh_installdeb
136 # dh_shlibdeps
137 dh_gencontrol
138 dh_md5sums
139 dh_builddeb
141 binary: binary-indep binary-arch
142 .PHONY: build clean binary-indep binary-arch binary install