Patch for the debian-cvs package, ip* applets in /bin, patch from Bastian Blank
[oweals/busybox.git] / debian / rules
1 #!/usr/bin/make -f
2
3 # Uncomment this to turn on verbose mode.
4 #export DH_VERBOSE=1
5
6 # This is the debhelper compatibility version to use.
7 export DH_COMPAT=3
8
9 VERSION = $(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)
10 ARCH = $(shell dpkg --print-architecture)
11
12 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
13         DODEBUG = true
14 endif
15 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
16 endif
17
18 build-arch: build-arch-stamp
19 build-arch-stamp:
20         $(MAKE) clean
21         cp ./debian/config-deb .config
22         $(MAKE) dep
23         $(MAKE) DODEBUG=$(DODEBUG)
24         install busybox busybox-deb
25
26         $(MAKE) clean
27         cp ./debian/config-static .config
28         $(MAKE) dep
29         $(MAKE) DODEBUG=$(DODEBUG)
30         install busybox busybox-static
31
32         $(MAKE) clean
33         cp ./debian/config-udeb .config
34         $(MAKE) dep
35         $(MAKE) DODEBUG=$(DODEBUG)
36
37         $(MAKE) docs/BusyBox.1
38
39         touch build-arch-stamp
40
41 build: build-arch
42
43 clean:
44         dh_testdir
45         dh_testroot
46         rm -f build-arch-stamp build-indep-stamp debian/files~
47
48         $(MAKE) distclean
49         -rm -f busybox-deb busybox-static busybox.1
50
51         dh_clean
52
53 install: build-arch
54         dh_testdir
55         dh_testroot
56         dh_clean -k
57         dh_installdirs
58
59         install busybox-deb $(CURDIR)/debian/busybox-cvs/bin/busybox
60         install busybox-static $(CURDIR)/debian/busybox-cvs-static/bin/busybox
61         $(MAKE) PREFIX=$(CURDIR)/debian/busybox-cvs-udeb install
62         cp docs/BusyBox.1 busybox.1
63
64         install -m644 debian/busybox-cvs-static.override \
65                 debian/busybox-cvs-static/usr/share/lintian/overrides/busybox-cvs-static
66
67 # Build architecture-dependent files here.
68 binary-arch: build-arch install
69         dh_testdir -a
70         dh_testroot -a
71 #       dh_installdebconf -a
72         dh_installdocs -a -Nbusybox-cvs-udeb
73 #       dh_installexamples -a
74 #       dh_installmenu -a
75 #       dh_installlogrotate -a
76 #       dh_installemacsen -a
77 #       dh_installpam -a
78 #       dh_installmime -a
79 #       dh_installinit -a
80 #       dh_installcron -a
81         dh_installman -a -Nbusybox-cvs-udeb
82 #       dh_installinfo -a
83 #       dh_undocumented -a
84         dh_installchangelogs Changelog -a -Nbusybox-cvs-udeb
85         dh_strip -a
86         dh_link -a
87         dh_compress -a
88         dh_fixperms -a
89 #       dh_makeshlibs -a
90         dh_installdeb -a
91 #       dh_perl -a
92         dh_shlibdeps -a
93         dh_gencontrol -a -Nbusybox-cvs-udeb
94         dh_md5sums -a -Nbusybox-cvs-udeb
95         dh_builddeb -a -Nbusybox-cvs-udeb
96
97         dh_gencontrol -pbusybox-cvs-udeb -- -fdebian/files~
98         dpkg-distaddfile busybox-cvs-udeb_$(VERSION)_$(ARCH).udeb debian-installer extra
99         dh_builddeb -pbusybox-cvs-udeb --filename=busybox-cvs-udeb_$(VERSION)_$(ARCH).udeb
100
101 binary: binary-arch
102 .PHONY: build clean binary-indep binary-arch binary install