| 1 |
#!/usr/bin/make -f |
| 2 |
include /usr/share/dpkg/default.mk |
| 3 |
DEB_VERSION_EPOCH = $(call dpkg_late_eval,DEB_VERSION_EPOCH,echo '$(DEB_VERSION)' | sed -e 's/^\([0-9]*:\).*/\1/' -e 's/://') |
| 4 |
|
| 5 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 6 |
export DH_VERBOSE = 1 |
| 7 |
|
| 8 |
binutils_source_name = binutils-source |
| 9 |
binutils_source_version != dpkg-query -f'$${source:Upstream-Version}' -W $(binutils_source_name) |
| 10 |
binutils_source_tar != dpkg-query -L $(binutils_source_name) | grep 'binutils-[^/]*\.tar.*' |
| 11 |
binutils_source_dir = src |
| 12 |
build_using != dpkg-query -f '$${source:Package} (= $${source:Version})' -W $(binutils_source_name) |
| 13 |
target = m68hc11 |
| 14 |
enable_targets = m68hc11,m68hc12 |
| 15 |
pkg_version = $(DEB_VERSION_EPOCH):$(binutils_source_version)+$(DEB_VERSION_UPSTREAM) |
| 16 |
|
| 17 |
%: |
| 18 |
mkdir --parent "$(binutils_source_dir)" |
| 19 |
dh $@ --sourcedirectory="$(binutils_source_dir)" --builddirectory |
| 20 |
|
| 21 |
execute_before_dh_update_autotools_config: |
| 22 |
tar \ |
| 23 |
--extract \ |
| 24 |
--directory="$(binutils_source_dir)" \ |
| 25 |
--strip-components=1 \ |
| 26 |
--file="$(binutils_source_tar)" |
| 27 |
cd "$(binutils_source_dir)"; QUILT_PATCHES=../debian/patches quilt push -a |
| 28 |
rm --force --recursive $(binutils_source_dir)/zlib |
| 29 |
|
| 30 |
override_dh_autoreconf: |
| 31 |
if ! echo $(DEB_BUILD_OPTIONS) | grep -q terse; \ |
| 32 |
then \ |
| 33 |
AUTORECONF_OPTS='-v'; \ |
| 34 |
fi; \ |
| 35 |
AUTORECONF_DIRS=`cd $(binutils_source_dir) && find . ! -path './.pc/*' \( -name configure.ac -o -name configure.in \)`; \ |
| 36 |
dh_autoreconf autoreconf2.69 -- \ |
| 37 |
--force \ |
| 38 |
--include=`pwd`/$(binutils_source_dir)/config \ |
| 39 |
$$AUTORECONF_OPTS \ |
| 40 |
$$AUTORECONF_DIRS |
| 41 |
|
| 42 |
override_dh_auto_configure: |
| 43 |
DH_COMPAT=10 dh_auto_configure -- \ |
| 44 |
--target=$(target) \ |
| 45 |
--libdir="\$${prefix}/lib/$(target)" \ |
| 46 |
--with-bugurl="https://www.debian.org/Bugs/" \ |
| 47 |
--with-system-zlib \ |
| 48 |
--with-pkgversion="$(pkg_version)" \ |
| 49 |
--enable-deterministic-archives \ |
| 50 |
--enable-targets=$(enable_targets) |
| 51 |
|
| 52 |
override_dh_auto_install: |
| 53 |
dh_auto_install --destdir=debian/tmp |
| 54 |
|
| 55 |
override_dh_gencontrol: |
| 56 |
dh_gencontrol -- -v$(pkg_version) -VBuilt-Using="$(build_using)" |