Adding live-initramfs 1.87.3-1.
[live-boot-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 CFLAGS = -Wall -g
7
8 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
9         CFLAGS += -O0
10 else
11         CFLAGS += -O2
12 endif
13
14 upstream:
15         # Needs: subversion
16         cd .. && svn co svn://svn.debian.org/debian-live/dists/trunk/live-initramfs || true
17         find . -type d -name .svn | xargs rm -rf
18
19 build: build-stamp
20 build-stamp:
21         dh_testdir
22
23         # Building package
24         CFLAGS="$(CFLAGS)" $(MAKE)
25
26         touch build-stamp
27
28 clean:
29         dh_testdir
30         dh_testroot
31         rm -f build-stamp
32
33         # Cleaning package
34         $(MAKE) clean
35
36         dh_clean
37
38 install: build
39         dh_testdir
40         dh_testroot
41         dh_clean -k
42         dh_installdirs
43
44         # Installing package
45         $(MAKE) install DESTDIR=$(CURDIR)/debian/live-initramfs
46
47         # Removing double files
48         rm -f debian/live-initramfs/usr/share/doc/live-initramfs/COPYING
49         rm -f debian/live-initramfs/usr/share/doc/live-initramfs/ChangeLog
50         mv debian/live-initramfs/usr/share/doc/live-initramfs/ChangeLog.casper debian/live-initramfs/usr/share/doc/live-initramfs/changelog.casper
51
52 binary-indep: build install
53
54 binary-arch: build install
55         dh_testdir
56         dh_testroot
57         dh_installchangelogs docs/ChangeLog
58         dh_installdocs
59         dh_install
60         dh_installinit --no-restart-on-upgrade --no-start -- start 89 0 6 .
61         dh_strip
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