1 |
Name: uhd |
2 |
URL: http://code.ettus.com/redmine/ettus/projects/uhd/wiki |
3 |
Version: 3.6.2 |
4 |
Release: %mkrel 1 |
5 |
Group: Communications/Radio |
6 |
Summary: Universal Hardware Driver for Ettus Research products |
7 |
License: GPLv3+ |
8 |
Source0: %{name}-%{version}.tar.gz |
9 |
# Create tarball from git with: |
10 |
# $ ./make-tarball uhd https://github.com/EttusResearch/uhd.git |
11 |
# See note in make-tarball script |
12 |
Source1: make-tarball |
13 |
|
14 |
BuildRequires: cmake |
15 |
BuildRequires: boost-devel >= 1.55 |
16 |
BuildRequires: pkgconfig(libusb-1.0) |
17 |
BuildRequires: pkgconfig(orc-0.4) |
18 |
BuildRequires: python-cheetah |
19 |
BuildRequires: python-docutils |
20 |
BuildRequires: doxygen |
21 |
BuildRequires: pkgconfig |
22 |
|
23 |
%description |
24 |
The UHD is the universal hardware driver for Ettus Research products. |
25 |
The goal of the UHD is to provide a host driver and API for current and |
26 |
future Ettus Research products. It can be used standalone without GNU Radio. |
27 |
|
28 |
%prep |
29 |
%setup -q |
30 |
|
31 |
%build |
32 |
pushd host |
33 |
%cmake |
34 |
%make |
35 |
popd |
36 |
|
37 |
%install |
38 |
%makeinstall_std -C host/build |
39 |
|
40 |
mv -t %{buildroot}%{_prefix}/share/ %{buildroot}%{_prefix}/lib64/uhd |
41 |
|
42 |
# Allow access only to users in usrp group |
43 |
sed -i 's/MODE:="0666"/MODE:="0660"/' %{buildroot}%{_datadir}/uhd/utils/uhd-usrp.rules |
44 |
mkdir -p %{buildroot}%{_prefix}/lib/udev/rules.d |
45 |
mv %{buildroot}%{_datadir}/uhd/utils/uhd-usrp.rules %{buildroot}%{_prefix}/lib/udev/rules.d/10-usrp-uhd.rules |
46 |
|
47 |
# Remove binaries for tests, examples |
48 |
rm -rf %{buildroot}%{_datadir}/uhd/{tests,examples} |
49 |
|
50 |
# Move the utils stuff to libexec dir |
51 |
mkdir -p %{buildroot}%{_libexecdir}/uhd |
52 |
mv %{buildroot}%{_datadir}/uhd/utils/* %{buildroot}%{_libexecdir}/uhd |
53 |
|
54 |
# Package base docs to base package |
55 |
mkdir _tmpdoc |
56 |
mv %{buildroot}%{_docdir}/%{name}/{LICENSE,README.md} _tmpdoc |
57 |
|
58 |
%package devel |
59 |
Summary: Development files for UHD |
60 |
Group: Communications/Radio |
61 |
Requires: %{name} = %{version}-%{release} |
62 |
|
63 |
%description devel |
64 |
Development files for the Universal Hardware Driver (UHD). |
65 |
|
66 |
%package doc |
67 |
Summary: Documentation files for UHD |
68 |
Group: Communications/Radio |
69 |
BuildArch: noarch |
70 |
|
71 |
%description doc |
72 |
Documentation for the Universal Hardware Driver (UHD). |
73 |
|
74 |
%pre -n uhd |
75 |
getent group usrp >/dev/null || groupadd -r usrp |
76 |
|
77 |
%files |
78 |
%doc _tmpdoc/* |
79 |
%{_bindir}/uhd_find_devices |
80 |
%{_bindir}/uhd_usrp_probe |
81 |
%{_bindir}/uhd_cal_rx_iq_balance |
82 |
%{_bindir}/uhd_cal_tx_dc_offset |
83 |
%{_bindir}/uhd_cal_tx_iq_balance |
84 |
%{_bindir}/uhd_images_downloader |
85 |
%{_bindir}/usrp2_card_burner |
86 |
%{_bindir}/usrp_n2xx_simple_net_burner |
87 |
%{_prefix}/lib/udev/rules.d/10-usrp-uhd.rules |
88 |
%{_libdir}/lib*.so.* |
89 |
%{_libexecdir}/uhd |
90 |
|
91 |
%files devel |
92 |
%{_includedir}/* |
93 |
%{_libdir}/lib*.so |
94 |
%{_libdir}/pkgconfig/*.pc |
95 |
|
96 |
%files doc |
97 |
%doc %{_docdir}/%{name}/* |
98 |
%{_mandir}/man1/* |