3 # Sample debian/rules that uses debhelper.
4 # This file was originally written by Joey Hess and Craig Small.
5 # As a special exception, when this file is copied by dh-make into a
6 # dh-make output file, you may use that output file without restriction.
7 # This special exception was added by Craig Small in version 0.37 of dh-make.
9 # Uncomment this to turn on verbose mode.
12 b=$(CURDIR)/debian/build
13 VERSION:=$(shell dpkg-parsechangelog | awk '/Version: / { print $$2 }')
19 egrep -q "GRML_LIVE_VERSION=.*UNRELEASED" grml-live || \
20 (echo "Wrong version in grml-live" && exit 2)
21 cd docs && $(MAKE) && cd ../
29 # Add here commands to clean up after the build process.
30 cd docs && $(MAKE) clean && cd ../
33 # clean up the stuff dh_clean leaves behind
43 @echo "--- Building: $@"
44 dh_installdirs -p$@ -P$(b)/$@
45 dh_link -p$@ -P$(b)/$@
46 dh_installdocs -p$@ -P$(b)/$@
47 dh_installchangelogs -p$@ -P$(b)/$@
48 dh_install -p$@ -P$(b)/$@
49 sed -i -e "s/GRML_LIVE_VERSION='\*\*\*UNRELEASED\*\*\*'/GRML_LIVE_VERSION='$(VERSION)'/" $(b)/$@/usr/sbin/grml-live
50 dh_strip -p$@ -P$(b)/$@
51 dh_compress -p$@ -P$(b)/$@
52 mkdir -p $(b)/$(@)/usr/share/lintian/overrides/
53 cp -av debian/overrides.$(@) $(b)/$(@)/usr/share/lintian/overrides/$(@)
54 dh_fixperms -p$@ -P$(b)/$@
55 # make sure they are executable:
56 chmod 755 $(b)/$(@)/etc/grml/fai/config/hooks/*
57 dh_makeshlibs -p$@ -P$(b)/$@ -V
58 dh_installdeb -p$@ -P$(b)/$@
59 dh_shlibdeps -p$@ -P$(b)/$@
60 dh_installdebconf -p$@ -P$(b)/$@
61 dh_gencontrol -p$@ -P$(b)/$@
62 dh_md5sums -p$@ -P$(b)/$@
63 dh_builddeb -p$@ -P$(b)/$@
66 @echo "--- Building: $@"
67 dh_installdirs -p$@ -P$(b)/$@
68 dh_link -p$@ -P$(b)/$@
69 dh_installdocs -p$@ -P$(b)/$@
70 dh_installchangelogs -p$@ -P$(b)/$@
71 dh_install -p$@ -P$(b)/$@
72 dh_strip -p$@ -P$(b)/$@
73 dh_compress -p$@ -P$(b)/$@
74 mkdir -p $(b)/$(@)/usr/share/lintian/overrides/
75 cp -av debian/overrides.$(@) $(b)/$(@)/usr/share/lintian/overrides/$(@)
76 dh_fixperms -p$@ -P$(b)/$@
77 dh_makeshlibs -p$@ -P$(b)/$@ -V
78 dh_installdeb -p$@ -P$(b)/$@
79 dh_shlibdeps -p$@ -P$(b)/$@
80 dh_installdebconf -p$@ -P$(b)/$@
81 dh_gencontrol -p$@ -P$(b)/$@
82 dh_md5sums -p$@ -P$(b)/$@
83 dh_builddeb -p$@ -P$(b)/$@
85 # Build architecture-dependent files here.
86 binary-all: build install
88 # Build architecture-independent files here.
89 binary-indep: build install grml-live grml-live-db
91 binary: binary-indep binary-arch
92 .PHONY: build clean binary-indep binary-arch binary install