Rebase debian/rules
[live-initramfs-grml.git] / debian / rules
1 #!/usr/bin/make -f
2
3 # Uncomment this to turn on verbose mode.
4 #export DH_VERBOSE=1
5
6 upstream:
7         cd .. && git clone git://git.debian.org/git/users/daniel/live-initramfs.git || true
8         rm -rf ../live-initramfs/.git
9
10 build: build-stamp
11 build-stamp: patch
12         dh_testdir
13
14         # Building package
15         $(MAKE) -C manpages
16
17         touch build-stamp
18
19 clean: unpatch
20         dh_testdir
21         dh_testroot
22         rm -f build-stamp
23
24         # Cleaning package
25         $(MAKE) -C manpages clean
26
27         dh_clean
28
29 patch: patch-stamp
30
31 patch-stamp:
32         dpatch apply-all
33         dpatch cat-all >patch-stamp
34
35 unpatch:
36         dpatch deapply-all
37         rm -rf patch-stamp debian/patched
38
39 install: build
40         dh_testdir
41         dh_testroot
42         dh_clean -k
43         dh_installdirs
44
45         # Installing package
46         $(MAKE) install DESTDIR=$(CURDIR)/debian/live-initramfs
47
48         # Removing double files
49         rm -f debian/live-initramfs/usr/share/doc/live-initramfs/COPYING
50         rm -f debian/live-initramfs/usr/share/doc/live-initramfs/ChangeLog
51         mv debian/live-initramfs/usr/share/doc/live-initramfs/ChangeLog.casper debian/live-initramfs/usr/share/doc/live-initramfs/changelog.casper
52
53 binary-arch: build install
54
55 binary-indep: build install
56         dh_testdir
57         dh_testroot
58         dh_installchangelogs docs/ChangeLog
59         dh_installdocs
60         dh_install
61         dh_installinit --no-restart-on-upgrade --no-start -- start 89 0 6 .
62         dh_compress
63         dh_fixperms
64         dh_installdeb
65         dh_gencontrol
66         dh_md5sums
67         dh_builddeb
68
69 binary: binary-indep binary-arch
70 .PHONY: build clean binary-indep binary-arch binary install