2000-06-19 09:21:34 +00:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
|
|
|
|
# This is a bit unusual, in that I have to completely recompile everything
|
2000-12-01 22:59:04 +00:00
|
|
|
# for each package I build (obviously static and dynamic builds require
|
|
|
|
# things to be recompiled...)
|
2000-06-19 09:21:34 +00:00
|
|
|
|
|
|
|
# This is the debhelper compatability version to use.
|
2000-12-01 22:59:04 +00:00
|
|
|
#export DH_COMPAT=1
|
2000-06-19 09:21:34 +00:00
|
|
|
|
2000-12-01 22:59:04 +00:00
|
|
|
bbbd=debian/busybox_builddir
|
2000-06-19 09:21:34 +00:00
|
|
|
bb=debian/tmp
|
2000-12-01 22:59:04 +00:00
|
|
|
bbsbd=debian/busybox_static_builddir
|
2000-06-19 09:21:34 +00:00
|
|
|
bbs=debian/busybox-static
|
2000-12-01 22:59:04 +00:00
|
|
|
bbubd=debian/busybox_udeb_builddir
|
|
|
|
bbu=debian/busybox-udeb
|
2000-06-19 09:21:34 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
2000-12-01 22:59:04 +00:00
|
|
|
rm -f debian/build-stamp-busybox debian/build-stamp-busybox-static debian/build-stamp-busybox-udeb
|
2000-06-19 09:21:34 +00:00
|
|
|
-$(MAKE) clean
|
2000-12-01 22:59:04 +00:00
|
|
|
-rm -rf $(bb) $(bbbd) $(bbs) $(bbsbd) $(bbubd) $(bbu)
|
2000-06-19 09:21:34 +00:00
|
|
|
dh_clean
|
|
|
|
|
2000-12-01 22:59:04 +00:00
|
|
|
build: debian/build-stamp-busybox
|
|
|
|
debian/build-stamp-busybox:
|
2000-06-19 09:21:34 +00:00
|
|
|
dh_testdir
|
2000-12-01 19:55:04 +00:00
|
|
|
mkdir -p $(bbbd)
|
2000-12-01 22:59:04 +00:00
|
|
|
cp Makefile $(bbbd)
|
|
|
|
cp debian/Config.h-deb $(bbbd)/Config.h
|
2001-02-23 06:36:53 +00:00
|
|
|
-(cd $(bbbd); $(MAKE) "BB_SRC_DIR=../../" applet_source_list)
|
2001-04-09 18:42:52 +00:00
|
|
|
(cd $(bbbd); $(MAKE) USE_SYSTEM_PWD_GRP=false "BB_SRC_DIR=../../")
|
2000-12-01 22:59:04 +00:00
|
|
|
touch debian/build-stamp-busybox
|
2000-06-19 09:21:34 +00:00
|
|
|
|
|
|
|
install: build
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
dh_clean -k
|
|
|
|
dh_installdirs
|
2000-12-01 22:59:04 +00:00
|
|
|
# Do not run 'make install', since we do not want all the symlinks.
|
|
|
|
# This just installes the busybox binary...
|
|
|
|
#(cd $(bbbd); $(MAKE) "BB_SRC_DIR=../../" "PREFIX=../../$(bb)" install)
|
|
|
|
mkdir -p $(bb)/bin/
|
|
|
|
cp $(bbbd)/busybox $(bb)/bin/busybox
|
|
|
|
mkdir -p $(bb)/usr/share/doc/busybox/busybox.lineo.com
|
|
|
|
cp $(bbbd)/docs/busybox.lineo.com/BusyBox.html $(bb)/usr/share/doc/busybox/busybox.lineo.com/
|
2000-06-19 09:21:34 +00:00
|
|
|
mkdir -p $(bb)/usr/share/man/man1
|
2000-12-01 22:59:04 +00:00
|
|
|
cp $(bbbd)/docs/BusyBox.1 $(bb)/usr/share/man/man1/busybox.1
|
2000-06-19 09:21:34 +00:00
|
|
|
|
|
|
|
# Now for the statically linked stuff
|
2000-12-01 22:59:04 +00:00
|
|
|
build-static: debian/build-stamp-busybox-static
|
|
|
|
debian/build-stamp-busybox-static:
|
2000-06-19 09:21:34 +00:00
|
|
|
dh_testdir
|
2000-12-01 22:59:04 +00:00
|
|
|
mkdir -p $(bbsbd)
|
|
|
|
cp Makefile $(bbsbd)
|
2001-02-17 00:41:05 +00:00
|
|
|
cp debian/Config.h-static $(bbsbd)/Config.h
|
2001-04-09 18:42:52 +00:00
|
|
|
(cd $(bbsbd); $(MAKE) DOSTATIC=true USE_SYSTEM_PWD_GRP=false "BB_SRC_DIR=../../")
|
2000-12-01 22:59:04 +00:00
|
|
|
touch debian/build-stamp-busybox-static
|
2000-06-19 09:21:34 +00:00
|
|
|
|
|
|
|
install-static: build
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
dh_clean -k
|
|
|
|
dh_installdirs
|
|
|
|
# Do not run 'make install', since we do not want all the symlinks.
|
|
|
|
# This just installes the busybox binary...
|
2000-12-01 22:59:04 +00:00
|
|
|
#(cd $(bbsbd); $(MAKE) "BB_SRC_DIR=../../" "PREFIX=../../$(bbs)" install)
|
2000-06-19 09:21:34 +00:00
|
|
|
mkdir -p $(bbs)/bin/
|
2000-12-01 22:59:04 +00:00
|
|
|
cp $(bbsbd)/busybox $(bbs)/bin/busybox
|
|
|
|
mkdir -p $(bbs)/usr/share/doc/busybox-static/busybox.lineo.com
|
|
|
|
cp $(bbsbd)/docs/busybox.lineo.com/BusyBox.html $(bbs)/usr/share/doc/busybox-static/busybox.lineo.com/
|
2000-06-19 09:21:34 +00:00
|
|
|
mkdir -p $(bbs)/usr/share/man/man1/
|
2000-12-01 22:59:04 +00:00
|
|
|
cp $(bbsbd)/docs/BusyBox.1 $(bbs)/usr/share/man/man1/busybox.1
|
|
|
|
|
|
|
|
half_clean:
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
rm -rf $(bbs) debian/build-stamp-busybox-static
|
|
|
|
-$(MAKE) clean
|
2000-06-19 09:21:34 +00:00
|
|
|
|
|
|
|
do_static: half_clean build-static install-static
|
|
|
|
|
|
|
|
|
2000-12-01 22:59:04 +00:00
|
|
|
|
|
|
|
# Now for the .udeb stuff
|
2000-12-20 20:41:02 +00:00
|
|
|
PACKAGE=busybox-udeb
|
2001-07-06 20:36:57 +00:00
|
|
|
VERSION=$(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2 | sed -e s/[0-9]://g)
|
2000-12-01 22:59:04 +00:00
|
|
|
ARCH=$(shell dpkg --print-architecture)
|
|
|
|
FILENAME=$(PACKAGE)_$(VERSION)_$(ARCH).udeb
|
|
|
|
|
|
|
|
build-udeb: debian/build-stamp-busybox-udeb
|
|
|
|
debian/build-stamp-busybox-udeb:
|
|
|
|
dh_testdir
|
|
|
|
mkdir -p $(bbubd)
|
|
|
|
cp Makefile $(bbubd)
|
|
|
|
cp debian/Config.h-udeb $(bbubd)/Config.h
|
2001-04-09 18:42:52 +00:00
|
|
|
(cd $(bbubd); $(MAKE) USE_SYSTEM_PWD_GRP=false "BB_SRC_DIR=../../")
|
2000-12-01 22:59:04 +00:00
|
|
|
touch debian/build-stamp-busybox-udeb
|
|
|
|
|
|
|
|
install-udeb: build
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
dh_clean -k
|
|
|
|
dh_installdirs
|
|
|
|
(cd $(bbubd); $(MAKE) "BB_SRC_DIR=../../" "PREFIX=../../$(bbu)" install)
|
|
|
|
mkdir -p $(bbu)/usr/share/man/man1/
|
|
|
|
cp $(bbubd)/docs/BusyBox.1 $(bbu)/usr/share/man/man1/busybox.1
|
|
|
|
|
|
|
|
three_quarter_clean:
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
rm -rf $(bbu) debian/build-stamp-busybox-udeb
|
|
|
|
-$(MAKE) clean
|
|
|
|
|
|
|
|
do_udeb: three_quarter_clean build-udeb install-udeb
|
|
|
|
|
|
|
|
|
|
|
|
|
2000-06-19 09:21:34 +00:00
|
|
|
# Build architecture-independent files here.
|
|
|
|
binary-indep:
|
|
|
|
# We have nothing to do by default.
|
|
|
|
|
|
|
|
# Build architecture-dependent files here.
|
2000-12-01 19:55:04 +00:00
|
|
|
binary-arch: busybox busybox-static busybox-udeb
|
2000-06-19 09:21:34 +00:00
|
|
|
|
|
|
|
busybox: install
|
|
|
|
@echo "--- Building: $@"
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
dh_installdirs
|
2000-12-01 22:59:04 +00:00
|
|
|
dh_installdocs -p$@ $(bbbd)/docs/BusyBox.txt \
|
|
|
|
$(bbbd)/docs/BusyBox.html docs/style-guide.txt \
|
|
|
|
docs/busybox.lineo.com AUTHORS README TODO
|
|
|
|
rm -rf `find $(bb) -name CVS`
|
|
|
|
rm -f `find $(bb) -name .cvsignore`
|
|
|
|
dh_installchangelogs -p$@ Changelog
|
|
|
|
dh_undocumented -p$@
|
2000-06-19 09:21:34 +00:00
|
|
|
dh_strip -p$@
|
|
|
|
dh_compress -p$@
|
|
|
|
dh_fixperms -p$@
|
|
|
|
dh_installdeb -p$@
|
|
|
|
dh_shlibdeps -p$@
|
|
|
|
dh_gencontrol -p$@
|
|
|
|
dh_md5sums -p$@
|
|
|
|
dh_builddeb -p$@
|
|
|
|
|
|
|
|
|
|
|
|
busybox-static: do_static
|
|
|
|
@echo "--- Building: $@"
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
dh_installdirs
|
2000-12-01 22:59:04 +00:00
|
|
|
dh_installdocs -p$@ $(bbsbd)/docs/BusyBox.txt \
|
|
|
|
$(bbsbd)/docs/BusyBox.html docs/style-guide.txt \
|
|
|
|
docs/busybox.lineo.com AUTHORS README TODO
|
|
|
|
rm -rf `find $(bbs) -name CVS`
|
|
|
|
rm -f `find $(bbs) -name .cvsignore`
|
2000-06-19 09:21:34 +00:00
|
|
|
dh_installchangelogs -p$@ Changelog
|
2000-12-01 22:59:04 +00:00
|
|
|
dh_undocumented -p$@
|
2000-06-19 09:21:34 +00:00
|
|
|
dh_strip -p$@
|
|
|
|
dh_compress -p$@
|
|
|
|
dh_fixperms -p$@
|
|
|
|
dh_installdeb -p$@
|
|
|
|
dh_shlibdeps -p$@
|
|
|
|
dh_gencontrol -p$@
|
|
|
|
dh_md5sums -p$@
|
|
|
|
dh_builddeb -p$@
|
|
|
|
|
|
|
|
|
2000-12-01 19:55:04 +00:00
|
|
|
# Note that this builds a .udeb, which is not policy compliant or anything.
|
|
|
|
#
|
2000-12-01 22:59:04 +00:00
|
|
|
busybox-udeb: do_udeb
|
2000-12-01 19:55:04 +00:00
|
|
|
@echo "--- Building: $@"
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
dh_installdirs
|
|
|
|
dh_strip -p$@
|
|
|
|
dh_compress -p$@
|
|
|
|
dh_fixperms -p$@
|
|
|
|
dh_installdeb -p$@
|
|
|
|
dh_shlibdeps -p$@
|
|
|
|
#Make _very_ sure there are no docs lurking about.
|
2000-12-01 22:59:04 +00:00
|
|
|
rm -rf $(bbu)/usr/share/man
|
|
|
|
#dh_gencontrol -p$@
|
2000-12-01 19:55:04 +00:00
|
|
|
# Don't write your stupid guesses to debian/files.
|
2000-12-01 22:59:04 +00:00
|
|
|
dh_gencontrol -p$@ -- -fdebian/files~
|
2000-12-01 19:55:04 +00:00
|
|
|
# Register file manually.
|
2001-07-06 20:36:57 +00:00
|
|
|
dpkg-distaddfile $(FILENAME) debian-installer standard
|
2000-12-01 19:55:04 +00:00
|
|
|
dh_md5sums -p$@
|
|
|
|
dh_builddeb -p$@ --filename=$(FILENAME)
|
|
|
|
|
2000-06-19 09:21:34 +00:00
|
|
|
binary: binary-indep binary-arch
|
|
|
|
.PHONY: build clean binary-indep binary-arch binary install
|