Merge remote-tracking branch 'origin/master' into epel7

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This commit is contained in:
Jaroslav Škarvada 2017-09-15 13:41:35 +02:00
commit 140da40017
4 changed files with 81 additions and 61 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
uhd-*.tar.gz
/uhd-images_003.010.001.000-release.tar.xz

View File

@ -1,2 +1,2 @@
81be16f9195c553f55fc1f5fc0daaddb uhd-images_003.006.002-release.tar.gz
50a25b95dc08dd3946988c5da98814a9 uhd-release_003_006_002.tar.gz
c68503082afa4d1408af8d17559120e2 uhd-release_003_010_001_000.tar.gz
fb5e160c8ed57b45b91757f54c9fd14a uhd-images_003.010.001.000-release.tar.xz

View File

@ -1,29 +0,0 @@
diff --git a/host/lib/convert/CMakeLists.txt b/host/lib/convert/CMakeLists.txt
index 0d9d098..d50b5a1 100644
--- a/host/lib/convert/CMakeLists.txt
+++ b/host/lib/convert/CMakeLists.txt
@@ -97,15 +97,15 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
UNSET(CMAKE_REQUIRED_FLAGS)
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
-IF(HAVE_ARM_NEON_H)
- SET_SOURCE_FILES_PROPERTIES(
- ${CMAKE_CURRENT_SOURCE_DIR}/convert_with_neon.cpp
- PROPERTIES COMPILE_FLAGS "${NEON_FLAGS}"
- )
- LIBUHD_APPEND_SOURCES(
- ${CMAKE_CURRENT_SOURCE_DIR}/convert_with_neon.cpp
- )
-ENDIF()
+#IF(HAVE_ARM_NEON_H)
+# SET_SOURCE_FILES_PROPERTIES(
+# ${CMAKE_CURRENT_SOURCE_DIR}/convert_with_neon.cpp
+# PROPERTIES COMPILE_FLAGS "${NEON_FLAGS}"
+# )
+# LIBUHD_APPEND_SOURCES(
+# ${CMAKE_CURRENT_SOURCE_DIR}/convert_with_neon.cpp
+# )
+#ENDIF()
########################################################################
# Convert types generation

108
uhd.spec
View File

@ -3,21 +3,35 @@
# images you need to install appropriate tools (e.g. Xilinx ISE).
%bcond_without binary_firmware
%global ver_major 3
%global ver_minor 6
%global ver_patch 2
# NEON support is by default disabled on ARMs
# building with --with=neon will enable auto detection
%bcond_with neon
%global ver %(printf "%03d.%03d.%03d" %{ver_major} %{ver_minor} %{ver_patch})
%global ver_ %(printf "%03d_%03d_%03d" %{ver_major} %{ver_minor} %{ver_patch})
%global ver_1 3
%global ver_2 10
%global ver_3 1
%global ver_4 0
%global ver %(printf "%03d.%03d.%03d.%03d" %{ver_1} %{ver_2} %{ver_3} %{ver_4})
%global ver_ %(printf "%03d_%03d_%03d_%03d" %{ver_1} %{ver_2} %{ver_3} %{ver_4})
%global wireshark_ver %((%{__awk} '/^#define VERSION[ \t]+/ { print $NF }' /usr/include/wireshark/config.h 2>/dev/null||echo none)|/usr/bin/tr -d '"')
%ifarch %{arm} aarch64
%if ! %{with neon}
%global have_neon -DHAVE_ARM_NEON_H=0
%endif
%endif
Name: uhd
URL: http://code.ettus.com/redmine/ettus/projects/uhd/wiki
Version: %{ver_major}.%{ver_minor}.%{ver_patch}
Release: 5%{?dist}
Version: %{ver_1}.%{ver_2}.%{ver_3}.%{ver_4}
Release: 1%{?dist}
License: GPLv3+
BuildRequires: cmake
BuildRequires: boost-devel libusb1-devel python-cheetah
BuildRequires: docutils doxygen pkgconfig
BuildRequires: boost-devel, libusb1-devel, python-cheetah, ncurses-devel
BuildRequires: docutils, doxygen, pkgconfig, libpcap-devel, wireshark-devel
BuildRequires: python-mako
%if ! %{with binary_firmware}
BuildRequires: sdcc sed
%endif
@ -27,11 +41,9 @@ Group: Applications/Engineering
Summary: Universal Hardware Driver for Ettus Research products
Source0: http://github.com/EttusResearch/uhd/archive/release_%{ver_}.tar.gz#/uhd-release_%{ver_}.tar.gz
Source1: %{name}-limits.conf
Source2: http://files.ettus.com/binaries/uhd_stable/latest_release/uhd-images_%{ver}-release.tar.gz
# ARM convert_test fix (rhbz#813393)
Patch0: uhd-3.5.3-no-neon.patch
Source2: http://files.ettus.com/binaries/images/uhd-images_%{ver}-release.tar.xz
# Fix firmware build with sdcc-3
Patch1: uhd-3.4.2-sdcc-3-fix.patch
Patch0: uhd-3.4.2-sdcc-3-fix.patch
%description
The UHD is the universal hardware driver for Ettus Research products.
@ -40,7 +52,6 @@ future Ettus Research products. It can be used standalone without GNU Radio.
%package firmware
Summary: Firmware files for UHD
Group: Applications/Engineering
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
@ -49,7 +60,6 @@ Firmware files for the Universal Hardware driver (UHD).
%package devel
Summary: Development files for UHD
Group: Applications/Engineering
Requires: %{name} = %{version}-%{release}
%description devel
@ -57,22 +67,28 @@ Development files for the Universal Hardware Driver (UHD).
%package doc
Summary: Documentation files for UHD
Group: Applications/Engineering
BuildArch: noarch
%description doc
Documentation for the Universal Hardware Driver (UHD).
%package tools
Summary: Tools for working with / debugging USRP device
Requires: %{name} = %{version}-%{release}
#Requires: wireshark = %{wireshark_ver}
%description tools
Tools that are useful for working with and/or debugging USRP device.
%prep
%setup -q -n uhd-release_%{ver_}
%patch0 -p1 -b .no-neon
%patch1 -p1 -b .sdcc-3-fix
%patch0 -p1 -b .sdcc-3-fix
# firmware
%if %{with binary_firmware}
# extract binary firmware
mkdir -p images/images
tar -xzf %{SOURCE2} -C images/images --strip-components=4
tar -xJf %{SOURCE2} -C images/images --strip-components=4
rm -f images/images/{LICENSE.txt,*.tag}
%endif
@ -89,10 +105,24 @@ popd
mkdir -p host/build
pushd host/build
%cmake ../
%cmake %{?have_neon} ../
make %{?_smp_mflags}
popd
# tools
pushd tools/uhd_dump
make %{?_smp_mflags} CFLAGS="%{optflags}" LDFLAGS="%{?__global_ldflags}"
popd
# tools wireshark plugin
# currenty disabled due to rhbz#1129419
#pushd tools/chdr-dissector
#mkdir build
#cd build
#%%cmake ../
#make %{?_smp_mflags}
#popd
%check
cd host/build
make test
@ -101,10 +131,10 @@ make test
pushd host/build
make install DESTDIR=%{buildroot}
# Fix udev rules and allow access only to users in usrp group
sed -i 's/BUS==/SUBSYSTEM==/;s/SYSFS{/ATTRS{/;s/MODE:="0666"/GROUP:="usrp", MODE:="0660"/' %{buildroot}%{_libdir}/uhd/utils/uhd-usrp.rules
mkdir -p %{buildroot}%{_sysconfdir}/udev/rules.d
mv %{buildroot}%{_libdir}/uhd/utils/uhd-usrp.rules %{buildroot}%{_sysconfdir}/udev/rules.d/10-usrp-uhd.rules
# Fix udev rules and use dynamic ACL management for device
sed -i '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}%{_prefix}/lib/udev/rules.d
mv %{buildroot}%{_libdir}/uhd/utils/uhd-usrp.rules %{buildroot}%{_prefix}/lib/udev/rules.d/10-usrp-uhd.rules
# Remove tests, examples binaries
rm -rf %{buildroot}%{_libdir}/uhd/{tests,examples}
@ -129,10 +159,17 @@ rm -rf %{buildroot}%{_datadir}/uhd/images/winusb_driver
# convert hardlinks to symlinks (to not package the file twice)
pushd %{buildroot}%{_bindir}
unlink ./usrp_n2xx_simple_net_burner
ln -s ../..%{_libexecdir}/uhd/usrp_n2xx_simple_net_burner
for f in usrp_n2xx_simple_net_burner usrp_x3xx_fpga_burner;
do
unlink $f
ln -s ../..%{_libexecdir}/uhd/$f
done
popd
# tools
install -Dpm 0755 tools/usrp_x3xx_fpga_jtag_programmer.sh %{buildroot}%{_bindir}/usrp_x3xx_fpga_jtag_programmer.sh
install -Dpm 0755 tools/uhd_dump/chdr_log %{buildroot}%{_bindir}/chdr_log
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
@ -141,12 +178,15 @@ popd
getent group usrp >/dev/null || groupadd -r usrp >/dev/null
%files
%exclude %{_docdir}/%{name}/manual
%exclude %{_docdir}/%{name}/doxygen
%exclude %{_datadir}/uhd/images
%doc _tmpdoc/*
%{_bindir}/*
%config(noreplace) %{_sysconfdir}/udev/rules.d/10-usrp-uhd.rules
%{_bindir}/uhd_*
%{_bindir}/usrp2*
%{_bindir}/usrp_n2xx_simple_net_burner
%{_bindir}/usrp_x3xx_fpga_burner
%{_bindir}/octoclock_firmware_burner
%{_prefix}/lib/udev/rules.d/10-usrp-uhd.rules
%config(noreplace) %{_sysconfdir}/security/limits.d/*.conf
%{_libdir}/lib*.so.*
%{_libexecdir}/uhd
@ -160,13 +200,21 @@ getent group usrp >/dev/null || groupadd -r usrp >/dev/null
%files devel
%{_includedir}/*
%{_libdir}/lib*.so
%{_libdir}/cmake/uhd/*.cmake
%{_libdir}/pkgconfig/*.pc
%files doc
%doc %{_docdir}/%{name}/manual
%doc %{_docdir}/%{name}/doxygen
%files tools
%doc tools/README.md
%{_bindir}/usrp_x3xx_fpga_jtag_programmer.sh
%{_bindir}/chdr_log
%changelog
* Fri Sep 15 2017 Jaroslav Škarvada <jskarvad@redhat.com> - 3.10.1.0-1
- New version
* Thu Mar 12 2015 Jaroslav Škarvada <jskarvad@redhat.com> - 3.6.2-5
- Enabled build on ppc64