Sisyphus repository
Last update: 20 june 2019 | SRPMs: 17673 | Visits: 14143912
en ru br
ALT Linux repos

Group :: Engineering
RPM: uhd

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

# Unpackaged files in buildroot should terminate build
%define _unpackaged_files_terminate_build 1

# see

%define _localstatedir %_var

# NEON support is by default disabled on ARMs

# building with --with=neon will enable auto detection
%def_with neon

%ifarch %arm aarch64
%if ! %{with neon}
%global have_neon -DHAVE_ARM_NEON_H=0

Name: uhd
Release: alt3
License: GPLv3+
Group: Engineering
Summary: Universal Hardware Driver for Ettus Research products
Packager: Anton Midyukov <antohami at>

Source: %name-%version.tar
Source1: %name-limits.conf
# Download command firmware:
# uhd_images_downloader --types "(fpga|fw)_default" -i images
Source2: images.tar
Patch: uhd-

BuildRequires: ctest cmake
BuildRequires: boost-interprocess-devel gcc-c++ boost-asio-devel boost-context-devel boost-coroutine-devel boost-devel boost-program_options-devel boost-devel-headers boost-filesystem-devel boost-flyweight-devel boost-geometry-devel boost-graph-parallel-devel boost-interprocess-devel boost-locale-devel boost-lockfree-devel boost-log-devel boost-math-devel boost-mpi-devel boost-msm-devel boost-multiprecision-devel boost-polygon-devel boost-program_options-devel boost-python-devel boost-python-headers boost-signals-devel boost-wave-devel libusb-devel libncurses++-devel libncurses-devel libncursesw-devel libtic-devel libtinfo-devel libgps-devel libudev-devel
BuildRequires: rpm-build-python
BuildRequires: python-module-Cheetah
BuildRequires: python-module-docutils doxygen libpcap-devel wireshark-devel
BuildRequires: python-module-mako
BuildRequires: libnumpy-devel
Requires(pre): shadow-change shadow-check shadow-convert shadow-edit shadow-groups shadow-log shadow-submap shadow-utils
Requires: tkinter

The UHD is the universal hardware driver for Ettus Research products.
The goal of the UHD is to provide a host driver and API for current and
future Ettus Research products. It can be used standalone without GNU Radio.

%package firmware
Group: Engineering
Summary: Firmware files for UHD
Requires: %name = %EVR
BuildArch: noarch

%description firmware
Firmware files for the Universal Hardware driver (UHD).

%package devel
Group: Development/Other
Summary: Development files for UHD
Requires: %name = %EVR

%description devel
Development files for the Universal Hardware Driver (UHD).

%package doc
Group: Documentation
Summary: Documentation files for UHD
BuildArch: noarch

%description doc
Documentation for the Universal Hardware Driver (UHD).

%package tools
Group: Engineering
Summary: Tools for working with / debugging USRP device
Requires: %name = %EVR

%description tools
Tools that are useful for working with and/or debugging USRP device.

%package -n python-module-%name
Group: Development/Python
Summary: Python API for %name
Requires: %name = %EVR

%description -n python-module-%name
Python API for %name

%patch -p1
tar -xf %SOURCE2

pushd host
%cmake %{?have_neon} \
       -DENABLE_E300=ON \

# tools

pushd tools/uhd_dump

pushd host/BUILD
make test

pushd host

# Fix udev rules and use dynamic ACL management for device

%__subst 's/BUS==/SUBSYSTEM==/;s/SYSFS{/ATTRS{/;s/MODE:="0666"/MODE:="0660", ENV{ID_SOFTWARE_RADIO}="1"/' %buildroot%_libdir/uhd/utils/uhd-usrp.rules
mkdir -p %buildroot%_udevrulesdir
mv %buildroot%_libdir/uhd/utils/uhd-usrp.rules %buildroot%_udevrulesdir/10-usrp-uhd.rules

# Remove tests, examples binaries

rm -rf %buildroot%_libdir/uhd/{tests,examples}

# Move the utils stuff to libexec dir

mkdir -p %buildroot%_libexecdir/uhd
mv %buildroot%_libdir/uhd/utils/* %buildroot%_libexecdir/uhd

# Package base docs to base package

mkdir _tmpdoc
mv %buildroot%_docdir/%name/{LICENSE,} _tmpdoc

install -m 644 -D %SOURCE1 %buildroot%_sysconfdir/security/limits.d/99-usrp.conf

# firmware

mkdir -p %buildroot%_datadir/uhd/images
cp -r images/images/* %buildroot%_datadir/uhd/images

# remove win stuff

rm -rf %buildroot%_datadir/uhd/images/winusb_driver

# tools

install -Dpm 0755 tools/ %buildroot%_bindir/
install -Dpm 0755 tools/uhd_dump/chdr_log %buildroot%_bindir/chdr_log

%exclude %_docdir/%name/doxygen
%exclude %_datadir/uhd/images
%doc _tmpdoc/*
%exclude %_bindir/
%exclude %_bindir/chdr_log
%config(noreplace) %_sysconfdir/security/limits.d/*.conf

%files firmware

%files devel
%dir %_libdir/cmake/uhd

%files doc
%doc %_docdir/%name/doxygen

%files tools
%doc tools/

%files -n python-module-%name


Full changelog you can see here

design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin