1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2024-11-23 00:15:20 +02:00
xburst-tools/usbboot/debian/rules
Jonathan Nieder 3d74b6ace7 debian/rules: add target to build source tarball
Document how to use ‘git archive’ to build a tarball from the
usbboot subdirectory of the source repository.

Repeated invocations of the get-orig-source target to fetch the
same commit will produce byte-for-byte identical results.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2010-04-06 09:29:21 +08:00

57 lines
1.4 KiB
Makefile
Executable File

#!/usr/bin/make -f
# This file is in the public domain.
# You may freely use, modify, distribute, and relicense it.
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: 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 =
opt_quiet =
ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
opt_optimize = CFLAGS="-g -O0"
endif
ifneq (,$(findstring n,$(MAKEFLAGS)))
opt_no_act = --no-act
endif
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
REPO = git://projects.qi-hardware.com/xburst-tools.git
BRANCH = master
debiandir_SQ = $(subst ','\'',$(dir $(lastword $(MAKEFILE_LIST))))
get-orig-source:
REPO='$(REPO)' BRANCH='$(BRANCH)' \
sh '$(debiandir_SQ)'get-orig-source.sh