diff options
author | Glenn L McGrath <bug1@ihug.co.nz> | 2002-11-23 07:14:55 +0000 |
---|---|---|
committer | Glenn L McGrath <bug1@ihug.co.nz> | 2002-11-23 07:14:55 +0000 |
commit | 1b16bf6b1bd624ef37bb9289cfc9fef266aa1707 (patch) | |
tree | 335fdac78b50d6f878eaf24599e2cb953ac9c983 | |
parent | 77dbaa48df05a139dd427c685386397ee81f40e3 (diff) | |
download | busybox-w32-1b16bf6b1bd624ef37bb9289cfc9fef266aa1707.tar.gz busybox-w32-1b16bf6b1bd624ef37bb9289cfc9fef266aa1707.tar.bz2 busybox-w32-1b16bf6b1bd624ef37bb9289cfc9fef266aa1707.zip |
New rules file for unstable
-rwxr-xr-x | debian/rules | 238 |
1 files changed, 59 insertions, 179 deletions
diff --git a/debian/rules b/debian/rules index a84153693..b812bc249 100755 --- a/debian/rules +++ b/debian/rules | |||
@@ -1,193 +1,73 @@ | |||
1 | #!/usr/bin/make -f | 1 | #!/usr/bin/make -f |
2 | 2 | ||
3 | # This is a bit unusual, in that I have to completely recompile everything | 3 | export DH_VERBOSE=1 |
4 | # for each package I build (obviously static and dynamic builds require | 4 | export DH_COMPAT=3 |
5 | # things to be recompiled...) | ||
6 | 5 | ||
7 | # This is the debhelper compatability version to use. | 6 | ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) |
8 | #export DH_COMPAT=1 | 7 | CFLAGS += -g |
8 | endif | ||
9 | ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) | ||
10 | INSTALL_PROGRAM += -s | ||
11 | endif | ||
9 | 12 | ||
10 | bbbd=debian/busybox_builddir | ||
11 | bb=debian/tmp | ||
12 | bbsbd=debian/busybox_static_builddir | ||
13 | bbs=debian/busybox-static | ||
14 | bbubd=debian/busybox_udeb_builddir | ||
15 | bbu=debian/busybox-udeb | ||
16 | |||
17 | clean: | ||
18 | dh_testdir | ||
19 | dh_testroot | ||
20 | rm -f debian/build-stamp-busybox debian/build-stamp-busybox-static debian/build-stamp-busybox-udeb | ||
21 | -$(MAKE) clean | ||
22 | -rm -rf $(bb) $(bbbd) $(bbs) $(bbsbd) $(bbubd) $(bbu) | ||
23 | dh_clean | ||
24 | |||
25 | build: debian/build-stamp-busybox | ||
26 | debian/build-stamp-busybox: | ||
27 | dh_testdir | ||
28 | mkdir -p $(bbbd) | ||
29 | cp Makefile $(bbbd) | ||
30 | cp debian/Config.h-deb $(bbbd)/Config.h | ||
31 | -(cd $(bbbd); $(MAKE) "CONFIG_SRC_DIR=../../" applet_source_list) | ||
32 | (cd $(bbbd); $(MAKE) USE_SYSTEM_PWD_GRP=false "CONFIG_SRC_DIR=../../") | ||
33 | touch debian/build-stamp-busybox | ||
34 | |||
35 | install: build | ||
36 | dh_testdir | ||
37 | dh_testroot | ||
38 | dh_clean -k | ||
39 | dh_installdirs | ||
40 | # Do not run 'make install', since we do not want all the symlinks. | ||
41 | # This just installes the busybox binary... | ||
42 | #(cd $(bbbd); $(MAKE) "CONFIG_SRC_DIR=../../" "PREFIX=../../$(bb)" install) | ||
43 | mkdir -p $(bb)/bin/ | ||
44 | cp $(bbbd)/busybox $(bb)/bin/busybox | ||
45 | mkdir -p $(bb)/usr/share/doc/busybox/busybox.net | ||
46 | cp $(bbbd)/docs/busybox.net/BusyBox.html $(bb)/usr/share/doc/busybox/busybox.net/ | ||
47 | mkdir -p $(bb)/usr/share/man/man1 | ||
48 | cp $(bbbd)/docs/BusyBox.1 $(bb)/usr/share/man/man1/busybox.1 | ||
49 | |||
50 | # Now for the statically linked stuff | ||
51 | build-static: debian/build-stamp-busybox-static | ||
52 | debian/build-stamp-busybox-static: | ||
53 | dh_testdir | ||
54 | mkdir -p $(bbsbd) | ||
55 | cp Makefile $(bbsbd) | ||
56 | cp debian/Config.h-static $(bbsbd)/Config.h | ||
57 | (cd $(bbsbd); $(MAKE) DOSTATIC=true USE_SYSTEM_PWD_GRP=false "CONFIG_SRC_DIR=../../") | ||
58 | touch debian/build-stamp-busybox-static | ||
59 | |||
60 | install-static: build | ||
61 | dh_testdir | ||
62 | dh_testroot | ||
63 | dh_clean -k | ||
64 | dh_installdirs | ||
65 | # Do not run 'make install', since we do not want all the symlinks. | ||
66 | # This just installes the busybox binary... | ||
67 | #(cd $(bbsbd); $(MAKE) "CONFIG_SRC_DIR=../../" "PREFIX=../../$(bbs)" install) | ||
68 | mkdir -p $(bbs)/bin/ | ||
69 | cp $(bbsbd)/busybox $(bbs)/bin/busybox | ||
70 | mkdir -p $(bbs)/usr/share/doc/busybox-static/busybox.net | ||
71 | cp $(bbsbd)/docs/busybox.net/BusyBox.html $(bbs)/usr/share/doc/busybox-static/busybox.net/ | ||
72 | mkdir -p $(bbs)/usr/share/man/man1/ | ||
73 | cp $(bbsbd)/docs/BusyBox.1 $(bbs)/usr/share/man/man1/busybox.1 | ||
74 | |||
75 | half_clean: | ||
76 | dh_testdir | ||
77 | dh_testroot | ||
78 | rm -rf $(bbs) debian/build-stamp-busybox-static | ||
79 | -$(MAKE) clean | ||
80 | |||
81 | do_static: half_clean build-static install-static | ||
82 | |||
83 | |||
84 | |||
85 | # Now for the .udeb stuff | ||
86 | PACKAGE=busybox-udeb | ||
87 | VERSION=$(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2 | sed -e s/[0-9]://g) | ||
88 | ARCH=$(shell dpkg --print-architecture) | ||
89 | FILENAME=$(PACKAGE)_$(VERSION)_$(ARCH).udeb | ||
90 | |||
91 | build-udeb: debian/build-stamp-busybox-udeb | ||
92 | debian/build-stamp-busybox-udeb: | ||
93 | dh_testdir | ||
94 | mkdir -p $(bbubd) | ||
95 | cp Makefile $(bbubd) | ||
96 | cp debian/Config.h-udeb $(bbubd)/Config.h | ||
97 | (cd $(bbubd); $(MAKE) USE_SYSTEM_PWD_GRP=false "CONFIG_SRC_DIR=../../") | ||
98 | touch debian/build-stamp-busybox-udeb | ||
99 | |||
100 | install-udeb: build | ||
101 | dh_testdir | ||
102 | dh_testroot | ||
103 | dh_clean -k | ||
104 | dh_installdirs | ||
105 | (cd $(bbubd); $(MAKE) "CONFIG_SRC_DIR=../../" "PREFIX=../../$(bbu)" install) | ||
106 | mkdir -p $(bbu)/usr/share/man/man1/ | ||
107 | cp $(bbubd)/docs/BusyBox.1 $(bbu)/usr/share/man/man1/busybox.1 | ||
108 | |||
109 | three_quarter_clean: | ||
110 | dh_testdir | ||
111 | dh_testroot | ||
112 | rm -rf $(bbu) debian/build-stamp-busybox-udeb | ||
113 | -$(MAKE) clean | ||
114 | |||
115 | do_udeb: three_quarter_clean build-udeb install-udeb | ||
116 | |||
117 | |||
118 | |||
119 | # Build architecture-independent files here. | ||
120 | binary-indep: | 13 | binary-indep: |
121 | # We have nothing to do by default. | ||
122 | |||
123 | # Build architecture-dependent files here. | ||
124 | binary-arch: busybox busybox-static busybox-udeb | ||
125 | 14 | ||
126 | busybox: install | 15 | busybox-deb: |
127 | @echo "--- Building: $@" | ||
128 | dh_testdir | 16 | dh_testdir |
129 | dh_testroot | 17 | dh_testroot |
130 | dh_installdirs | 18 | $(MAKE) clean |
131 | dh_installdocs -p$@ $(bbbd)/docs/BusyBox.txt \ | 19 | cp ./debian/config-deb .config |
132 | $(bbbd)/docs/BusyBox.html docs/style-guide.txt \ | 20 | $(MAKE) dep |
133 | docs/busybox.net AUTHORS README TODO | 21 | $(MAKE) |
134 | rm -rf `find $(bb) -name CVS` | 22 | install -D busybox ./debian/busybox/bin/busybox |
135 | rm -f `find $(bb) -name .cvsignore` | 23 | dh_installchangelogs Changelog -pbusybox |
136 | dh_installchangelogs -p$@ Changelog | 24 | dh_strip -pbusybox |
137 | dh_undocumented -p$@ | 25 | dh_compress -pbusybox |
138 | dh_strip -p$@ | 26 | dh_fixperms -pbusybox |
139 | dh_compress -p$@ | 27 | dh_installdeb -pbusybox |
140 | dh_fixperms -p$@ | 28 | dh_shlibdeps -pbusybox |
141 | dh_installdeb -p$@ | 29 | dh_gencontrol -pbusybox |
142 | dh_shlibdeps -p$@ | 30 | dh_md5sums -pbusybox |
143 | dh_gencontrol -p$@ | 31 | dh_builddeb -pbusybox |
144 | dh_md5sums -p$@ | 32 | |
145 | dh_builddeb -p$@ | 33 | busybox-udeb: |
146 | |||
147 | |||
148 | busybox-static: do_static | ||
149 | @echo "--- Building: $@" | ||
150 | dh_testdir | 34 | dh_testdir |
151 | dh_testroot | 35 | dh_testroot |
152 | dh_installdirs | 36 | $(MAKE) clean |
153 | dh_installdocs -p$@ $(bbsbd)/docs/BusyBox.txt \ | 37 | cp ./debian/config-udeb .config |
154 | $(bbsbd)/docs/BusyBox.html docs/style-guide.txt \ | 38 | $(MAKE) dep |
155 | docs/busybox.net AUTHORS README TODO | 39 | $(MAKE) |
156 | rm -rf `find $(bbs) -name CVS` | 40 | install -D busybox ./debian/busybox-udeb/bin/busybox |
157 | rm -f `find $(bbs) -name .cvsignore` | 41 | dh_installchangelogs Changelog -pbusybox-udeb |
158 | dh_installchangelogs -p$@ Changelog | 42 | dh_strip -pbusybox-udeb |
159 | dh_undocumented -p$@ | 43 | dh_compress -pbusybox-udeb |
160 | dh_strip -p$@ | 44 | dh_fixperms -pbusybox-udeb |
161 | dh_compress -p$@ | 45 | dh_installdeb -pbusybox-udeb |
162 | dh_fixperms -p$@ | 46 | dh_shlibdeps -pbusybox-udeb |
163 | dh_installdeb -p$@ | 47 | dh_gencontrol -pbusybox-udeb |
164 | dh_shlibdeps -p$@ | 48 | dh_md5sums -pbusybox-udeb |
165 | dh_gencontrol -p$@ | 49 | dh_builddeb -pbusybox-udeb |
166 | dh_md5sums -p$@ | 50 | |
167 | dh_builddeb -p$@ | 51 | |
168 | 52 | busybox-static: | |
169 | |||
170 | # Note that this builds a .udeb, which is not policy compliant or anything. | ||
171 | # | ||
172 | busybox-udeb: do_udeb | ||
173 | @echo "--- Building: $@" | ||
174 | dh_testdir | 53 | dh_testdir |
175 | dh_testroot | 54 | dh_testroot |
176 | dh_installdirs | 55 | $(MAKE) clean |
177 | dh_strip -p$@ | 56 | cp ./debian/config-static .config |
178 | dh_compress -p$@ | 57 | $(MAKE) dep |
179 | dh_fixperms -p$@ | 58 | $(MAKE) |
180 | dh_installdeb -p$@ | 59 | install -D busybox ./debian/busybox-static/bin/busybox |
181 | dh_shlibdeps -p$@ | 60 | dh_installchangelogs Changelog -pbusybox-static |
182 | #Make _very_ sure there are no docs lurking about. | 61 | dh_strip -pbusybox-static |
183 | rm -rf $(bbu)/usr/share/man | 62 | dh_compress -pbusybox-static |
184 | #dh_gencontrol -p$@ | 63 | dh_fixperms -pbusybox-static |
185 | # Don't write your stupid guesses to debian/files. | 64 | dh_installdeb -pbusybox-static |
186 | dh_gencontrol -p$@ -- -fdebian/files~ | 65 | dh_shlibdeps -pbusybox-static |
187 | # Register file manually. | 66 | dh_gencontrol -pbusybox-static |
188 | dpkg-distaddfile $(FILENAME) debian-installer standard | 67 | dh_md5sums -pbusybox-static |
189 | dh_md5sums -p$@ | 68 | dh_builddeb -pbusybox-static |
190 | dh_builddeb -p$@ --filename=$(FILENAME) | 69 | |
70 | binary-arch: busybox-deb busybox-udeb busybox-static | ||
191 | 71 | ||
192 | binary: binary-indep binary-arch | 72 | binary: binary-indep binary-arch |
193 | .PHONY: build clean binary-indep binary-arch binary install | 73 | .PHONY: build clean binary-indep binary-arch binary install configure |