Added firmware subpackage
Resolves: rhbz#769684
This commit is contained in:
parent
ea6520057d
commit
d4ce823c5b
1
sources
1
sources
@ -1 +1,2 @@
|
||||
f80d4e5434ad5f43128501de00906612 uhd-3.4.2.tar.gz
|
||||
3a029f244df6dd9812e196ec905a1fc8 uhd-images_003.004.002-release.tar.gz
|
||||
|
1721
uhd-3.4.2-sdcc-3-fix.patch
Normal file
1721
uhd-3.4.2-sdcc-3-fix.patch
Normal file
File diff suppressed because it is too large
Load Diff
69
uhd.spec
69
uhd.spec
@ -1,5 +1,17 @@
|
||||
# By default include binary_firmware, otherwise try to rebuild
|
||||
# the firmware from sources. If you want to rebuild all firmware
|
||||
# images you need to install appropriate tools (e.g. Xilinx ISE).
|
||||
%bcond_without binary_firmware
|
||||
|
||||
%global ver_major 3
|
||||
%global ver_minor 4
|
||||
%global ver_patch 2
|
||||
|
||||
%global ver %(printf "%03d.%03d.%03d" %{ver_major} %{ver_minor} %{ver_patch})
|
||||
%global ver_ %(printf "%03d_%03d_%03d" %{ver_major} %{ver_minor} %{ver_patch})
|
||||
|
||||
# Pull from git
|
||||
%global git_tag release_003_004_002
|
||||
%global git_tag release_%{ver_}
|
||||
|
||||
# git clone git://code.ettus.com/ettus/uhd.git
|
||||
# cd uhd
|
||||
@ -8,20 +20,26 @@
|
||||
|
||||
Name: uhd
|
||||
URL: http://code.ettus.com/redmine/ettus/projects/uhd/wiki
|
||||
Version: 3.4.2
|
||||
Release: 1%{?dist}
|
||||
Version: %{ver_major}.%{ver_minor}.%{ver_patch}
|
||||
Release: 2%{?dist}
|
||||
License: GPLv3+
|
||||
BuildRequires: cmake
|
||||
BuildRequires: boost-devel libusb1-devel python-cheetah
|
||||
BuildRequires: docutils doxygen pkgconfig
|
||||
%if ! %{with binary_firmware}
|
||||
BuildRequires: sdcc sed
|
||||
%endif
|
||||
Requires(pre): shadow-utils
|
||||
Requires: tkinter
|
||||
Group: Applications/Engineering
|
||||
Summary: Universal Hardware Driver for Ettus Research products
|
||||
Source0: %{name}-%{version}.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.4.2-no-neon.patch
|
||||
# Fix firmware build with sdcc-3
|
||||
Patch1: uhd-3.4.2-sdcc-3-fix.patch
|
||||
|
||||
%description
|
||||
The UHD is the universal hardware driver for Ettus Research products.
|
||||
@ -31,12 +49,32 @@ future Ettus Research products. It can be used standalone without GNU Radio.
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .no-neon
|
||||
%patch1 -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
|
||||
rm -f images/images/{LICENSE.txt,*.tag}
|
||||
%endif
|
||||
|
||||
%build
|
||||
mkdir host/build
|
||||
cd host/build
|
||||
# firmware
|
||||
%if ! %{with binary_firmware}
|
||||
# rebuilt from sources
|
||||
export PATH=$PATH:%{_libexecdir}/sdcc
|
||||
pushd images
|
||||
sed -i '/-name "\*\.twr" | xargs grep constraint | grep met/ s/^/#/' Makefile
|
||||
make %{?_smp_mflags} images
|
||||
popd
|
||||
%endif
|
||||
|
||||
mkdir -p host/build
|
||||
pushd host/build
|
||||
%cmake ../
|
||||
make %{?_smp_mflags}
|
||||
popd
|
||||
|
||||
%check
|
||||
cd host/build
|
||||
@ -65,10 +103,23 @@ mv %{buildroot}%{_docdir}/%{name}/{AUTHORS.txt,LICENSE.txt,README.txt} _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
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%package firmware
|
||||
Summary: Firmware files for UHD
|
||||
Group: Applications/Engineering
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
BuildArch: noarch
|
||||
|
||||
%description firmware
|
||||
Firmware files for the Universal Hardware driver (UHD).
|
||||
|
||||
%package devel
|
||||
Summary: Development files for UHD
|
||||
Group: Applications/Engineering
|
||||
@ -96,6 +147,10 @@ getent group usrp >/dev/null || groupadd -r usrp >/dev/null
|
||||
%{_libdir}/lib*.so.*
|
||||
%{_libexecdir}/uhd
|
||||
|
||||
%files firmware
|
||||
%dir %{_datadir}/uhd/images
|
||||
%{_datadir}/uhd/images/*
|
||||
|
||||
%files devel
|
||||
%{_includedir}/*
|
||||
%{_libdir}/lib*.so
|
||||
@ -105,6 +160,10 @@ getent group usrp >/dev/null || groupadd -r usrp >/dev/null
|
||||
%doc %{_docdir}/%{name}/*
|
||||
|
||||
%changelog
|
||||
* Wed Jun 6 2012 Jaroslav Škarvada <jskarvad@redhat.com> - 3.4.2-2
|
||||
- Added firmware subpackage
|
||||
Resolves: rhbz#769684
|
||||
|
||||
* Wed May 23 2012 Jaroslav Škarvada <jskarvad@redhat.com> - 3.4.2-1
|
||||
- New version
|
||||
- Removed usrp1-r45-dbsrx-i2c-fix patch (upstreamed)
|
||||
|
Loading…
Reference in New Issue
Block a user