diff options
author | Eric Andersen <andersen@codepoet.org> | 2000-12-01 22:59:04 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2000-12-01 22:59:04 +0000 |
commit | e73fda83111ce7f043be3028b440e8ba96cbf639 (patch) | |
tree | 5e36679181961866409e1ebfac972f88a4277a2e /debian/rules | |
parent | 29be79c5f6113ba8ab609cb17651fb8decf17c90 (diff) | |
download | busybox-w32-e73fda83111ce7f043be3028b440e8ba96cbf639.tar.gz busybox-w32-e73fda83111ce7f043be3028b440e8ba96cbf639.tar.bz2 busybox-w32-e73fda83111ce7f043be3028b440e8ba96cbf639.zip |
Update for handling .udebs and building using a pristine source dir...
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 173 |
1 files changed, 93 insertions, 80 deletions
diff --git a/debian/rules b/debian/rules index 67741b19f..d3e168631 100755 --- a/debian/rules +++ b/debian/rules | |||
@@ -1,61 +1,60 @@ | |||
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 | # This is a bit unusual, in that I have to completely recompile everything |
4 | # twice. The first is the normal, dynamically linked package. The second is | 4 | # for each package I build (obviously static and dynamic builds require |
5 | # for the statically linked package. This file has been adjusted accordingly. | 5 | # things to be recompiled...) |
6 | 6 | ||
7 | # This is the debhelper compatability version to use. | 7 | # This is the debhelper compatability version to use. |
8 | export DH_COMPAT=1 | 8 | #export DH_COMPAT=1 |
9 | 9 | ||
10 | bbbd=debian/busybox_builddir | ||
10 | bb=debian/tmp | 11 | bb=debian/tmp |
11 | bbbd=debian/bb_builddir | 12 | bbsbd=debian/busybox_static_builddir |
12 | bbs=debian/busybox-static | 13 | bbs=debian/busybox-static |
13 | bbsbd=debian/bb-static_builddir | 14 | bbubd=debian/busybox_udeb_builddir |
14 | 15 | bbu=debian/busybox-udeb | |
15 | #For the debian-installer .udeb package | ||
16 | PACKAGE=busybox-udeb | ||
17 | VERSION=$(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2) | ||
18 | ARCH=$(shell dpkg --print-architecture) | ||
19 | FILENAME=$(PACKAGE)_$(VERSION)_$(ARCH).udeb | ||
20 | PRIORITY=$(shell grep ^Priority: debian/control | cut -d ' ' -f 2) | ||
21 | 16 | ||
22 | clean: | 17 | clean: |
23 | dh_testdir | 18 | dh_testdir |
24 | dh_testroot | 19 | dh_testroot |
25 | rm -f build-stamp-busybox build-stamp-busybox-static | 20 | rm -f debian/build-stamp-busybox debian/build-stamp-busybox-static debian/build-stamp-busybox-udeb |
26 | -$(MAKE) clean | 21 | -$(MAKE) clean |
27 | -rm -rf $(bb) $(bbbd) $(bbs) $(bbsbd) | 22 | -rm -rf $(bb) $(bbbd) $(bbs) $(bbsbd) $(bbubd) $(bbu) |
28 | dh_clean | 23 | dh_clean |
29 | 24 | ||
30 | half_clean: | 25 | build: debian/build-stamp-busybox |
31 | dh_testdir | 26 | debian/build-stamp-busybox: |
32 | dh_testroot | ||
33 | rm -rf $(bbs) build-stamp-busybox-static | ||
34 | -$(MAKE) clean | ||
35 | |||
36 | build: build-stamp-busybox | ||
37 | build-stamp-busybox: | ||
38 | dh_testdir | 27 | dh_testdir |
39 | mkdir -p $(bbbd) | 28 | mkdir -p $(bbbd) |
40 | cp Makefile Config.h $(bbbd) | 29 | cp Makefile $(bbbd) |
30 | cp debian/Config.h-deb $(bbbd)/Config.h | ||
41 | (cd $(bbbd); $(MAKE) "BB_SRC_DIR=../../") | 31 | (cd $(bbbd); $(MAKE) "BB_SRC_DIR=../../") |
42 | touch build-stamp-busybox | 32 | touch debian/build-stamp-busybox |
43 | 33 | ||
44 | install: build | 34 | install: build |
45 | dh_testdir | 35 | dh_testdir |
46 | dh_testroot | 36 | dh_testroot |
47 | dh_clean -k | 37 | dh_clean -k |
48 | dh_installdirs | 38 | dh_installdirs |
49 | (cd $(bbbd); $(MAKE) "BB_SRC_DIR=../../" "PREFIX=../../$(bb)" install) | 39 | # Do not run 'make install', since we do not want all the symlinks. |
40 | # This just installes the busybox binary... | ||
41 | #(cd $(bbbd); $(MAKE) "BB_SRC_DIR=../../" "PREFIX=../../$(bb)" install) | ||
42 | mkdir -p $(bb)/bin/ | ||
43 | cp $(bbbd)/busybox $(bb)/bin/busybox | ||
44 | mkdir -p $(bb)/usr/share/doc/busybox/busybox.lineo.com | ||
45 | cp $(bbbd)/docs/busybox.lineo.com/BusyBox.html $(bb)/usr/share/doc/busybox/busybox.lineo.com/ | ||
50 | mkdir -p $(bb)/usr/share/man/man1 | 46 | mkdir -p $(bb)/usr/share/man/man1 |
51 | cp docs/BusyBox.1 $(bb)/usr/share/man/man1/busybox.1 | 47 | cp $(bbbd)/docs/BusyBox.1 $(bb)/usr/share/man/man1/busybox.1 |
52 | 48 | ||
53 | # Now for the statically linked stuff | 49 | # Now for the statically linked stuff |
54 | build-static: build-stamp-busybox-static | 50 | build-static: debian/build-stamp-busybox-static |
55 | build-stamp-busybox-static: | 51 | debian/build-stamp-busybox-static: |
56 | dh_testdir | 52 | dh_testdir |
57 | $(MAKE) DOSTATIC=true | 53 | mkdir -p $(bbsbd) |
58 | touch build-stamp-busybox-static | 54 | cp Makefile $(bbsbd) |
55 | cp debian/Config.h-deb $(bbsbd)/Config.h | ||
56 | (cd $(bbsbd); $(MAKE) DOSTATIC=true "BB_SRC_DIR=../../") | ||
57 | touch debian/build-stamp-busybox-static | ||
59 | 58 | ||
60 | install-static: build | 59 | install-static: build |
61 | dh_testdir | 60 | dh_testdir |
@@ -64,15 +63,59 @@ install-static: build | |||
64 | dh_installdirs | 63 | dh_installdirs |
65 | # Do not run 'make install', since we do not want all the symlinks. | 64 | # Do not run 'make install', since we do not want all the symlinks. |
66 | # This just installes the busybox binary... | 65 | # This just installes the busybox binary... |
67 | #$(MAKE) "PREFIX=$(bbs)" install | 66 | #(cd $(bbsbd); $(MAKE) "BB_SRC_DIR=../../" "PREFIX=../../$(bbs)" install) |
68 | mkdir -p $(bbs)/bin/ | 67 | mkdir -p $(bbs)/bin/ |
69 | cp busybox $(bbs)/bin/busybox | 68 | cp $(bbsbd)/busybox $(bbs)/bin/busybox |
69 | mkdir -p $(bbs)/usr/share/doc/busybox-static/busybox.lineo.com | ||
70 | cp $(bbsbd)/docs/busybox.lineo.com/BusyBox.html $(bbs)/usr/share/doc/busybox-static/busybox.lineo.com/ | ||
70 | mkdir -p $(bbs)/usr/share/man/man1/ | 71 | mkdir -p $(bbs)/usr/share/man/man1/ |
71 | cp docs/BusyBox.1 $(bbs)/usr/share/man/man1/busybox.1 | 72 | cp $(bbsbd)/docs/BusyBox.1 $(bbs)/usr/share/man/man1/busybox.1 |
73 | |||
74 | half_clean: | ||
75 | dh_testdir | ||
76 | dh_testroot | ||
77 | rm -rf $(bbs) debian/build-stamp-busybox-static | ||
78 | -$(MAKE) clean | ||
72 | 79 | ||
73 | do_static: half_clean build-static install-static | 80 | do_static: half_clean build-static install-static |
74 | 81 | ||
75 | 82 | ||
83 | |||
84 | # Now for the .udeb stuff | ||
85 | PACKAGE=busybox | ||
86 | VERSION=$(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2) | ||
87 | ARCH=$(shell dpkg --print-architecture) | ||
88 | FILENAME=$(PACKAGE)_$(VERSION)_$(ARCH).udeb | ||
89 | PRIORITY=$(shell grep ^Priority: debian/control | cut -d ' ' -f 2) | ||
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) "BB_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) "BB_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 | |||
76 | # Build architecture-independent files here. | 119 | # Build architecture-independent files here. |
77 | binary-indep: | 120 | binary-indep: |
78 | # We have nothing to do by default. | 121 | # We have nothing to do by default. |
@@ -85,30 +128,18 @@ busybox: install | |||
85 | dh_testdir | 128 | dh_testdir |
86 | dh_testroot | 129 | dh_testroot |
87 | dh_installdirs | 130 | dh_installdirs |
88 | # | 131 | dh_installdocs -p$@ $(bbbd)/docs/BusyBox.txt \ |
89 | #Note that for busybox, we do not install any docs, | 132 | $(bbbd)/docs/BusyBox.html docs/style-guide.txt \ |
90 | # or man apges or anything else. This is in blatent violation of every | 133 | docs/busybox.lineo.com AUTHORS README TODO |
91 | # Debian policy out there, since this package is intended to be used | 134 | rm -rf `find $(bb) -name CVS` |
92 | # _only_ by the debian-installer. | 135 | rm -f `find $(bb) -name .cvsignore` |
93 | # | 136 | dh_installchangelogs -p$@ Changelog |
94 | #dh_installdocs -p$@ docs/BusyBox.txt \ | 137 | dh_undocumented -p$@ |
95 | # docs/BusyBox.html docs/busybox.lineo.com AUTHORS README TODO | ||
96 | #rm -rf $(bb)/usr/share/doc/busybox/busybox.lineo.com/CVS \ | ||
97 | # $(bb)/usr/share/doc/busybox/busybox.lineo.com/.cvsignore \ | ||
98 | # $(bb)/usr/share/doc/busybox/busybox.lineo.com/images/CVS \ | ||
99 | # $(bb)/usr/share/doc/busybox/busybox.lineo.com/images/.cvsignore | ||
100 | #dh_undocumented -p$@ | ||
101 | #dh_installchangelogs -p$@ Changelog | ||
102 | dh_strip -p$@ | 138 | dh_strip -p$@ |
103 | dh_compress -p$@ | 139 | dh_compress -p$@ |
104 | dh_fixperms -p$@ | 140 | dh_fixperms -p$@ |
105 | dh_installdeb -p$@ | 141 | dh_installdeb -p$@ |
106 | dh_shlibdeps -p$@ | 142 | dh_shlibdeps -p$@ |
107 | # | ||
108 | #Make _very_ sure there are no docs lurking about. | ||
109 | # | ||
110 | rm -rf $(bb)/usr/share/doc | ||
111 | rm -rf $(bb)/usr/share/man | ||
112 | dh_gencontrol -p$@ | 143 | dh_gencontrol -p$@ |
113 | dh_md5sums -p$@ | 144 | dh_md5sums -p$@ |
114 | dh_builddeb -p$@ | 145 | dh_builddeb -p$@ |
@@ -119,14 +150,13 @@ busybox-static: do_static | |||
119 | dh_testdir | 150 | dh_testdir |
120 | dh_testroot | 151 | dh_testroot |
121 | dh_installdirs | 152 | dh_installdirs |
122 | dh_installdocs -p$@ docs/BusyBox.txt \ | 153 | dh_installdocs -p$@ $(bbsbd)/docs/BusyBox.txt \ |
123 | docs/BusyBox.html docs/busybox.lineo.com AUTHORS README TODO | 154 | $(bbsbd)/docs/BusyBox.html docs/style-guide.txt \ |
124 | rm -rf $(bbs)/usr/share/doc/busybox-static/busybox.lineo.com/CVS \ | 155 | docs/busybox.lineo.com AUTHORS README TODO |
125 | $(bbs)/usr/share/doc/busybox-static/busybox.lineo.com/.cvsignore \ | 156 | rm -rf `find $(bbs) -name CVS` |
126 | $(bbs)/usr/share/doc/busybox-static/busybox.lineo.com/images/CVS \ | 157 | rm -f `find $(bbs) -name .cvsignore` |
127 | $(bbs)/usr/share/doc/busybox-static/busybox.lineo.com/images/.cvsignore | ||
128 | dh_undocumented -p$@ | ||
129 | dh_installchangelogs -p$@ Changelog | 158 | dh_installchangelogs -p$@ Changelog |
159 | dh_undocumented -p$@ | ||
130 | dh_strip -p$@ | 160 | dh_strip -p$@ |
131 | dh_compress -p$@ | 161 | dh_compress -p$@ |
132 | dh_fixperms -p$@ | 162 | dh_fixperms -p$@ |
@@ -139,38 +169,21 @@ busybox-static: do_static | |||
139 | 169 | ||
140 | # Note that this builds a .udeb, which is not policy compliant or anything. | 170 | # Note that this builds a .udeb, which is not policy compliant or anything. |
141 | # | 171 | # |
142 | busybox-udeb: install | 172 | busybox-udeb: do_udeb |
143 | @echo "--- Building: $@" | 173 | @echo "--- Building: $@" |
144 | dh_testdir | 174 | dh_testdir |
145 | dh_testroot | 175 | dh_testroot |
146 | dh_installdirs | 176 | dh_installdirs |
147 | # | ||
148 | #Note that for busybox, we do not install any docs, | ||
149 | # or man apges or anything else. This is in blatent violation of every | ||
150 | # Debian policy out there, since this package is intended to be used | ||
151 | # _only_ by the debian-installer. | ||
152 | # | ||
153 | #dh_installdocs -p$@ docs/BusyBox.txt \ | ||
154 | # docs/BusyBox.html docs/busybox.lineo.com AUTHORS README TODO | ||
155 | #rm -rf $(bb)/usr/share/doc/busybox/busybox.lineo.com/CVS \ | ||
156 | # $(bb)/usr/share/doc/busybox/busybox.lineo.com/.cvsignore \ | ||
157 | # $(bb)/usr/share/doc/busybox/busybox.lineo.com/images/CVS \ | ||
158 | # $(bb)/usr/share/doc/busybox/busybox.lineo.com/images/.cvsignore | ||
159 | #dh_undocumented -p$@ | ||
160 | #dh_installchangelogs -p$@ Changelog | ||
161 | dh_strip -p$@ | 177 | dh_strip -p$@ |
162 | dh_compress -p$@ | 178 | dh_compress -p$@ |
163 | dh_fixperms -p$@ | 179 | dh_fixperms -p$@ |
164 | dh_installdeb -p$@ | 180 | dh_installdeb -p$@ |
165 | dh_shlibdeps -p$@ | 181 | dh_shlibdeps -p$@ |
166 | # | ||
167 | #Make _very_ sure there are no docs lurking about. | 182 | #Make _very_ sure there are no docs lurking about. |
168 | # | 183 | rm -rf $(bbu)/usr/share/man |
169 | rm -rf $(bb)/usr/share/doc | 184 | #dh_gencontrol -p$@ |
170 | rm -rf $(bb)/usr/share/man | ||
171 | dh_gencontrol -p$@ | ||
172 | # Don't write your stupid guesses to debian/files. | 185 | # Don't write your stupid guesses to debian/files. |
173 | #dh_gencontrol -p$@ -- -fdebian/files~ | 186 | dh_gencontrol -p$@ -- -fdebian/files~ |
174 | # Register file manually. | 187 | # Register file manually. |
175 | dpkg-distaddfile $(FILENAME) debian-installer $(PRIORITY) | 188 | dpkg-distaddfile $(FILENAME) debian-installer $(PRIORITY) |
176 | dh_md5sums -p$@ | 189 | dh_md5sums -p$@ |