File: rules

package info (click to toggle)
hackrf 2018.01.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 30,092 kB
  • sloc: ansic: 15,215; python: 649; vhdl: 218; xml: 20; makefile: 18; sh: 14
file content (23 lines) | stat: -rwxr-xr-x 890 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
#!/usr/bin/make -f
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export DEB_HOST_MULTIARCH
DEB_DEBIAN_DIR=$(dir $(firstword $(MAKEFILE_LIST)))
VER=$(shell dpkg-parsechangelog -l$(DEB_DEBIAN_DIR)/changelog \
              | sed -rne 's,^Version: ([^-]+).*,\1,p')
GITREV=$(shell echo $(VER) | sed -rne 's,[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\.([0-f]+),\1,p')

%:
	dh $@ --sourcedirectory=host --builddirectory=build

override_dh_auto_configure:
	dh_auto_configure --sourcedirectory=host --builddirectory=build -- -DLIB_SUFFIX=/$(DEB_HOST_MULTIARCH)
	- cp -p build/libhackrf/53-hackrf.rules debian/libhackrf0.udev

override_dh_acc:
	- dh_acc $@
	- cat logs/libbladerf-dev/*/log.txt

get-orig-source:
	git clone https://github.com/mossmann/hackrf.git
	cd hackrf && git archive --format=tar --prefix=hackrf-$(VER)/  $(GITREV) | xz > ../hackrf_$(VER).orig.tar.xz
	rm -rf hackrf