File: rules

package info (click to toggle)
uhd 4.9.0.0%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 184,180 kB
  • sloc: cpp: 262,887; python: 112,011; ansic: 102,670; vhdl: 57,031; tcl: 19,924; xml: 8,581; makefile: 3,028; sh: 2,812; pascal: 230; javascript: 120; csh: 94; asm: 20; perl: 11
file content (108 lines) | stat: -rwxr-xr-x 6,505 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export DEB_HOST_MULTIARCH
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
py3default = $(subst .,,$(shell py3versions -dv))
HAS_LIBDPDK_DEV=$(shell if [ -f /usr/include/dpdk/rte_version.h ] ; then echo "YES" ;  else echo "NO" ; fi)
DEB_NEON_SIMD_OPTION=$(shell if [ $(DEB_BUILD_ARCH) = armhf ]; then echo "-DNEON_SIMD_ENABLE=OFF" ; else echo "" ; fi)
DEB_UHD_PACKAGE_CONFIGURATION=$(shell echo "-DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=\"\" \
			     -DENABLE_STATIC_LIBS=OFF -DENABLE_RFNOC_DEV=ON -DENABLE_MANUAL=ON  \
			     -DUHD_VERSION=$(DEB_VERSION) -DENABLE_PYTHON_API=ON \
			     -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3 \
			     -DBOOST_PYTHON_COMPONENT=python$(py3default) \
	                     -DPKG_LIB_DIR="/usr/libexec/uhd" $(DEB_NEON_SIMD_OPTION)")

ifneq (,$(filter $(DEB_HOST_ARCH), mipsel))
  export DEB_CXXFLAGS_MAINT_APPEND = -g1
endif

%:
	dh $@ --sourcedirectory=host --with python3 --with numpy3 --buildsystem=cmake+ninja

override_dh_auto_configure:
	dh_auto_configure $@ -- $(DEB_UHD_PACKAGE_CONFIGURATION) -DENABLE_DOXYGEN=ON -DENABLE_LATEX_DOCS=OFF \
						-DENABLE_DOXYGEN_DOT=ON -DDOXYGEN_HAVE_DOT=True
	if [ $(HAS_LIBDPDK_DEV) = YES ] ; then dh_auto_configure $@ --builddirectory=uhdplain -- \
				$(DEB_UHD_PACKAGE_CONFIGURATION) -DENABLE_DOXYGEN=OFF -DENABLE_DPDK=OFF ; fi

override_dh_auto_build-arch:
	dh_auto_build $@
	if [ $(HAS_LIBDPDK_DEV) = YES ] ; then dh_auto_build $@ --builddirectory=uhdplain ; fi

override_dh_auto_build-indep:
	dh_auto_build $@

override_dh_auto_test-arch:
	echo "Some tests expected to fail in 4.9.0.0~rc*"
	- dh_auto_test

override_dh_auto_test-indep:
	echo "Not testing - docs only build"

override_dh_auto_install:
	- cp debian/uhd-host.limits debian/uhd-host/etc/security/limits.d/uhd.conf
	- cp debian/uhd-host.sysctl debian/uhd-host/usr/lib/sysctl.d/50-uhd-usrp2.conf
	dh_auto_install $@
	- mv debian/tmp/usr/bin/usrp_hwd.py debian/tmp/usr/bin/usrp_hwd
	- if [ $(HAS_LIBDPDK_DEV) = YES ] ; then \
		dh_auto_install $@ --builddirectory=uhdplain --destdir=debian/tmp/plain ;\
		mv debian/tmp/plain/usr/bin/usrp_hwd.py debian/tmp/plain/usr/bin/usrp_hwd ;\
		mkdir -p debian/tmp/dpdk/usr/lib ;\
		mv debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) debian/tmp/dpdk/usr/lib/$(DEB_HOST_MULTIARCH) ;\
		rm -rf debian/tmp/dpdk/usr/lib/$(DEB_HOST_MULTIARCH)/cmake ;\
		rm debian/tmp/dpdk/usr/lib/$(DEB_HOST_MULTIARCH)/libuhd.so ;\
		rm -rf debian/tmp/dpdk/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig ;\
		mv debian/tmp/plain/usr/lib/$(DEB_HOST_MULTIARCH) debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) ;\
		mkdir -p debian/tmp/dpdk/usr/bin ;\
		mv debian/tmp/usr/libexec/uhd/tests/dpdk_test debian/tmp/dpdk/usr/bin/dpdk_test ;\
		mv debian/tmp/usr/libexec/uhd/tests/dpdk_port_test debian/tmp/dpdk/usr/bin/dpdk_port_test ;\
	fi
	rm -rf debian/tmp/usr/share/doc/uhd/LICENSE
	- find debian/*/usr/share/uhd/4.9.0/rfnoc/fpga/usrp3/top/x400 -type d -empty -delete
	rm -rf debian/uhd-host/usr/libexec/uhd/tests/dpdk*
        # Remove source files used to generate documentation
	rm -rf debian/tmp/usr/share/doc/uhd/doxygen/latex
	chmod +x debian/*/usr/share/uhd/4.9.0/rfnoc/fpga/usrp3/export/x300/radio/setupenv.sh
	chmod +x debian/*/usr/share/uhd/4.9.0/rfnoc/fpga/usrp3/lib/rfnoc/crossbar/synth/axis_ctrl_crossbar_nxn_top.tcl
	chmod +x debian/*/usr/share/uhd/4.9.0/rfnoc/fpga/usrp3/lib/rfnoc/crossbar/synth/chdr_crossbar_nxn_top.tcl
	chmod +x debian/*/usr/share/uhd/4.9.0/rfnoc/fpga/usrp3/tools/scripts/git-hash.sh
	chmod +x debian/*/usr/share/uhd/4.9.0/rfnoc/fpga/usrp3/tools/scripts/launch_modelsim.sh
	chmod +x debian/*/usr/share/uhd/4.9.0/rfnoc/fpga/usrp3/tools/scripts/launch_vcom.sh
	chmod +x debian/*/usr/share/uhd/4.9.0/rfnoc/fpga/usrp3/tools/scripts/launch_vivado.sh
	chmod +x debian/*/usr/share/uhd/4.9.0/rfnoc/fpga/usrp3/tools/scripts/setupenv_base.sh
	chmod +x debian/*/usr/share/uhd/4.9.0/rfnoc/fpga/usrp3/tools/scripts/shared-ip-loc-manage.sh
	chmod +x debian/*/usr/share/uhd/4.9.0/rfnoc/fpga/usrp3/top/e31x/setupenv.sh
	chmod +x debian/*/usr/share/uhd/4.9.0/rfnoc/fpga/usrp3/top/e320/setupenv.sh
	chmod +x debian/*/usr/share/uhd/4.9.0/rfnoc/fpga/usrp3/top/n3xx/setupenv.sh
	chmod +x debian/*/usr/share/uhd/4.9.0/rfnoc/fpga/usrp3/top/python/batch-build
	chmod +x debian/*/usr/share/uhd/4.9.0/rfnoc/fpga/usrp3/top/x300/setupenv.sh
	chmod +x debian/*/usr/share/uhd/4.9.0/rfnoc/fpga/usrp3/top/x400/setupenv.sh
	rm -f debian/*/usr/share/uhd/4.9.0/rfnoc/fpga/usrp3/LICENSE.md
	rm -f debian/tmp/usr/libexec/uhd/utils/uhd-usrp.rules
	# install UTF-8 instead of ISO-8859 encoding
	iconv -f ISO-8859-1 -t utf8 debian/tmp/usr/share/uhd/4.9.0/rfnoc/fpga/usrp3/lib/zpu/wishbone/wishbone_pkg.vhd > wishbone_pkg.vhd.new
	mv -f wishbone_pkg.vhd.new debian/tmp/usr/share/uhd/4.9.0/rfnoc/fpga/usrp3/lib/zpu/wishbone/wishbone_pkg.vhd
	iconv -f ISO-8859-1 -t utf8 debian/tmp/usr/share/uhd/4.9.0/rfnoc/fpga/usrp3/lib/zpu/wishbone/zpu_system.vhd > zpu_system.vhd.new
	mv -f zpu_system.vhd.new debian/tmp/usr/share/uhd/4.9.0/rfnoc/fpga/usrp3/lib/zpu/wishbone/zpu_system.vhd
	iconv -f ISO-8859-1 -t utf8 debian/tmp/usr/share/uhd/4.9.0/rfnoc/fpga/usrp3/lib/zpu/wishbone/zpu_wb_bridge.vhd > zpu_wb_bridge.vhd.new
	mv -f zpu_wb_bridge.vhd.new debian/tmp/usr/share/uhd/4.9.0/rfnoc/fpga/usrp3/lib/zpu/wishbone/zpu_wb_bridge.vhd
	iconv -f ISO-8859-1 -t utf8 debian/tmp/usr/share/uhd/4.9.0/rfnoc/fpga/usrp3/top/x400/rf/400m/adc_gearbox_2x4.vhd > adc_gearbox_2x4.vhd.new
	mv -f adc_gearbox_2x4.vhd.new debian/tmp/usr/share/uhd/4.9.0/rfnoc/fpga/usrp3/top/x400/rf/400m/adc_gearbox_2x4.vhd
	iconv -f ISO-8859-1 -t utf8 debian/tmp/usr/share/uhd/4.9.0/rfnoc/fpga/usrp3/top/x400/rf/400m/dac_gearbox_12x8.vhd > dac_gearbox_12x8.vhd
	mv -f dac_gearbox_12x8.vhd debian/tmp/usr/share/uhd/4.9.0/rfnoc/fpga/usrp3/top/x400/rf/400m/dac_gearbox_12x8.vhd

override_dh_shlibdeps:
	dh_shlibdeps --package=uhd-host --libpackage=libuhd4.9.0
	dh_shlibdeps --package=libuhd4.9.0 --libpackage=libuhd4.8.0
	dh_shlibdeps --package=libuhd4.9.0-dpdk --libpackage=libuhd4.8.0-dpdk
	dh_shlibdeps --package=libuhd4.9.0-dpdk-tests --libpackage=libuhd4.8.0-dpdk
	dh_shlibdeps --package=libuhd-dev --libpackage=libuhd4.9.0
	dh_shlibdeps --package=python3-uhd --libpackage=libuhd4.9.0

override_dh_auto_clean:
	rm -rf host/tests/__pycache__
	rm -rf host/tests/common/chdr_resource/__pycache__
	rm -rf host/utils/__pycache__
	rm -rf uhdplain
	dh_auto_clean $@