diff --git a/usbboot/debian/.gitignore b/usbboot/debian/.gitignore index 66a4544..5495e03 100644 --- a/usbboot/debian/.gitignore +++ b/usbboot/debian/.gitignore @@ -1,3 +1,6 @@ +/xburst_stage1.bin +/xburst_stage2.bin + /files /*.debhelper.log diff --git a/usbboot/debian/README.source b/usbboot/debian/README.source new file mode 100644 index 0000000..26fb252 --- /dev/null +++ b/usbboot/debian/README.source @@ -0,0 +1,21 @@ +This Debian package is developed in a Git repository (see the Vcs-Git field +of debian/control). To build from a git checkout: + + debian/autogen.sh + debuild + +This requires a mipsel-openwrt-linux- cross-toolchain in your $PATH. You +can get one by building the development environment from Qi Hardware, for +example. + + git://projects.qi-hardware.com/openwrt-xburst.git xburst + +See the Qi Hardware wiki for details. + + http://en.qi-hardware.com/wiki/Building_Software_Image + +To build a released version of this package, no special instructions apply. +“dpkg-buildpackage” or “apt-get -b source xburst-tools” should work as +usual. + + -- Jonathan Nieder Sun, 04 Apr 2010 22:08:28 -0500 diff --git a/usbboot/debian/autogen.sh b/usbboot/debian/autogen.sh new file mode 100755 index 0000000..7a0016a --- /dev/null +++ b/usbboot/debian/autogen.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# Generate debian/xburst_stage1.bin and debian/xburst_stage2.bin +# +# Requires a mipsel-openwrt-linux- toolchain on the $PATH. + +set -e + +debian/rules firmware +cp -f xburst_stage1/xburst_stage1.bin debian/ +cp -f xburst_stage2/xburst_stage2.bin debian/ diff --git a/usbboot/debian/changelog b/usbboot/debian/changelog index 5761823..c8afe76 100644 --- a/usbboot/debian/changelog +++ b/usbboot/debian/changelog @@ -6,8 +6,12 @@ xburst-tools (0.0+201002-1.1) local; urgency=low * Build-Conflicts: automake1.4 * add a Vcs-Git field to debian/control and remove the outdated watch file + * debian/README.source: add instructions for re-building the firmware + * debian/autogen.sh: new script + * debian/rules: install firmware built at packaging time, to avoid + requiring a mipsel cross-compiler on buildds - -- Jonathan Nieder Sun, 04 Apr 2010 21:45:57 -0500 + -- Jonathan Nieder Sun, 04 Apr 2010 22:08:47 -0500 xburst-tools (0.0+201002-1) unstable; urgency=low diff --git a/usbboot/debian/clean.sh b/usbboot/debian/clean.sh index 8834847..1b17a8b 100644 --- a/usbboot/debian/clean.sh +++ b/usbboot/debian/clean.sh @@ -36,8 +36,7 @@ splitgitignore='#!/usr/bin/awk } ' -gitdir="-type d -name '.*' -prune" -debiandir="-type d -name debian -prune" +offlimits="-type d -name '.*' -prune -o -type d -name debian -prune" remove_file_globs() { while read glob @@ -56,7 +55,7 @@ remove_directory_globs() { remove_file_findpatterns() { while read pat do - find . $gitdir -o \ + find . $offlimits -o \ '(' -name "$pat" -execdir rm -f '{}' + ')' done } @@ -64,12 +63,12 @@ remove_file_findpatterns() { remove_directory_findpatterns() { while read pat do - find . $gitdir -o \ + find . $offlimits -o \ '(' -type d -name "$pat" -execdir rm -fr '{}' + ')' done } -find . $gitdir -o $debiandir -o '(' -name .gitignore -print ')' | +find . $offlimits -o '(' -name .gitignore -print ')' | while read file do ( diff --git a/usbboot/debian/rules b/usbboot/debian/rules index ccaff2d..8190b0b 100755 --- a/usbboot/debian/rules +++ b/usbboot/debian/rules @@ -6,12 +6,22 @@ build clean install binary-arch binary-indep binary: +dh --parallel $(opt_no_act) $@ override_dh_auto_clean: + test -e debian/xburst_stage1.bin || { \ + echo >&2 see debian/README.source; \ + exit 1; \ + } dh_auto_clean sh debian/clean.sh -override_dh_auto_configure: - AUTOMAKE="automake --foreign" autoreconf -is - dh_auto_configure -- $(opt_optimize) $(opt_quiet) LDFLAGS=-Wl,-z,defs +override_dh_auto_configure: configure + dh_auto_configure -- $(opt_optimize) $(opt_quiet) \ + --disable-firmware LDFLAGS=-Wl,-z,defs + +override_dh_auto_install: + dh_auto_install + : install firmware from source package + dh_install debian/xburst_stage1.bin usr/share/xburst-tools/ + dh_install debian/xburst_stage2.bin usr/share/xburst-tools/ opt_optimize = CFLAGS="-g -O2" opt_no_act = @@ -29,3 +39,11 @@ ifneq (,$(filter quiet,$(DEB_BUILD_OPTIONS))) opt_quiet = --quiet MAKEFLAGS += --quiet endif + +configure: configure.ac + AUTOMAKE="automake --foreign" autoreconf -is + +firmware: configure + ./configure --enable-firmware + $(MAKE) -C src ../xburst_stage1/xburst_stage1.bin \ + ../xburst_stage2/xburst_stage2.bin