File: rules

package info (click to toggle)
gr-osmosdr 0.1.4-12
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,636 kB
  • ctags: 8,180
  • sloc: cpp: 12,595; python: 11,341; xml: 263; makefile: 20; ansic: 17
file content (26 lines) | stat: -rwxr-xr-x 1,019 bytes parent folder | download | duplicates (4)
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
#!/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 python2

override_dh_auto_configure:
	dh_auto_configure -- -DLIB_SUFFIX="/$(DEB_HOST_MULTIARCH)" -DPythonLibs_FIND_VERSION:STRING="2.7" -DPYTHON_EXECUTABLE:STRING="/usr/bin/python"

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

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