File: rules

package info (click to toggle)
gr-osmosdr 0.1.1.4.ac95af2-1~bpo70%2B1
  • links: PTS
  • area: main
  • in suites: wheezy-backports
  • size: 1,756 kB
  • sloc: python: 11,210; cpp: 9,280; xml: 263; makefile: 22; ansic: 17
file content (29 lines) | stat: -rwxr-xr-x 1,157 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 python2

override_dh_auto_configure:
	dh_auto_configure -- -DLIB_SUFFIX="/$(DEB_HOST_MULTIARCH)" -DPythonLibs_FIND_VERSION:STRING="2.7" -DPythonInterp_FIND_VERSION:STRING="2.7"

override_dh_python2:
	dh_python2 --no-guessing-versions --no-guessing-deps -V 2.7 --package=gr-osmosdr --no-package=libgnuradio-osmosdr0.0.0

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