File: rules

package info (click to toggle)
gr-osmosdr 0.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 4,044 kB
  • sloc: cpp: 15,707; python: 11,349; makefile: 22; ansic: 17
file content (29 lines) | stat: -rwxr-xr-x 1,015 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
29
#!/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 $@ --with python3

override_dh_auto_configure:
	dh_auto_configure -- -DLIB_SUFFIX="/$(DEB_HOST_MULTIARCH)"

override_dh_auto_install:
	rm -f debian/gr-osmosdr/usr/lib/python3/dist-packages/osmosdr/*pyc
	rm -f debian/gr-osmosdr/usr/lib/python3/dist-packages/osmosdr/*pyo
	dh_auto_install

override_dh_makeshlibs:
	dh_makeshlibs -V 'libgnuradio-osmosdr0.1.4 (>= 0.1.4-15)'

version-to-get:
	echo $(VER) is $(GITREV)

get-orig-source: version-to-get
	git clone git://git.osmocom.org/gr-osmosdr
	cd gr-osmosdr && git archive --format=tar --prefix=gr-osmosdr-$(VER)/  $(GITREV) | xz > ../gr-osmosdr_$(VER).orig.tar.xz
	rm -rf gr-osmosdr