1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
#!/usr/bin/make -f
src_version := $(shell dpkg-query -W -f='$${source:Version}' binutils-source)
deb_version := $(shell echo $(src_version) | cut -d- -f1)
gnu_version := $(shell echo $(deb_version) | cut -d. -f1-3)
z80_version := $(src_version)+$(shell dpkg-parsechangelog \
| sed -ne "s/^Version: \(.*\)/\1/p")
target := z80-unknown-coff
BUILD_DIR=$(CURDIR)/build-dir
%:
dh $@ -B$(BUILD_DIR)
override_dh_auto_configure:
mkdir -p $(BUILD_DIR)
tar -C $(BUILD_DIR) --strip-components=1 \
-xaf /usr/src/binutils/binutils-$(gnu_version).tar.*
dh_auto_configure -D$(BUILD_DIR) -- \
--target=$(target) --libdir=/usr/lib/$(target)
override_dh_auto_install:
dh_auto_install --destdir=$(CURDIR)/debian/tmp
override_dh_installchangelogs:
dh_installchangelogs $(BUILD_DIR)/ChangeLog
override_dh_gencontrol-arch:
dh_gencontrol -a -- '-v$(z80_version)' \
'-Vbu:source=$(src_version)' '-Vbu:upstream=$(deb_version)'
|