diff options
author | Glenn L McGrath <bug1@ihug.co.nz> | 2004-01-01 00:23:01 +0000 |
---|---|---|
committer | Glenn L McGrath <bug1@ihug.co.nz> | 2004-01-01 00:23:01 +0000 |
commit | a43faccbdebe37668390e26ff099faf56e1be6e5 (patch) | |
tree | a1a373d4b57708e3accea2abd2e80c2061ba1289 /debian/rules | |
parent | 5c9f0d05b3af7870d5ba6c40bcadf94b55663c58 (diff) | |
download | busybox-w32-a43faccbdebe37668390e26ff099faf56e1be6e5.tar.gz busybox-w32-a43faccbdebe37668390e26ff099faf56e1be6e5.tar.bz2 busybox-w32-a43faccbdebe37668390e26ff099faf56e1be6e5.zip |
Sync to waldi's subversion archive
Diffstat (limited to '')
-rwxr-xr-x | debian/rules | 139 |
1 files changed, 81 insertions, 58 deletions
diff --git a/debian/rules b/debian/rules index 82bf9f04a..e77b4ef96 100755 --- a/debian/rules +++ b/debian/rules | |||
@@ -3,10 +3,9 @@ | |||
3 | # Uncomment this to turn on verbose mode. | 3 | # Uncomment this to turn on verbose mode. |
4 | #export DH_VERBOSE=1 | 4 | #export DH_VERBOSE=1 |
5 | 5 | ||
6 | # This is the debhelper compatibility version to use. | ||
7 | export DH_COMPAT=3 | ||
8 | |||
9 | DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) | 6 | DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) |
7 | DEB_HOST_GNU_CPU ?= $(shell dpkg-architecture -qDEB_HOST_GNU_CPU) | ||
8 | DEB_HOST_GNU_SYSTEM ?= $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM) | ||
10 | 9 | ||
11 | VERSION = $(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2) | 10 | VERSION = $(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2) |
12 | 11 | ||
@@ -18,25 +17,39 @@ endif | |||
18 | 17 | ||
19 | PACKAGE_PREFIX = busybox-cvs | 18 | PACKAGE_PREFIX = busybox-cvs |
20 | 19 | ||
20 | ARCH_FLOPPY_UDEB = $(shell sh debian/control-extract Architecture $(PACKAGE_PREFIX)-floppy-udeb) | ||
21 | |||
21 | PACKAGES_DEB = $(PACKAGE_PREFIX) $(PACKAGE_PREFIX)-static | 22 | PACKAGES_DEB = $(PACKAGE_PREFIX) $(PACKAGE_PREFIX)-static |
22 | PACKAGES_UDEB = $(PACKAGE_PREFIX)-udeb | 23 | PACKAGES_UDEB = $(PACKAGE_PREFIX)-udeb |
23 | ifneq ($(wildcard ./debian/config-net-udeb-$(DEB_HOST_ARCH)),) | 24 | ifneq ($(filter $(DEB_HOST_ARCH),$(ARCH_FLOPPY_UDEB)),) |
24 | PACKAGES_UDEB += $(PACKAGE_PREFIX)-net-udeb | 25 | PACKAGES_UDEB += $(PACKAGE_PREFIX)-floppy-udeb |
25 | endif | 26 | endif |
26 | PACKAGES = $(PACKAGES_DEB) $(PACKAGES_UDEB) | 27 | PACKAGES = $(PACKAGES_DEB) $(PACKAGES_UDEB) |
28 | |||
27 | DEBHELPER_PACKAGES_DEB = $(patsubst %,-p%,$(PACKAGES_DEB)) | 29 | DEBHELPER_PACKAGES_DEB = $(patsubst %,-p%,$(PACKAGES_DEB)) |
30 | DEBHELPER_PACKAGES_UDEB = $(patsubst %,-p%,$(PACKAGES_UDEB)) | ||
31 | |||
32 | CONFIG = $(firstword $(wildcard ./debian/config-$(1)-$(DEB_HOST_GNU_SYSTEM)-$(DEB_HOST_GNU_CPU) ./debian/config-$(1)-$(DEB_HOST_GNU_SYSTEM) ./debian/config-$(1))) | ||
33 | CONFIG_DEB = $(call CONFIG,deb) | ||
34 | CONFIG_STATIC = $(call CONFIG,static) | ||
35 | CONFIG_UDEB = $(call CONFIG,udeb) | ||
36 | CONFIG_FLOPPY_UDEB = $(call CONFIG,floppy-udeb) | ||
37 | |||
38 | configure: configure-stamp | ||
39 | configure-stamp: | ||
40 | sh ./configure | ||
41 | |||
42 | touch $@ | ||
28 | 43 | ||
29 | build-arch: build-arch-deb build-arch-static build-arch-udeb build-arch-net-udeb build-arch-doc | 44 | build-arch: build-arch-deb-all build-arch-udeb-all |
45 | build-arch-deb-all: build-arch-deb build-arch-static build-arch-doc | ||
46 | build-arch-udeb-all: build-arch-udeb build-arch-floppy-udeb | ||
30 | 47 | ||
31 | build-arch-deb: build-arch-deb-stamp | 48 | build-arch-deb: build-arch-deb-stamp |
32 | build-arch-deb-stamp: | 49 | build-arch-deb-stamp: configure-stamp |
33 | $(MAKE) clean | 50 | $(MAKE) clean |
34 | 51 | ||
35 | ifeq ($(wildcard ./debian/config-deb-$(DEB_HOST_ARCH)),) | 52 | cp $(CONFIG_DEB) .config |
36 | cp ./debian/config-deb .config | ||
37 | else | ||
38 | cp ./debian/config-deb-$(DEB_HOST_ARCH) .config | ||
39 | endif | ||
40 | 53 | ||
41 | $(MAKE) dep | 54 | $(MAKE) dep |
42 | $(MAKE) CONFIG_DEBUG=$(CONFIG_DEBUG) | 55 | $(MAKE) CONFIG_DEBUG=$(CONFIG_DEBUG) |
@@ -47,14 +60,10 @@ endif | |||
47 | touch $@ | 60 | touch $@ |
48 | 61 | ||
49 | build-arch-static: build-arch-static-stamp | 62 | build-arch-static: build-arch-static-stamp |
50 | build-arch-static-stamp: | 63 | build-arch-static-stamp: configure-stamp |
51 | $(MAKE) clean | 64 | $(MAKE) clean |
52 | 65 | ||
53 | ifeq ($(wildcard ./debian/config-static-$(DEB_HOST_ARCH)),) | 66 | cp $(CONFIG_STATIC) .config |
54 | cp ./debian/config-static .config | ||
55 | else | ||
56 | cp ./debian/config-static-$(DEB_HOST_ARCH) .config | ||
57 | endif | ||
58 | 67 | ||
59 | $(MAKE) dep | 68 | $(MAKE) dep |
60 | $(MAKE) CONFIG_DEBUG=$(CONFIG_DEBUG) | 69 | $(MAKE) CONFIG_DEBUG=$(CONFIG_DEBUG) |
@@ -65,39 +74,38 @@ endif | |||
65 | touch $@ | 74 | touch $@ |
66 | 75 | ||
67 | build-arch-udeb: build-arch-udeb-stamp | 76 | build-arch-udeb: build-arch-udeb-stamp |
68 | build-arch-udeb-stamp: | 77 | build-arch-udeb-stamp: configure-stamp |
69 | $(MAKE) clean | 78 | $(MAKE) clean |
70 | 79 | ||
71 | ifeq ($(wildcard ./debian/config-udeb-$(DEB_HOST_ARCH)),) | 80 | cp $(CONFIG_UDEB) .config |
72 | cp ./debian/config-udeb .config | ||
73 | else | ||
74 | cp ./debian/config-udeb-$(DEB_HOST_ARCH) .config | ||
75 | endif | ||
76 | 81 | ||
77 | $(MAKE) dep | 82 | $(MAKE) dep |
78 | $(MAKE) CONFIG_DEBUG=$(CONFIG_DEBUG) | 83 | $(MAKE) CONFIG_DEBUG=$(CONFIG_DEBUG) |
79 | 84 | ||
80 | $(MAKE) PREFIX=$(CURDIR)/install-$(PACKAGE_PREFIX)-udeb install | 85 | $(MAKE) PREFIX=$(CURDIR)/install-$(PACKAGE_PREFIX)-udeb install |
86 | # Remove init link, but init support is still compiled in to be | ||
87 | # used. | ||
88 | rm -f $(CURDIR)/install-$(PACKAGE_PREFIX)-udeb/sbin/init | ||
81 | 89 | ||
82 | touch $@ | 90 | touch $@ |
83 | 91 | ||
84 | build-arch-net-udeb: build-arch-net-udeb-stamp | 92 | build-arch-floppy-udeb: build-arch-floppy-udeb-stamp |
85 | build-arch-net-udeb-stamp: | 93 | build-arch-floppy-udeb-stamp: configure-stamp |
86 | ifneq ($(wildcard ./debian/config-net-udeb-$(DEB_HOST_ARCH)),) | 94 | ifneq ($(filter $(DEB_HOST_ARCH),$(ARCH_FLOPPY_UDEB)),) |
87 | $(MAKE) clean | 95 | $(MAKE) clean |
88 | 96 | ||
89 | cp ./debian/config-net-udeb-$(DEB_HOST_ARCH) .config | 97 | cp $(CONFIG_FLOPPY_UDEB) .config |
90 | 98 | ||
91 | $(MAKE) dep | 99 | $(MAKE) dep |
92 | $(MAKE) CONFIG_DEBUG=$(CONFIG_DEBUG) | 100 | $(MAKE) CONFIG_DEBUG=$(CONFIG_DEBUG) |
93 | 101 | ||
94 | $(MAKE) PREFIX=$(CURDIR)/install-$(PACKAGE_PREFIX)-net-udeb install | 102 | $(MAKE) PREFIX=$(CURDIR)/install-$(PACKAGE_PREFIX)-floppy-udeb install |
95 | endif | 103 | endif |
96 | 104 | ||
97 | touch $@ | 105 | touch $@ |
98 | 106 | ||
99 | build-arch-doc: build-arch-doc-stamp | 107 | build-arch-doc: build-arch-doc-stamp |
100 | build-arch-doc-stamp: | 108 | build-arch-doc-stamp: configure-stamp |
101 | $(MAKE) docs/BusyBox.1 | 109 | $(MAKE) docs/BusyBox.1 |
102 | 110 | ||
103 | cp docs/BusyBox.1 busybox.1 | 111 | cp docs/BusyBox.1 busybox.1 |
@@ -109,20 +117,20 @@ build: build-arch | |||
109 | clean: | 117 | clean: |
110 | dh_testdir | 118 | dh_testdir |
111 | dh_testroot | 119 | dh_testroot |
112 | rm -f build-*-stamp debian/files~ | 120 | rm -f build-*-stamp configure-stamp debian/files~ |
113 | 121 | ||
114 | $(MAKE) distclean | 122 | -$(MAKE) distclean |
115 | -rm -rf busybox-deb busybox-static install* busybox.1 | 123 | -rm -rf busybox-deb busybox-static install* busybox.1 |
116 | 124 | ||
117 | dh_clean | 125 | dh_clean |
118 | 126 | ||
119 | install: build-arch | 127 | install-deb: build-arch-deb-all |
120 | dh_testdir | 128 | dh_testdir |
121 | dh_testroot | 129 | dh_testroot |
122 | dh_clean -k | 130 | dh_clean -k $(DEBHELPER_PACKAGES_DEB) |
123 | dh_installdirs | 131 | dh_installdirs $(DEBHELPER_PACKAGES_DEB) |
124 | 132 | ||
125 | for i in $(PACKAGES); do \ | 133 | for i in $(PACKAGES_DEB); do \ |
126 | ( \ | 134 | ( \ |
127 | cd install-$$i; \ | 135 | cd install-$$i; \ |
128 | find -type d -exec install -d $(CURDIR)/debian/$$i/{} \;; \ | 136 | find -type d -exec install -d $(CURDIR)/debian/$$i/{} \;; \ |
@@ -133,36 +141,51 @@ install: build-arch | |||
133 | install -m644 debian/$(PACKAGE_PREFIX)-static.override \ | 141 | install -m644 debian/$(PACKAGE_PREFIX)-static.override \ |
134 | debian/$(PACKAGE_PREFIX)-static/usr/share/lintian/overrides/$(PACKAGE_PREFIX)-static | 142 | debian/$(PACKAGE_PREFIX)-static/usr/share/lintian/overrides/$(PACKAGE_PREFIX)-static |
135 | 143 | ||
144 | install-udeb: build-arch-udeb-all | ||
145 | dh_testdir | ||
146 | dh_testroot | ||
147 | dh_clean -k $(DEBHELPER_PACKAGES_UDEB) | ||
148 | dh_installdirs $(DEBHELPER_PACKAGES_UDEB) | ||
149 | |||
150 | for i in $(PACKAGES_UDEB); do \ | ||
151 | ( \ | ||
152 | cd install-$$i; \ | ||
153 | find -type d -exec install -d $(CURDIR)/debian/$$i/{} \;; \ | ||
154 | find \( -type f -o -type l \) -exec cp -a {} $(CURDIR)/debian/$$i/{} \;; \ | ||
155 | ); \ | ||
156 | done | ||
157 | |||
158 | binary-arch: binary-arch-deb binary-arch-udeb | ||
159 | |||
136 | # Build architecture-dependent files here. | 160 | # Build architecture-dependent files here. |
137 | binary-arch: build-arch install | 161 | binary-arch-deb: build-arch-deb-all install-deb |
138 | dh_testdir -a | 162 | dh_testdir |
139 | dh_testroot -a | 163 | dh_testroot |
140 | # dh_installdebconf -a | ||
141 | dh_installdocs $(DEBHELPER_PACKAGES_DEB) | 164 | dh_installdocs $(DEBHELPER_PACKAGES_DEB) |
142 | # dh_installexamples -a | ||
143 | # dh_installmenu -a | ||
144 | # dh_installlogrotate -a | ||
145 | # dh_installemacsen -a | ||
146 | # dh_installpam -a | ||
147 | # dh_installmime -a | ||
148 | # dh_installinit -a | ||
149 | # dh_installcron -a | ||
150 | dh_installman $(DEBHELPER_PACKAGES_DEB) | 165 | dh_installman $(DEBHELPER_PACKAGES_DEB) |
151 | # dh_installinfo -a | ||
152 | # dh_undocumented -a | ||
153 | dh_installchangelogs Changelog $(DEBHELPER_PACKAGES_DEB) | 166 | dh_installchangelogs Changelog $(DEBHELPER_PACKAGES_DEB) |
154 | dh_strip -a | 167 | dh_strip $(DEBHELPER_PACKAGES_DEB) |
155 | dh_link -a | 168 | dh_link $(DEBHELPER_PACKAGES_DEB) |
156 | dh_compress -a | 169 | dh_compress $(DEBHELPER_PACKAGES_DEB) |
157 | dh_fixperms -a | 170 | dh_fixperms $(DEBHELPER_PACKAGES_DEB) |
158 | # dh_makeshlibs -a | 171 | dh_installdeb $(DEBHELPER_PACKAGES_DEB) |
159 | dh_installdeb -a | 172 | dh_shlibdeps $(DEBHELPER_PACKAGES_DEB) |
160 | # dh_perl -a | ||
161 | dh_shlibdeps -a | ||
162 | dh_gencontrol $(DEBHELPER_PACKAGES_DEB) | 173 | dh_gencontrol $(DEBHELPER_PACKAGES_DEB) |
163 | dh_md5sums $(DEBHELPER_PACKAGES_DEB) | 174 | dh_md5sums $(DEBHELPER_PACKAGES_DEB) |
164 | dh_builddeb $(DEBHELPER_PACKAGES_DEB) | 175 | dh_builddeb $(DEBHELPER_PACKAGES_DEB) |
165 | 176 | ||
177 | # Build architecture-dependent files here. | ||
178 | binary-arch-udeb: build-arch-udeb-all install-udeb | ||
179 | dh_testdir | ||
180 | dh_testroot | ||
181 | dh_strip $(DEBHELPER_PACKAGES_UDEB) | ||
182 | dh_link $(DEBHELPER_PACKAGES_UDEB) | ||
183 | dh_compress $(DEBHELPER_PACKAGES_UDEB) | ||
184 | dh_fixperms $(DEBHELPER_PACKAGES_UDEB) | ||
185 | dh_installdeb $(DEBHELPER_PACKAGES_UDEB) | ||
186 | dh_shlibdeps $(DEBHELPER_PACKAGES_UDEB) | ||
187 | dh_gencontrol $(DEBHELPER_PACKAGES_DEB) | ||
188 | |||
166 | $(foreach PACKAGE, $(PACKAGES_UDEB), \ | 189 | $(foreach PACKAGE, $(PACKAGES_UDEB), \ |
167 | dh_gencontrol -p$(PACKAGE) -- -fdebian/files~; \ | 190 | dh_gencontrol -p$(PACKAGE) -- -fdebian/files~; \ |
168 | dpkg-distaddfile $(PACKAGE)_$(VERSION)_$(DEB_HOST_ARCH).udeb debian-installer extra; \ | 191 | dpkg-distaddfile $(PACKAGE)_$(VERSION)_$(DEB_HOST_ARCH).udeb debian-installer extra; \ |