aboutsummaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2004-01-01 00:23:01 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2004-01-01 00:23:01 +0000
commita43faccbdebe37668390e26ff099faf56e1be6e5 (patch)
treea1a373d4b57708e3accea2abd2e80c2061ba1289 /debian/rules
parent5c9f0d05b3af7870d5ba6c40bcadf94b55663c58 (diff)
downloadbusybox-w32-a43faccbdebe37668390e26ff099faf56e1be6e5.tar.gz
busybox-w32-a43faccbdebe37668390e26ff099faf56e1be6e5.tar.bz2
busybox-w32-a43faccbdebe37668390e26ff099faf56e1be6e5.zip
Sync to waldi's subversion archive
Diffstat (limited to '')
-rwxr-xr-xdebian/rules139
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.
7export DH_COMPAT=3
8
9DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) 6DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
7DEB_HOST_GNU_CPU ?= $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
8DEB_HOST_GNU_SYSTEM ?= $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM)
10 9
11VERSION = $(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2) 10VERSION = $(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)
12 11
@@ -18,25 +17,39 @@ endif
18 17
19PACKAGE_PREFIX = busybox-cvs 18PACKAGE_PREFIX = busybox-cvs
20 19
20ARCH_FLOPPY_UDEB = $(shell sh debian/control-extract Architecture $(PACKAGE_PREFIX)-floppy-udeb)
21
21PACKAGES_DEB = $(PACKAGE_PREFIX) $(PACKAGE_PREFIX)-static 22PACKAGES_DEB = $(PACKAGE_PREFIX) $(PACKAGE_PREFIX)-static
22PACKAGES_UDEB = $(PACKAGE_PREFIX)-udeb 23PACKAGES_UDEB = $(PACKAGE_PREFIX)-udeb
23ifneq ($(wildcard ./debian/config-net-udeb-$(DEB_HOST_ARCH)),) 24ifneq ($(filter $(DEB_HOST_ARCH),$(ARCH_FLOPPY_UDEB)),)
24PACKAGES_UDEB += $(PACKAGE_PREFIX)-net-udeb 25PACKAGES_UDEB += $(PACKAGE_PREFIX)-floppy-udeb
25endif 26endif
26PACKAGES = $(PACKAGES_DEB) $(PACKAGES_UDEB) 27PACKAGES = $(PACKAGES_DEB) $(PACKAGES_UDEB)
28
27DEBHELPER_PACKAGES_DEB = $(patsubst %,-p%,$(PACKAGES_DEB)) 29DEBHELPER_PACKAGES_DEB = $(patsubst %,-p%,$(PACKAGES_DEB))
30DEBHELPER_PACKAGES_UDEB = $(patsubst %,-p%,$(PACKAGES_UDEB))
31
32CONFIG = $(firstword $(wildcard ./debian/config-$(1)-$(DEB_HOST_GNU_SYSTEM)-$(DEB_HOST_GNU_CPU) ./debian/config-$(1)-$(DEB_HOST_GNU_SYSTEM) ./debian/config-$(1)))
33CONFIG_DEB = $(call CONFIG,deb)
34CONFIG_STATIC = $(call CONFIG,static)
35CONFIG_UDEB = $(call CONFIG,udeb)
36CONFIG_FLOPPY_UDEB = $(call CONFIG,floppy-udeb)
37
38configure: configure-stamp
39configure-stamp:
40 sh ./configure
41
42 touch $@
28 43
29build-arch: build-arch-deb build-arch-static build-arch-udeb build-arch-net-udeb build-arch-doc 44build-arch: build-arch-deb-all build-arch-udeb-all
45build-arch-deb-all: build-arch-deb build-arch-static build-arch-doc
46build-arch-udeb-all: build-arch-udeb build-arch-floppy-udeb
30 47
31build-arch-deb: build-arch-deb-stamp 48build-arch-deb: build-arch-deb-stamp
32build-arch-deb-stamp: 49build-arch-deb-stamp: configure-stamp
33 $(MAKE) clean 50 $(MAKE) clean
34 51
35ifeq ($(wildcard ./debian/config-deb-$(DEB_HOST_ARCH)),) 52 cp $(CONFIG_DEB) .config
36 cp ./debian/config-deb .config
37else
38 cp ./debian/config-deb-$(DEB_HOST_ARCH) .config
39endif
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
49build-arch-static: build-arch-static-stamp 62build-arch-static: build-arch-static-stamp
50build-arch-static-stamp: 63build-arch-static-stamp: configure-stamp
51 $(MAKE) clean 64 $(MAKE) clean
52 65
53ifeq ($(wildcard ./debian/config-static-$(DEB_HOST_ARCH)),) 66 cp $(CONFIG_STATIC) .config
54 cp ./debian/config-static .config
55else
56 cp ./debian/config-static-$(DEB_HOST_ARCH) .config
57endif
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
67build-arch-udeb: build-arch-udeb-stamp 76build-arch-udeb: build-arch-udeb-stamp
68build-arch-udeb-stamp: 77build-arch-udeb-stamp: configure-stamp
69 $(MAKE) clean 78 $(MAKE) clean
70 79
71ifeq ($(wildcard ./debian/config-udeb-$(DEB_HOST_ARCH)),) 80 cp $(CONFIG_UDEB) .config
72 cp ./debian/config-udeb .config
73else
74 cp ./debian/config-udeb-$(DEB_HOST_ARCH) .config
75endif
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
84build-arch-net-udeb: build-arch-net-udeb-stamp 92build-arch-floppy-udeb: build-arch-floppy-udeb-stamp
85build-arch-net-udeb-stamp: 93build-arch-floppy-udeb-stamp: configure-stamp
86ifneq ($(wildcard ./debian/config-net-udeb-$(DEB_HOST_ARCH)),) 94ifneq ($(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
95endif 103endif
96 104
97 touch $@ 105 touch $@
98 106
99build-arch-doc: build-arch-doc-stamp 107build-arch-doc: build-arch-doc-stamp
100build-arch-doc-stamp: 108build-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
109clean: 117clean:
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
119install: build-arch 127install-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
144install-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
158binary-arch: binary-arch-deb binary-arch-udeb
159
136# Build architecture-dependent files here. 160# Build architecture-dependent files here.
137binary-arch: build-arch install 161binary-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.
178binary-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; \