Eric Andersen | b108a5b | 2000-06-19 09:21:34 +0000 | [diff] [blame] | 1 | #!/usr/bin/make -f |
| 2 | |
Glenn L McGrath | 6fc6d7f | 2002-12-01 02:09:19 +0000 | [diff] [blame] | 3 | # Uncomment this to turn on verbose mode. |
| 4 | #export DH_VERBOSE=1 |
| 5 | |
| 6 | # This is the debhelper compatibility version to use. |
Glenn L McGrath | 1b16bf6 | 2002-11-23 07:14:55 +0000 | [diff] [blame] | 7 | export DH_COMPAT=3 |
Eric Andersen | b108a5b | 2000-06-19 09:21:34 +0000 | [diff] [blame] | 8 | |
Glenn L McGrath | 6fc6d7f | 2002-12-01 02:09:19 +0000 | [diff] [blame] | 9 | VERSION = $(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2) |
| 10 | ARCH = $(shell dpkg --print-architecture) |
| 11 | |
Glenn L McGrath | 1b16bf6 | 2002-11-23 07:14:55 +0000 | [diff] [blame] | 12 | ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) |
Glenn L McGrath | 6fc6d7f | 2002-12-01 02:09:19 +0000 | [diff] [blame] | 13 | DODEBUG = true |
Glenn L McGrath | 1b16bf6 | 2002-11-23 07:14:55 +0000 | [diff] [blame] | 14 | endif |
Glenn L McGrath | b9e57f4 | 2002-12-01 20:16:01 +0000 | [diff] [blame] | 15 | ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) |
Glenn L McGrath | 1b16bf6 | 2002-11-23 07:14:55 +0000 | [diff] [blame] | 16 | endif |
Eric Andersen | b108a5b | 2000-06-19 09:21:34 +0000 | [diff] [blame] | 17 | |
Glenn L McGrath | 6fc6d7f | 2002-12-01 02:09:19 +0000 | [diff] [blame] | 18 | build-arch: build-arch-stamp |
| 19 | build-arch-stamp: |
Glenn L McGrath | 1b16bf6 | 2002-11-23 07:14:55 +0000 | [diff] [blame] | 20 | $(MAKE) clean |
| 21 | cp ./debian/config-deb .config |
| 22 | $(MAKE) dep |
Glenn L McGrath | 6fc6d7f | 2002-12-01 02:09:19 +0000 | [diff] [blame] | 23 | $(MAKE) DODEBUG=$(DODEBUG) |
| 24 | install busybox busybox-deb |
Eric Andersen | b108a5b | 2000-06-19 09:21:34 +0000 | [diff] [blame] | 25 | |
Glenn L McGrath | 1b16bf6 | 2002-11-23 07:14:55 +0000 | [diff] [blame] | 26 | $(MAKE) clean |
| 27 | cp ./debian/config-static .config |
| 28 | $(MAKE) dep |
Glenn L McGrath | c4698b3 | 2002-12-08 20:45:47 +0000 | [diff] [blame] | 29 | $(MAKE) DODEBUG=$(DODEBUG) |
Glenn L McGrath | 6fc6d7f | 2002-12-01 02:09:19 +0000 | [diff] [blame] | 30 | install busybox busybox-static |
Glenn L McGrath | 1b16bf6 | 2002-11-23 07:14:55 +0000 | [diff] [blame] | 31 | |
Glenn L McGrath | 6fc6d7f | 2002-12-01 02:09:19 +0000 | [diff] [blame] | 32 | $(MAKE) clean |
| 33 | cp ./debian/config-udeb .config |
| 34 | $(MAKE) dep |
| 35 | $(MAKE) DODEBUG=$(DODEBUG) |
Eric Andersen | e2f6e12 | 2000-12-01 19:55:04 +0000 | [diff] [blame] | 36 | |
Glenn L McGrath | c4698b3 | 2002-12-08 20:45:47 +0000 | [diff] [blame] | 37 | $(MAKE) docs/BusyBox.1 |
| 38 | |
Glenn L McGrath | 6fc6d7f | 2002-12-01 02:09:19 +0000 | [diff] [blame] | 39 | touch build-arch-stamp |
| 40 | |
Glenn L McGrath | c4698b3 | 2002-12-08 20:45:47 +0000 | [diff] [blame] | 41 | build: build-arch |
Glenn L McGrath | 6fc6d7f | 2002-12-01 02:09:19 +0000 | [diff] [blame] | 42 | |
| 43 | clean: |
Glenn L McGrath | 12371f9 | 2002-11-26 02:16:06 +0000 | [diff] [blame] | 44 | dh_testdir |
| 45 | dh_testroot |
Glenn L McGrath | c4698b3 | 2002-12-08 20:45:47 +0000 | [diff] [blame] | 46 | rm -f build-arch-stamp build-indep-stamp debian/files~ |
Glenn L McGrath | 6fc6d7f | 2002-12-01 02:09:19 +0000 | [diff] [blame] | 47 | |
| 48 | $(MAKE) distclean |
Glenn L McGrath | 147a3ca | 2003-01-14 21:41:12 +0000 | [diff] [blame] | 49 | -rm -f busybox-deb busybox-static busybox.1 |
Glenn L McGrath | 6fc6d7f | 2002-12-01 02:09:19 +0000 | [diff] [blame] | 50 | |
| 51 | dh_clean |
| 52 | |
| 53 | install: build-arch |
| 54 | dh_testdir |
| 55 | dh_testroot |
| 56 | dh_clean -k |
| 57 | dh_installdirs |
| 58 | |
| 59 | install busybox-deb $(CURDIR)/debian/busybox-cvs/bin/busybox |
| 60 | install busybox-static $(CURDIR)/debian/busybox-cvs-static/bin/busybox |
| 61 | $(MAKE) PREFIX=$(CURDIR)/debian/busybox-cvs-udeb install |
Glenn L McGrath | c4698b3 | 2002-12-08 20:45:47 +0000 | [diff] [blame] | 62 | cp docs/BusyBox.1 busybox.1 |
Glenn L McGrath | 6fc6d7f | 2002-12-01 02:09:19 +0000 | [diff] [blame] | 63 | |
Glenn L McGrath | c4698b3 | 2002-12-08 20:45:47 +0000 | [diff] [blame] | 64 | install -m644 debian/busybox-cvs-static.override \ |
| 65 | debian/busybox-cvs-static/usr/share/lintian/overrides/busybox-cvs-static |
Glenn L McGrath | 6fc6d7f | 2002-12-01 02:09:19 +0000 | [diff] [blame] | 66 | |
| 67 | # Build architecture-dependent files here. |
| 68 | binary-arch: build-arch install |
| 69 | dh_testdir -a |
| 70 | dh_testroot -a |
| 71 | # dh_installdebconf -a |
| 72 | dh_installdocs -a -Nbusybox-cvs-udeb |
| 73 | # dh_installexamples -a |
| 74 | # dh_installmenu -a |
| 75 | # dh_installlogrotate -a |
| 76 | # dh_installemacsen -a |
| 77 | # dh_installpam -a |
| 78 | # dh_installmime -a |
| 79 | # dh_installinit -a |
| 80 | # dh_installcron -a |
Glenn L McGrath | c4698b3 | 2002-12-08 20:45:47 +0000 | [diff] [blame] | 81 | dh_installman -a -Nbusybox-cvs-udeb |
Glenn L McGrath | 6fc6d7f | 2002-12-01 02:09:19 +0000 | [diff] [blame] | 82 | # dh_installinfo -a |
| 83 | # dh_undocumented -a |
| 84 | dh_installchangelogs Changelog -a -Nbusybox-cvs-udeb |
| 85 | dh_strip -a |
| 86 | dh_link -a |
| 87 | dh_compress -a |
| 88 | dh_fixperms -a |
| 89 | # dh_makeshlibs -a |
| 90 | dh_installdeb -a |
| 91 | # dh_perl -a |
| 92 | dh_shlibdeps -a |
Glenn L McGrath | c4698b3 | 2002-12-08 20:45:47 +0000 | [diff] [blame] | 93 | dh_gencontrol -a -Nbusybox-cvs-udeb |
Glenn L McGrath | 6fc6d7f | 2002-12-01 02:09:19 +0000 | [diff] [blame] | 94 | dh_md5sums -a -Nbusybox-cvs-udeb |
| 95 | dh_builddeb -a -Nbusybox-cvs-udeb |
Glenn L McGrath | c4698b3 | 2002-12-08 20:45:47 +0000 | [diff] [blame] | 96 | |
| 97 | dh_gencontrol -pbusybox-cvs-udeb -- -fdebian/files~ |
Glenn L McGrath | 11adab0 | 2002-12-10 11:28:40 +0000 | [diff] [blame] | 98 | dpkg-distaddfile busybox-cvs-udeb_$(VERSION)_$(ARCH).udeb debian-installer extra |
Glenn L McGrath | b9e57f4 | 2002-12-01 20:16:01 +0000 | [diff] [blame] | 99 | dh_builddeb -pbusybox-cvs-udeb --filename=busybox-cvs-udeb_$(VERSION)_$(ARCH).udeb |
Glenn L McGrath | 12371f9 | 2002-11-26 02:16:06 +0000 | [diff] [blame] | 100 | |
Glenn L McGrath | c4698b3 | 2002-12-08 20:45:47 +0000 | [diff] [blame] | 101 | binary: binary-arch |
Glenn L McGrath | 6fc6d7f | 2002-12-01 02:09:19 +0000 | [diff] [blame] | 102 | .PHONY: build clean binary-indep binary-arch binary install |