]> git.pld-linux.org Git - packages/uhd.git/blame - uhd.spec
disable tests (compilation failure)
[packages/uhd.git] / uhd.spec
CommitLineData
0cfe325a
JB
1#
2# Conditional build
3%bcond_without mpm # Module Peripheral Manager (run on embedded devices)
4077bdba 4%bcond_with tests # build tests
0cfe325a 5
938948b4 6Summary: Universal Hardware Driver for Ettus Research products
245f21b5 7Summary(pl.UTF-8): Uniwersalny sterownik sprzętowy do produktów Ettus Research
938948b4 8Name: uhd
de08c293
JR
9Version: 4.1.0.1
10Release: 1
938948b4 11License: GPL v3+
245f21b5 12Group: Applications/System
0cfe325a
JB
13#Source0Download: https://github.com/EttusResearch/uhd/releases
14Source0: https://github.com/EttusResearch/uhd/archive/v%{version}/%{name}-%{version}.tar.gz
de08c293 15# Source0-md5: a05185b631e7f0491d76d75a2568219e
245f21b5
JB
16Patch0: %{name}-boost.patch
17Patch1: %{name}-libdir.patch
0cfe325a
JB
18Patch2: %{name}-link.patch
19Patch3: %{name}-mpm-build.patch
245f21b5 20URL: https://www.ettus.com/sdr-software/uhd-usrp-hardware-driver/
0cfe325a
JB
21BuildRequires: boost-devel >= 1.58
22BuildRequires: cmake >= 3.5.1
e4482680 23BuildRequires: doxygen
245f21b5 24BuildRequires: gpsd-devel >= 3.11
0cfe325a 25BuildRequires: libstdc++-devel >= 6:5
245f21b5 26BuildRequires: libusb-devel >= 1.0
e4482680 27BuildRequires: ncurses-devel
e4482680 28BuildRequires: pkgconfig
0cfe325a
JB
29BuildRequires: python3 >= 1:3.5
30BuildRequires: python3-Mako >= 0.4.2
31BuildRequires: python3-devel >= 1:3.5
32BuildRequires: python3-numpy >= 1.7
33BuildRequires: python3-requests >= 2.0
e4482680 34BuildRequires: rpm-pythonprov
4077bdba 35BuildRequires: rpmbuild(macros) >= 1.742
0cfe325a 36%if %{with mpm}
e4482680 37BuildRequires: udev-devel
0cfe325a 38%endif
245f21b5 39Requires: %{name}-libs = %{version}-%{release}
938948b4 40BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
938948b4 41
938948b4
BS
42%description
43The UHD is the universal hardware driver for Ettus Research products.
44The goal of the UHD is to provide a host driver and API for current
45and future Ettus Research products. It can be used standalone without
46GNU Radio.
47
245f21b5
JB
48%description -l pl.UTF-8
49UHD to uniwersalny sterownik sprzętowy do produktów Ettus Research.
50Celem UHD jest zapewnienie sterownika gospodarza oraz API do obecnych
51i przyszłych produków Ettus Research. Może być używany samodzielnie
52bez GNU Radio.
53
54%package libs
55Summary: USRP Hardware Driver library
56Summary(pl.UTF-8): Biblioteka USRP Hardware Driver
57Group: Libraries
58
59%description libs
60USRP Hardware Driver library.
61
62%description libs -l pl.UTF-8
63Biblioteka USRP Hardware Driver.
64
938948b4 65%package devel
245f21b5
JB
66Summary: Development files for USRP Hardware Driver library
67Summary(pl.UTF-8): Pliki programistyczne biblioteki USRP Hardware Driver
68Group: Development/Libraries
69Requires: %{name}-libs = %{version}-%{release}
70Requires: boost-devel >= 1.53
938948b4
BS
71
72%description devel
245f21b5
JB
73Header files for USRP Hardware Driver for Ettus Research products.
74
75%description devel -l pl.UTF-8
76Pliki nagłówkowe biblioteki USRP Hardware Driver (sterownika dla
77sprzętu USRP) do produktów Ettus Research.
78
79%package examples
80Summary: Examples for UHD
81Summary(pl.UTF-8): Przykłady do UHD
82Group: Applications/System
83Requires: %{name}-libs = %{version}-%{release}
84
85%description examples
86Example programs for USRP Hardware Driver for Ettus Research products.
87
88%description examples -l pl.UTF-8
89Programy przykładowe do biblioteki USRP Hardware Driver (sterownika
90dla sprzętu USRP) do produktów Ettus Research.
938948b4 91
24404f1d 92%package doc
245f21b5
JB
93Summary: Documentation for UHD
94Summary(pl.UTF-8): Dokumentacja do UHD
938948b4 95Group: Documentation
938948b4 96BuildArch: noarch
938948b4
BS
97
98%description doc
245f21b5
JB
99Documentation for USRP Hardware Driver for Ettus Research products.
100
101%description doc -l pl.UTF-8
102Dokumentacja do biblioteki USRP Hardware Driver (sterownika dla
103sprzętu USRP) do produktów Ettus Research.
938948b4 104
0cfe325a
JB
105%package -n python3-uhd
106Summary: Python interface for USRP Hardware Driver library
107Summary(pl.UTF-8): Interfejs Pythona do biblioteki USRP Hardware Driver
108Group: Libraries/Python
109
110%description -n python3-uhd
111Python interface for USRP Hardware Driver library.
112
113%description -n python3-uhd -l pl.UTF-8
114Interfejs Pythona do biblioteki USRP Hardware Driver.
115
116%package mpm
117Summary: USRP Module Peripheral Manager
118Summary(pl.UTF-8): USRP Module Peripheral Manager - zarządca urządzeń peryferyjnych
119Group: Applications/System
120Requires: %{name}-mpm-libs = %{version}-%{release}
121
122%description mpm
123USRP Module Peripheral Manager.
124
125%description mpm -l pl.UTF-8
126USRP Module Peripheral Manager - zarządca urządzeń peryferyjnych.
127
128%package mpm-libs
129Summary: USRP Module Peripheral Manager library
130Summary(pl.UTF-8): Biblioteka USRP Module Peripheral Manager
131Group: Libraries
132
133%description mpm-libs
134USRP Module Peripheral Manager library.
135
136%description mpm-libs -l pl.UTF-8
137Biblioteka USRP Module Peripheral Manager.
138
139%package mpm-devel
140Summary: USRP Module Peripheral Manager library
141Summary(pl.UTF-8): Biblioteka USRP Module Peripheral Manager
142Group: Development/Libraries
143Requires: %{name}-mpm-libs = %{version}-%{release}
144
145%description mpm-devel
146USRP Module Peripheral Manager library.
147
148%description mpm-devel -l pl.UTF-8
149Biblioteka USRP Module Peripheral Manager.
150
151%package -n python3-usrp_mpm
152Summary: Python USRP Module Peripheral Manager library
153Summary(pl.UTF-8): Biblioteka USRP Module Peripheral Manager dla Pythona
154Group: Libraries/Python
155Requires: %{name}-mpm-libs = %{version}-%{release}
156
157%description -n python3-usrp_mpm
158Python USRP Module Peripheral Manager library.
159
160%description -n python3-usrp_mpm -l pl.UTF-8
161Biblioteka USRP Module Peripheral Manager dla Pythona.
162
938948b4 163%prep
0cfe325a 164%setup -q
de08c293 165#%patch0 -p1
245f21b5 166%patch1 -p1
de08c293 167#%patch2 -p1
0cfe325a 168%patch3 -p1
245f21b5 169
0cfe325a
JB
170%{__sed} -i -e '1s,/usr/bin/env python$,%{__python},' host/examples/python/*.py
171%{__sed} -i -e '1s,/usr/bin/env python$,%{__python},' host/utils/{converter_benchmark.py,usrp2_{card_burner,card_burner_gui,recovery}.py}
172%{__sed} -i -e '1s,/usr/bin/env python$,%{__python},' host/utils/latency/graph.py
173%{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' mpm/python/{n3xx_bist,usrp_hwd.py,usrp_update_fs}
174%{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' mpm/tools/mpm_{debug,shell}.py
938948b4
BS
175
176%build
0cfe325a
JB
177install -d build-{host,mpm}
178cd build-host
179%cmake ../host \
eb732e51 180 -DUHD_VERSION="%{version}" \
4077bdba 181 %{cmake_on_off tests ENABLE_TESTS} \
245f21b5
JB
182 -DENABLE_USB=ON
183
938948b4
BS
184%{__make}
185
0cfe325a
JB
186%if %{with mpm}
187cd ../build-mpm
188%cmake ../mpm
189
190# -DMPM_DEVICE= n3xx (Mykonos+Magnesium), e320, e31x
191%endif
192
193%{__make}
194
938948b4
BS
195%install
196rm -rf $RPM_BUILD_ROOT
245f21b5 197
0cfe325a 198%{__make} -C build-host install \
938948b4
BS
199 DESTDIR=$RPM_BUILD_ROOT
200
0cfe325a
JB
201# outdated (binaries removed)
202%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{octoclock_firmware_burner,usrp_n2xx_simple_net_burner,usrp_x3xx_fpga_burner}.1*
4077bdba 203%if %{with tests}
0cfe325a
JB
204# not packaging tests
205%{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/tests \
206 $RPM_BUILD_ROOT%{_libdir}/%{name}/utils/latency/run_tests.py
4077bdba 207%endif
245f21b5
JB
208# packaged as %doc
209%{__rm} $RPM_BUILD_ROOT%{_docdir}/uhd/{LICENSE,README.md}
24404f1d 210
0cfe325a
JB
211%if %{with mpm}
212%{__make} -C build-mpm install \
213 DESTDIR=$RPM_BUILD_ROOT
214
215%{__rm} $RPM_BUILD_ROOT%{_bindir}/aurora_bist_test.py
216%endif
217
218%py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
219%py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
938948b4
BS
220
221%clean
222rm -rf $RPM_BUILD_ROOT
223
245f21b5
JB
224%post libs -p /sbin/ldconfig
225%postun libs -p /sbin/ldconfig
938948b4 226
0cfe325a
JB
227%post mpm-libs -p /sbin/ldconfig
228%postun mpm-libs -p /sbin/ldconfig
229
938948b4
BS
230%files
231%defattr(644,root,root,755)
0cfe325a 232%doc host/{LICENSE,README.md}
938948b4
BS
233%attr(755,root,root) %{_bindir}/uhd_cal_rx_iq_balance
234%attr(755,root,root) %{_bindir}/uhd_cal_tx_dc_offset
235%attr(755,root,root) %{_bindir}/uhd_cal_tx_iq_balance
245f21b5 236%attr(755,root,root) %{_bindir}/uhd_config_info
938948b4 237%attr(755,root,root) %{_bindir}/uhd_find_devices
245f21b5 238%attr(755,root,root) %{_bindir}/uhd_image_loader
938948b4
BS
239%attr(755,root,root) %{_bindir}/uhd_images_downloader
240%attr(755,root,root) %{_bindir}/uhd_usrp_probe
24404f1d 241%attr(755,root,root) %{_bindir}/usrp2_card_burner
24404f1d
ER
242%{_mandir}/man1/uhd_cal_rx_iq_balance.1*
243%{_mandir}/man1/uhd_cal_tx_dc_offset.1*
244%{_mandir}/man1/uhd_cal_tx_iq_balance.1*
245f21b5 245%{_mandir}/man1/uhd_config_info.1*
24404f1d 246%{_mandir}/man1/uhd_find_devices.1*
245f21b5 247%{_mandir}/man1/uhd_image_loader.1*
24404f1d
ER
248%{_mandir}/man1/uhd_images_downloader.1*
249%{_mandir}/man1/uhd_usrp_probe.1*
245f21b5 250%{_mandir}/man1/usrp2_card_burner.1*
58254af1 251%dir %{_libdir}/%{name}/utils
245f21b5
JB
252%attr(755,root,root) %{_libdir}/%{name}/utils/b2xx_fx3_utils
253%attr(755,root,root) %{_libdir}/%{name}/utils/converter_benchmark
254%attr(755,root,root) %{_libdir}/%{name}/utils/converter_benchmark.py
255%attr(755,root,root) %{_libdir}/%{name}/utils/fx2_init_eeprom
256%attr(755,root,root) %{_libdir}/%{name}/utils/octoclock_burn_eeprom
257%attr(755,root,root) %{_libdir}/%{name}/utils/query_gpsdo_sensors
258%attr(755,root,root) %{_libdir}/%{name}/utils/uhd_images_downloader.py
259%attr(755,root,root) %{_libdir}/%{name}/utils/usrp2_card_burner.py
245f21b5
JB
260%attr(755,root,root) %{_libdir}/%{name}/utils/usrp2_recovery.py
261%attr(755,root,root) %{_libdir}/%{name}/utils/usrp_burn_db_eeprom
262%attr(755,root,root) %{_libdir}/%{name}/utils/usrp_burn_mb_eeprom
58254af1 263%{_libdir}/%{name}/utils/uhd-usrp.rules
58254af1 264%dir %{_libdir}/%{name}/utils/latency
245f21b5
JB
265%attr(755,root,root) %{_libdir}/%{name}/utils/latency/graph.py
266%attr(755,root,root) %{_libdir}/%{name}/utils/latency/responder
267%{_datadir}/%{name}
268
269%files libs
270%defattr(644,root,root,755)
0cfe325a 271%attr(755,root,root) %{_libdir}/libuhd.so.3.15.0
245f21b5 272%dir %{_libdir}/%{name}
938948b4
BS
273
274%files devel
275%defattr(644,root,root,755)
245f21b5 276%attr(755,root,root) %{_libdir}/libuhd.so
938948b4 277%{_includedir}/uhd
245f21b5 278%{_includedir}/uhd.h
24404f1d 279%{_libdir}/cmake/uhd
245f21b5 280%{_pkgconfigdir}/uhd.pc
938948b4 281
245f21b5 282%files examples
938948b4 283%defattr(644,root,root,755)
24404f1d 284%dir %{_libdir}/%{name}/examples
58254af1 285%attr(755,root,root) %{_libdir}/%{name}/examples/*
245f21b5
JB
286
287%files doc
288%defattr(644,root,root,755)
289%{_docdir}/%{name}
0cfe325a
JB
290
291%files -n python3-uhd
292%defattr(644,root,root,755)
293%dir %{py3_sitedir}/uhd
294%attr(755,root,root) %{py3_sitedir}/uhd/libpyuhd.so
295%{py3_sitedir}/uhd/*.py
296%{py3_sitedir}/uhd/__pycache__
297
298%if %{with mpm}
299%files mpm
300%defattr(644,root,root,755)
301%attr(755,root,root) %{_bindir}/db-dump
302%attr(755,root,root) %{_bindir}/db-id
303%attr(755,root,root) %{_bindir}/db-init
304%attr(755,root,root) %{_bindir}/eeprom-blank
305%attr(755,root,root) %{_bindir}/eeprom-dump
306%attr(755,root,root) %{_bindir}/eeprom-id
307%attr(755,root,root) %{_bindir}/eeprom-init
308%attr(755,root,root) %{_bindir}/eeprom-set-flags
309%attr(755,root,root) %{_bindir}/fan-limits
310%attr(755,root,root) %{_bindir}/mpm_debug.py
311%attr(755,root,root) %{_bindir}/mpm_shell.py
312%attr(755,root,root) %{_bindir}/n3xx_bist
313%attr(755,root,root) %{_bindir}/usrp_hwd.py
314%attr(755,root,root) %{_bindir}/usrp_update_fs
315%{systemdunitdir}/usrp-hwd.service
316
317%files mpm-libs
318%defattr(644,root,root,755)
319%attr(755,root,root) %{_libdir}/libusrp-periphs.so.*.*.*
320%attr(755,root,root) %ghost %{_libdir}/libusrp-periphs.so.3
321
322%files mpm-devel
323%defattr(644,root,root,755)
324%attr(755,root,root) %{_libdir}/libusrp-periphs.so
325%{_includedir}/mpm
326
327%files -n python3-usrp_mpm
328%defattr(644,root,root,755)
329%dir %{py3_sitedir}/usrp_mpm
330%attr(755,root,root) %{py3_sitedir}/usrp_mpm/libpyusrp_periphs.so
331%{py3_sitedir}/usrp_mpm/*.py
332%{py3_sitedir}/usrp_mpm/__pycache__
333%{py3_sitedir}/usrp_mpm/chips
334%{py3_sitedir}/usrp_mpm/cores
335%{py3_sitedir}/usrp_mpm/dboard_manager
336%{py3_sitedir}/usrp_mpm/periph_manager
337%{py3_sitedir}/usrp_mpm/sys_utils
338%{py3_sitedir}/usrp_mpm/xports
339%endif
This page took 0.160127 seconds and 4 git commands to generate.