New rules file for unstable
This commit is contained in:
parent
77dbaa48df
commit
1b16bf6b1b
232
debian/rules
vendored
232
debian/rules
vendored
@ -1,193 +1,73 @@
|
|||||||
#!/usr/bin/make -f
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
# This is a bit unusual, in that I have to completely recompile everything
|
export DH_VERBOSE=1
|
||||||
# for each package I build (obviously static and dynamic builds require
|
export DH_COMPAT=3
|
||||||
# things to be recompiled...)
|
|
||||||
|
|
||||||
# This is the debhelper compatability version to use.
|
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
|
||||||
#export DH_COMPAT=1
|
CFLAGS += -g
|
||||||
|
endif
|
||||||
|
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
|
||||||
|
INSTALL_PROGRAM += -s
|
||||||
|
endif
|
||||||
|
|
||||||
bbbd=debian/busybox_builddir
|
|
||||||
bb=debian/tmp
|
|
||||||
bbsbd=debian/busybox_static_builddir
|
|
||||||
bbs=debian/busybox-static
|
|
||||||
bbubd=debian/busybox_udeb_builddir
|
|
||||||
bbu=debian/busybox-udeb
|
|
||||||
|
|
||||||
clean:
|
|
||||||
dh_testdir
|
|
||||||
dh_testroot
|
|
||||||
rm -f debian/build-stamp-busybox debian/build-stamp-busybox-static debian/build-stamp-busybox-udeb
|
|
||||||
-$(MAKE) clean
|
|
||||||
-rm -rf $(bb) $(bbbd) $(bbs) $(bbsbd) $(bbubd) $(bbu)
|
|
||||||
dh_clean
|
|
||||||
|
|
||||||
build: debian/build-stamp-busybox
|
|
||||||
debian/build-stamp-busybox:
|
|
||||||
dh_testdir
|
|
||||||
mkdir -p $(bbbd)
|
|
||||||
cp Makefile $(bbbd)
|
|
||||||
cp debian/Config.h-deb $(bbbd)/Config.h
|
|
||||||
-(cd $(bbbd); $(MAKE) "CONFIG_SRC_DIR=../../" applet_source_list)
|
|
||||||
(cd $(bbbd); $(MAKE) USE_SYSTEM_PWD_GRP=false "CONFIG_SRC_DIR=../../")
|
|
||||||
touch debian/build-stamp-busybox
|
|
||||||
|
|
||||||
install: 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...
|
|
||||||
#(cd $(bbbd); $(MAKE) "CONFIG_SRC_DIR=../../" "PREFIX=../../$(bb)" install)
|
|
||||||
mkdir -p $(bb)/bin/
|
|
||||||
cp $(bbbd)/busybox $(bb)/bin/busybox
|
|
||||||
mkdir -p $(bb)/usr/share/doc/busybox/busybox.net
|
|
||||||
cp $(bbbd)/docs/busybox.net/BusyBox.html $(bb)/usr/share/doc/busybox/busybox.net/
|
|
||||||
mkdir -p $(bb)/usr/share/man/man1
|
|
||||||
cp $(bbbd)/docs/BusyBox.1 $(bb)/usr/share/man/man1/busybox.1
|
|
||||||
|
|
||||||
# Now for the statically linked stuff
|
|
||||||
build-static: debian/build-stamp-busybox-static
|
|
||||||
debian/build-stamp-busybox-static:
|
|
||||||
dh_testdir
|
|
||||||
mkdir -p $(bbsbd)
|
|
||||||
cp Makefile $(bbsbd)
|
|
||||||
cp debian/Config.h-static $(bbsbd)/Config.h
|
|
||||||
(cd $(bbsbd); $(MAKE) DOSTATIC=true USE_SYSTEM_PWD_GRP=false "CONFIG_SRC_DIR=../../")
|
|
||||||
touch debian/build-stamp-busybox-static
|
|
||||||
|
|
||||||
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...
|
|
||||||
#(cd $(bbsbd); $(MAKE) "CONFIG_SRC_DIR=../../" "PREFIX=../../$(bbs)" install)
|
|
||||||
mkdir -p $(bbs)/bin/
|
|
||||||
cp $(bbsbd)/busybox $(bbs)/bin/busybox
|
|
||||||
mkdir -p $(bbs)/usr/share/doc/busybox-static/busybox.net
|
|
||||||
cp $(bbsbd)/docs/busybox.net/BusyBox.html $(bbs)/usr/share/doc/busybox-static/busybox.net/
|
|
||||||
mkdir -p $(bbs)/usr/share/man/man1/
|
|
||||||
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
|
|
||||||
|
|
||||||
do_static: half_clean build-static install-static
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Now for the .udeb stuff
|
|
||||||
PACKAGE=busybox-udeb
|
|
||||||
VERSION=$(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2 | sed -e s/[0-9]://g)
|
|
||||||
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
|
|
||||||
(cd $(bbubd); $(MAKE) USE_SYSTEM_PWD_GRP=false "CONFIG_SRC_DIR=../../")
|
|
||||||
touch debian/build-stamp-busybox-udeb
|
|
||||||
|
|
||||||
install-udeb: build
|
|
||||||
dh_testdir
|
|
||||||
dh_testroot
|
|
||||||
dh_clean -k
|
|
||||||
dh_installdirs
|
|
||||||
(cd $(bbubd); $(MAKE) "CONFIG_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
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Build architecture-independent files here.
|
|
||||||
binary-indep:
|
binary-indep:
|
||||||
# We have nothing to do by default.
|
|
||||||
|
|
||||||
# Build architecture-dependent files here.
|
busybox-deb:
|
||||||
binary-arch: busybox busybox-static busybox-udeb
|
|
||||||
|
|
||||||
busybox: install
|
|
||||||
@echo "--- Building: $@"
|
|
||||||
dh_testdir
|
dh_testdir
|
||||||
dh_testroot
|
dh_testroot
|
||||||
dh_installdirs
|
$(MAKE) clean
|
||||||
dh_installdocs -p$@ $(bbbd)/docs/BusyBox.txt \
|
cp ./debian/config-deb .config
|
||||||
$(bbbd)/docs/BusyBox.html docs/style-guide.txt \
|
$(MAKE) dep
|
||||||
docs/busybox.net AUTHORS README TODO
|
$(MAKE)
|
||||||
rm -rf `find $(bb) -name CVS`
|
install -D busybox ./debian/busybox/bin/busybox
|
||||||
rm -f `find $(bb) -name .cvsignore`
|
dh_installchangelogs Changelog -pbusybox
|
||||||
dh_installchangelogs -p$@ Changelog
|
dh_strip -pbusybox
|
||||||
dh_undocumented -p$@
|
dh_compress -pbusybox
|
||||||
dh_strip -p$@
|
dh_fixperms -pbusybox
|
||||||
dh_compress -p$@
|
dh_installdeb -pbusybox
|
||||||
dh_fixperms -p$@
|
dh_shlibdeps -pbusybox
|
||||||
dh_installdeb -p$@
|
dh_gencontrol -pbusybox
|
||||||
dh_shlibdeps -p$@
|
dh_md5sums -pbusybox
|
||||||
dh_gencontrol -p$@
|
dh_builddeb -pbusybox
|
||||||
dh_md5sums -p$@
|
|
||||||
dh_builddeb -p$@
|
|
||||||
|
|
||||||
|
busybox-udeb:
|
||||||
busybox-static: do_static
|
|
||||||
@echo "--- Building: $@"
|
|
||||||
dh_testdir
|
dh_testdir
|
||||||
dh_testroot
|
dh_testroot
|
||||||
dh_installdirs
|
$(MAKE) clean
|
||||||
dh_installdocs -p$@ $(bbsbd)/docs/BusyBox.txt \
|
cp ./debian/config-udeb .config
|
||||||
$(bbsbd)/docs/BusyBox.html docs/style-guide.txt \
|
$(MAKE) dep
|
||||||
docs/busybox.net AUTHORS README TODO
|
$(MAKE)
|
||||||
rm -rf `find $(bbs) -name CVS`
|
install -D busybox ./debian/busybox-udeb/bin/busybox
|
||||||
rm -f `find $(bbs) -name .cvsignore`
|
dh_installchangelogs Changelog -pbusybox-udeb
|
||||||
dh_installchangelogs -p$@ Changelog
|
dh_strip -pbusybox-udeb
|
||||||
dh_undocumented -p$@
|
dh_compress -pbusybox-udeb
|
||||||
dh_strip -p$@
|
dh_fixperms -pbusybox-udeb
|
||||||
dh_compress -p$@
|
dh_installdeb -pbusybox-udeb
|
||||||
dh_fixperms -p$@
|
dh_shlibdeps -pbusybox-udeb
|
||||||
dh_installdeb -p$@
|
dh_gencontrol -pbusybox-udeb
|
||||||
dh_shlibdeps -p$@
|
dh_md5sums -pbusybox-udeb
|
||||||
dh_gencontrol -p$@
|
dh_builddeb -pbusybox-udeb
|
||||||
dh_md5sums -p$@
|
|
||||||
dh_builddeb -p$@
|
|
||||||
|
|
||||||
|
|
||||||
# Note that this builds a .udeb, which is not policy compliant or anything.
|
busybox-static:
|
||||||
#
|
|
||||||
busybox-udeb: do_udeb
|
|
||||||
@echo "--- Building: $@"
|
|
||||||
dh_testdir
|
dh_testdir
|
||||||
dh_testroot
|
dh_testroot
|
||||||
dh_installdirs
|
$(MAKE) clean
|
||||||
dh_strip -p$@
|
cp ./debian/config-static .config
|
||||||
dh_compress -p$@
|
$(MAKE) dep
|
||||||
dh_fixperms -p$@
|
$(MAKE)
|
||||||
dh_installdeb -p$@
|
install -D busybox ./debian/busybox-static/bin/busybox
|
||||||
dh_shlibdeps -p$@
|
dh_installchangelogs Changelog -pbusybox-static
|
||||||
#Make _very_ sure there are no docs lurking about.
|
dh_strip -pbusybox-static
|
||||||
rm -rf $(bbu)/usr/share/man
|
dh_compress -pbusybox-static
|
||||||
#dh_gencontrol -p$@
|
dh_fixperms -pbusybox-static
|
||||||
# Don't write your stupid guesses to debian/files.
|
dh_installdeb -pbusybox-static
|
||||||
dh_gencontrol -p$@ -- -fdebian/files~
|
dh_shlibdeps -pbusybox-static
|
||||||
# Register file manually.
|
dh_gencontrol -pbusybox-static
|
||||||
dpkg-distaddfile $(FILENAME) debian-installer standard
|
dh_md5sums -pbusybox-static
|
||||||
dh_md5sums -p$@
|
dh_builddeb -pbusybox-static
|
||||||
dh_builddeb -p$@ --filename=$(FILENAME)
|
|
||||||
|
binary-arch: busybox-deb busybox-udeb busybox-static
|
||||||
|
|
||||||
binary: binary-indep binary-arch
|
binary: binary-indep binary-arch
|
||||||
.PHONY: build clean binary-indep binary-arch binary install
|
.PHONY: build clean binary-indep binary-arch binary install configure
|
||||||
|
Loading…
x
Reference in New Issue
Block a user