Commit 0bd866d8 authored by David Johnson's avatar David Johnson

Add python3-uhd to packaging.

(This is basically a partial, manual merge of the relevant bits
from the Debian package at https://salsa.debian.org/bottoms/pkg-uhd
into the uhd packaging content.)
parent 2aa5289d
uhd (3.14.1.0-1emulab1) ubuntu_release; urgency=low
* Add python3-uhd package
-- David M. Johnson <johnsond@cs.utah.edu> Tue, 22 Jun 2019 15:26:09 -0700
uhd (3.14.1.0-0ubuntu1) ubuntu_release; urgency=low
E320: Add support for rev E
......
Source: uhd
Section: science
Priority: optional
Maintainer: Ettus Research <packages@ettus.com>
Uploaders: Martin Braun <martin.braun@ettus.com>
Maintainer: David M. Johnson <johnsond@cs.utah.edu>
Build-Depends: cmake,
debhelper (>= 9),
doxygen,
......@@ -20,20 +19,21 @@ Build-Depends: cmake,
libusb-1.0-0-dev [linux-any],
libusb2-dev [kfreebsd-any],
pkg-config,
python-dev,
python-mako,
python-requests
python3-all-dev,
python3-mako,
python3-numpy,
python3-requests,
python3-setuptools
Standards-Version: 3.9.7
Homepage: https://www.ettus.com
Vcs-Git: git://github.com/EttusResearch/uhd.git
Vcs-Git: git://gitlab.flux.utah.edu/powderrenew/uhd.git
Package: uhd-host
Architecture: any
Depends: adduser,
libuhd3.14.0 (= ${binary:Version}),
python,
python-requests,
${misc:Depends},
${python3:Depends},
python3-requests,
${shlibs:Depends}
Recommends: curl, procps, python-tk
Suggests: gnuradio
......@@ -53,7 +53,7 @@ Package: libuhd3.14.0
Architecture: any
Section: libs
Pre-Depends: ${misc:Pre-Depends}
Depends: python, adduser, ${shlibs:Depends}, ${misc:Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}
Suggests: gnuradio
Replaces: libuhd003
Multi-Arch: same
......@@ -78,3 +78,17 @@ Description: universal hardware driver for Ettus Research products
.
This package contains the header files and documentation for
developing with libuhd.
Package: python3-uhd
Architecture: any
Section: libdevel
Depends: libuhd3.14.0 (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}, ${python3:Depends}
Recommends: gnuradio
Description: universal hardware driver for Ettus Research products - Python3
Host library for the Universal Hardware Driver for Ettus Research products.
.
The supported devices provide analog radio receiver and transmitter hardware
along with digital interfaces for getting signals to and from a software
defined radio running on the host computer.
.
This package contains the Python API support for Python3.
usr/lib/python3/dist-packages/
#!/usr/bin/make -f
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export DEB_HOST_MULTIARCH
py3default = $(subst .,,$(shell py3versions -dv))
%:
dh $@ --parallel --sourcedirectory=host --builddirectory=build
dh $@ --parallel --sourcedirectory=host --with python3 --builddirectory=build
override_dh_auto_configure:
dh_auto_configure -- -DLIB_SUFFIX="/$(DEB_HOST_MULTIARCH)" -DPKG_LIB_DIR="/usr/lib/uhd" -DUHD_RELEASE_MODE="release"
dh_auto_configure -- -DLIB_SUFFIX="/$(DEB_HOST_MULTIARCH)" -DPKG_LIB_DIR="/usr/lib/uhd" -DUHD_RELEASE_MODE="release" \
-DENABLE_RFNOC=True -DENABLE_STATIC_LIBS=ON \
-DENABLE_PYTHON_API=ON -DENABLE_PYTHON3=ON \
-DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3 \
-DBOOST_PYTHON_COMPONENT=python$(py3default)
# The test suite for this package is busted on powerpc.
override_dh_auto_test:
......
apt-get install build-essential devscripts python3-all-dev python3-mako python3-numpy python3-setuptools
uhd $ FORCE_YES=1 SKIP_UPLOAD=1 SKIP_CLEANUP=1 DEBUILD_OPTS="-us -uc" tools/debs/upload_debs.sh
uhd $ ls ..
uhd $ dpkg -i ../*.deb
uhd $ apt-get install -f
......@@ -26,7 +26,10 @@ if [ -f fpga-src/README.md ]; then
exit 1
fi
FORCE_YES=0
if [ -z "$FORCE_YES" ]
then
FORCE_YES=0
fi
if [ $# -eq 1 ]
then
if [ "$1" = "-y" ]
......@@ -34,6 +37,14 @@ then
FORCE_YES=1
fi
fi
if [ -z "$SKIP_UPLOAD" ]
then
SKIP_UPLOAD=0
fi
if [ -z "$SKIP_CLEANUP" ]
then
SKIP_CLEANUP=0
fi
UHD_TOP_LEVEL=$PWD
......@@ -67,7 +78,7 @@ fi
# Generate the TAR file to be uploaded.
echo "Creating UHD source archive."
tar --exclude='.git*' --exclude='./debian' --exclude='*.swp' --exclude='fpga-src' --exclude='build' --exclude='./images/*.pyc' --exclude='./images/uhd-*' --exclude='tags' -cJf ../uhd_${VERSION}.orig.tar.xz .
tar --exclude='.git' --exclude='.gitignore' --exclude='.gitmodules' --exclude='./debian' --exclude='*.swp' --exclude='fpga-src' --exclude='build' --exclude='./images/*.pyc' --exclude='./images/uhd-*' --exclude='tags' -cJf ../uhd_${VERSION}.orig.tar.xz .
if [ $? != 0 ]
then
echo "Failed to create UHD source archive."
......@@ -104,8 +115,8 @@ fi
for RELEASE in ${RELEASES}
do
cp debian/changelog ../changelog.backup
sed -i "s/${ORIG_RELEASE}/${RELEASE}/;s/0ubuntu1/0ubuntu1~${RELEASE}1/" debian/changelog
debuild -S -i -sa
sed -i "s/${ORIG_RELEASE}/${RELEASE}/;s/uhd (\(.*\))/uhd (\1~${RELEASE}1)/" debian/changelog
debuild -S -i -sa $DEBUILD_OPTS
if [ $? != 0 ]
then
echo "Failed to generate package info for" ${RELEASE}
......@@ -115,6 +126,8 @@ do
mv ../changelog.backup debian/changelog
done
if [ $SKIP_UPLOAD -ne 1 ]
then
if [ $FORCE_YES -ne 1 ]
then
echo "Proceed to upload to launchpad? (yes/no)"
......@@ -135,7 +148,10 @@ do
exit 1
fi
done
fi
if [ $SKIP_CLEANUP ]
then
if [ $FORCE_YES -ne 1 ]
then
echo
......@@ -147,3 +163,4 @@ then
rm -r ${UHD_TOP_LEVEL}/debian uhd-${VERSION} uhd_${VERSION}.orig.tar.xz uhd*dsc uhd*changes uhd*debian.tar.* uhd*_source.build uhd*.upload
fi
fi
fi
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment