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
|
#!/usr/bin/make -f
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export DEB_HOST_MULTIARCH
DEB_DEBIAN_DIR=$(dir $(firstword $(MAKEFILE_LIST)))
DEBVER=$(shell head -1 $(DEB_DEBIAN_DIR)/changelog | awk -F'[()]' '{print $$2}')
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]),release_00\1_0\2_00\3_00\4,p')
GITREV=v3.13.1.0
py3default = $(subst .,,$(shell py3versions -dv))
%:
dh $@ --sourcedirectory=host --with python3 --buildsystem=cmake+ninja
override_dh_acc:
- dh_acc $@
- cat logs/libuhd-dev/*/log.txt
override_dh_auto_configure:
if [ $(DEB_BUILD_ARCH) = armhf ]; then \
dh_auto_configure -- -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLIB_SUFFIX="/$(DEB_HOST_MULTIARCH)" \
-DENABLE_RFNOC=True -DENABLE_STATIC_LIBS=ON \
-DUHD_VERSION=$(DEBVER) -DENABLE_PYTHON_API=ON -DENABLE_PYTHON3=ON \
-DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3 \
-DBOOST_PYTHON_COMPONENT=python$(py3default) \
-DPKG_LIB_DIR="/usr/lib/uhd" -DDOXYGEN_HAVE_DOT=True \
-DNEON_SIMD_ENABLE=OFF ;\
else \
dh_auto_configure -- -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLIB_SUFFIX="/$(DEB_HOST_MULTIARCH)" \
-DENABLE_RFNOC=True -DENABLE_STATIC_LIBS=ON \
-DUHD_VERSION=$(DEBVER) -DENABLE_PYTHON_API=ON -DENABLE_PYTHON3=ON \
-DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3 \
-DBOOST_PYTHON_COMPONENT=python$(py3default) \
-DPKG_LIB_DIR="/usr/lib/uhd" -DDOXYGEN_HAVE_DOT=True ;\
fi
# RFNoC test 30 failes if no USRP available
override_dh_auto_test:
- dh_auto_test
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/etc/sysctl.d/uhd-usrp2.conf
dh_auto_install
chmod -x debian/tmp/usr/lib/uhd/tests/devtest/*.py
get-orig-source:
echo $(VER) $(GITREV)
git clone git://github.com/EttusResearch/uhd.git
cd uhd && git submodule init
cd uhd && git submodule update
cd uhd && git archive --format=tar --prefix=uhd-$(VER)/ $(GITREV) | xz > ../../uhd_$(VER).orig.tar.xz
cd uhd && git checkout $(GITREV)
cd uhd && rm -rf fpga-src/.git fpga-src/.gitignore
cd uhd && rm -rf fpga-src/usrp3/top/b200/planahead/planahead.runs/impl_1/rundef.js
cd uhd && tar cf - fpga-src | xz > ../../uhd_$(VER).orig-fpga-src.tar.xz
rm -rf uhd
|