Fix the package name, 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) DOSTATIC=true 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         touch build-arch-stamp
38
39 build-indep: build-indep-stamp
40 build-indep-stamp:
41         $(MAKE) newdoc
42
43         touch build-indep-stamp
44
45 build: build-arch build-indep
46
47 clean:
48         dh_testdir
49         dh_testroot
50         rm -f build-arch-stamp build-indep-stamp
51
52         $(MAKE) distclean
53         -rm -f busybox-deb busybox-static
54
55         dh_clean
56
57 install: build-arch
58         dh_testdir
59         dh_testroot
60         dh_clean -k
61         dh_installdirs
62
63         install busybox-deb $(CURDIR)/debian/busybox-cvs/bin/busybox
64         install busybox-static $(CURDIR)/debian/busybox-cvs-static/bin/busybox
65         $(MAKE) PREFIX=$(CURDIR)/debian/busybox-cvs-udeb install
66
67 # Build architecture-independent files here.
68 # Pass -i to all debhelper commands in this target to reduce clutter.
69 binary-indep: build
70         dh_testdir -i
71         dh_testroot -i
72 #       dh_installdebconf -i
73         dh_installdocs -i
74 #       dh_installexamples -i
75 #       dh_installmenu -i
76 #       dh_installlogrotate -i
77 #       dh_installemacsen -i
78 #       dh_installpam -i
79 #       dh_installmime -i
80 #       dh_installinit -i
81 #       dh_installcron -i
82 #       dh_installman -i
83 #       dh_installinfo -i
84 #       dh_undocumented -i
85         dh_installchangelogs Changelog -i
86         dh_link -i
87         dh_compress -i
88         dh_fixperms -i
89         dh_installdeb -i
90 #       dh_perl -i
91         dh_gencontrol -i
92         dh_md5sums -i
93         dh_builddeb -i
94
95 # Build architecture-dependent files here.
96 binary-arch: build-arch install
97         dh_testdir -a
98         dh_testroot -a
99 #       dh_installdebconf -a
100         dh_installdocs -a -Nbusybox-cvs-udeb
101 #       dh_installexamples -a
102 #       dh_installmenu -a
103 #       dh_installlogrotate -a
104 #       dh_installemacsen -a
105 #       dh_installpam -a
106 #       dh_installmime -a
107 #       dh_installinit -a
108 #       dh_installcron -a
109 #       dh_installman -a
110 #       dh_installinfo -a
111 #       dh_undocumented -a
112         dh_installchangelogs Changelog -a -Nbusybox-cvs-udeb
113         dh_strip -a
114         dh_link -a
115         dh_compress -a
116         dh_fixperms -a
117 #       dh_makeshlibs -a
118         dh_installdeb -a
119 #       dh_perl -a
120         dh_shlibdeps -a
121         dh_gencontrol -a
122         dh_md5sums -a -Nbusybox-cvs-udeb
123         dh_builddeb -a -Nbusybox-cvs-udeb
124         dpkg-distaddfile busybox-cvs-udeb_$(VERSION)_$(ARCH).udeb debian-installer optional
125         dh_builddeb -pbusybox-cvs-udeb --filename=busybox-cvs-udeb_$(VERSION)_$(ARCH).udeb
126
127 binary: binary-indep binary-arch
128 .PHONY: build clean binary-indep binary-arch binary install