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