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.
16 DEFAULT_BUILD
=build-cached
22 build
: patch build-stamp
26 # Add here commands to compile the package.
28 $(MAKE
) -j
4 $(DEFAULT_BUILD
)
32 clean: clean-patched unpatch
37 # Add here commands to clean up after the build process.
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.
]*
60 dpatch cat-all
>patch-stamp
64 rm -rf patch-stamp debian
/patched
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
115 # dh_installlogrotate
130 dh_strip
--exclude
=wkhtmltopdf
141 binary
: binary-indep binary-arch
142 .PHONY
: build
clean binary-indep binary-arch binary
install