File: rules

package info (click to toggle)
binutils-z80 4
  • links: PTS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, stretch
  • size: 48 kB
  • sloc: makefile: 20
file content (28 lines) | stat: -rwxr-xr-x 879 bytes parent folder | download
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
#!/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")

BUILD_DIR=$(CURDIR)/build

%:
	dh $@ -B$(BUILD_DIR) --parallel

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=z80-unknown-coff

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)'