Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # vim:noet
4 export DEB_BUILD_MAINT_OPTIONS=hardening=+all
5 include /usr/share/dpkg/pkg-info.mk
6
7 # Uncomment this to turn on verbose mode.
8 #export DH_VERBOSE=1
9 py3default = $(subst .,,$(shell py3versions -dv))
10
11 # Test to see if we're a snapshot build by looking for the word
12 # "SNAPSHOT" in our version. If so, infer our current version and inject
13 # it into the build process.
14 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
15
16 ifneq (,$(findstring SNAPSHOT,$(DEB_VERSION)))
17 # Format is like: 0.9.0+1SNAPSHOT20131027041813-gitedc468d~saucy
18 DVS_SPLIT := $(subst ~, ,$(subst -git, ,$(DEB_VERSION)))
19 # Format is like: 0.9.0+1SNAPSHOT20131027041813 edc468d saucy
20 DEB_VERSION_GITHASH := $(word 2,$(DVS_SPLIT))
21 DEB_VERSION_SERIES := $(word 3,$(DVS_SPLIT))
22 # Produce a version suffix like: git-edc468d-ppasaucy
23 VERSION_INFO_OVERRIDE := git-$(DEB_VERSION_GITHASH)-ppa$(DEB_VERSION_SERIES)
24 else
25 VERSION_INFO_OVERRIDE := $(DEB_VERSION)
26 endif
27
28 # For tagged PPA release builds, we have a slightly different format...
29 ifneq (,$(findstring 1ppa,$(DEB_VERSION)))
30 # Format is like: 2014.09-rc1-1ppa1~saucy
31 DVS_SPLIT := $(subst ~, ,$(subst -1ppa, ,$(DEB_VERSION)))
32 # Format is like: 2014.09-rc1 1 saucy
33 DEB_VERSION_TAG := $(word 1,$(DVS_SPLIT))
34 DEB_VERSION_BUILD := $(word 2,$(DVS_SPLIT))
35 DEB_VERSION_SERIES := $(word 3,$(DVS_SPLIT))
36 # Produce a version suffix like: 2014.09-rc1-1-ppasaucy
37 VERSION_INFO_OVERRIDE := $(DEB_VERSION_TAG)-$(DEB_VERSION_BUILD)-ppa$(DEB_VERSION_SERIES)
38 endif
39
40 override_dh_auto_configure:
41 dh_auto_configure -- -DVERSION_INFO_OVERRIDE:STRING=$(VERSION_INFO_OVERRIDE) \
42 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
43 -DCMAKE_INSTALL_DOCDIR="share/doc/libbladerf-doc" \
44 -DENABLE_HOST_BUILD=ON \
45 -DTREAT_WARNINGS_AS_ERRORS=OFF \
46 -DENABLE_LIBTECLA=ON \
47 -DENABLE_LIBEDIT=ON \
48 -DENABLE_FX3_BUILD=OFF \
49 -DBUILD_DOCUMENTATION=ON \
50 -DUDEV_RULES_PATH=/usr/lib/udev/rules.d
51
52 override_dh_auto_build:
53 dh_auto_build
54 dh_auto_build --buildsystem=pybuild --sourcedir=host/libraries/libbladeRF_bindings/python
55
56 override_dh_auto_install:
57 dh_auto_install
58 # Python3 bindings
59 dh_auto_install --buildsystem=pybuild --sourcedir=host/libraries/libbladeRF_bindings/python
60 # Use locally installed Mathjax.js
61 (cd debian/tmp/usr/share/doc/libbladerf-doc/html && ln -s /usr/share/javascript/mathjax/MathJax.js MathJax.js)
62 (cd debian/tmp/usr/share/doc/libbladerf-doc/html && sed --in-place 's_http://cdn.mathjax.org/mathjax/latest/MathJax.js_MathJax.js_' *.html)
63 # library soversion named udev rules
64 #mv debian/tmp/lib/udev/rules.d/88-nuand.rules debian/tmp/lib/udev/rules.d/88-libbladerf2.rules
65 # per lintian
66 chmod -x host/examples/bladeRF-cli/sc16q11-packed-mimo/run.sh
67 chmod -x host/examples/bladeRF-cli/sc16q11-packed-siso/run.sh
68 rm -f host/examples/bladeRF-cli/sc16q11-packed-mimo/.gitignore
69 rm -f host/examples/bladeRF-cli/sc16q11-packed-siso/.gitignore
70 rm -f host/examples/bladeRF-cli/sync_trx/.gitignore
71 rm -f host/examples/python/txrx/.gitignore
72 # help2man --no-discard-stderr debian/tmp/usr/bin/bladeRF-install-firmware-v0.15.3 -o debian/tmp/usr/share/man/man1/bladeRF-install-firmware-v0.15.3.1
73 help2man --no-discard-stderr -n "perform power level measurements" debian/tmp/usr/bin/bladeRF-power -o debian/tmp/usr/share/man/man1/bladeRF-power.1
74 help2man --no-discard-stderr -n "checks for and optionally installs updates" debian/tmp/usr/bin/bladeRF-update -o debian/tmp/usr/share/man/man1/bladeRF-update.1
75
76 override_dh_auto_clean:
77 dh_auto_clean
78 - chmod ug+x host/examples/bladeRF-cli/sc16q11-packed-mimo/run.sh
79 - chmod ug+x host/examples/bladeRF-cli/sc16q11-packed-siso/run.sh
80 rm -rf .pybuild
81 rm -rf host/libraries/libbladeRF_bindings/python/bladerf.egg-info
82
83 %:
84 dh $@ --with python3