/[packages]/cauldron/uhd/current/SPECS/uhd.spec
ViewVC logotype

Contents of /cauldron/uhd/current/SPECS/uhd.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1937144 - (show annotations) (download)
Mon Jan 30 23:22:16 2023 UTC (7 months, 3 weeks ago) by barjac
File size: 4036 byte(s)
new version 4.4.0.0
1 %define major 4
2 %define libname %mklibname %{name} %{major}
3 %define devname %mklibname %{name} -d
4
5 # comment out if not prerel
6 #define prel rc1
7
8 # Release
9 %define rel 1
10
11 Name: uhd
12 Summary: Universal Hardware Driver for Ettus Research products
13 Version: 4.4.0.0
14 Release: %mkrel %{?prel:0.%prel.}%{rel}
15 Group: Communications/Radio
16 License: GPLv3+
17 Url: http://code.ettus.com/redmine/ettus/projects/uhd/wiki
18 Source0: https://github.com/EttusResearch/%{name}/archive/v%{version}%{?prel:-%prel}/%{name}-%{version}%{?prel:-%prel}.tar.gz
19 # Bug tracker https://github.com/EttusResearch/uhd/issues
20
21 BuildRequires: cmake
22 BuildRequires: boost-devel
23 BuildRequires: git
24 BuildRequires: pkgconfig(ncurses)
25 BuildRequires: pkgconfig(libgps)
26 BuildRequires: pkgconfig(libusb-1.0)
27 BuildRequires: pkgconfig(python3)
28 BuildRequires: python3-docutils
29 BuildRequires: python3-mako
30 BuildRequires: python3-numpy-devel
31 BuildRequires: python3-requests
32 BuildRequires: python3-ruamel-yaml
33 BuildRequires: python3-setuptools
34 BuildRequires: doxygen
35 BuildRequires: pkgconfig
36
37 %description
38 The UHD is the universal hardware driver for Ettus Research products.
39 The goal of the UHD is to provide a host driver and API for current and
40 future Ettus Research products. It can be used standalone without GNU Radio.
41
42 %prep
43 %autosetup -p1 -n %{name}-%{version}%{?prel:-%prel}
44
45 # to fix python bytecompile
46 2to3 -w -n host/utils/ ||:
47
48 # fix shebangs
49 sed -i -e '1s,#!/usr/bin.*python[2,3]\?,#!%__python3,' $(grep -rl '#!/usr/bin.*python' host/utils)
50
51 # Not only Apple
52 sed -i -e '/if(APPLE)/d' -e '/endif(APPLE)/d' host/CMakeLists.txt
53
54 %build
55 %global _vpath_srcdir host
56 %cmake \
57 -DCMAKE_SKIP_RPATH=ON \
58 -DENABLE_UTILS=ON \
59 -DENABLE_E100=ON \
60 -DENABLE_E300=ON \
61 -DENABLE_PYTHON_API=ON \
62 -DENABLE_PYTHON3=ON \
63 -DENABLE_TESTS=OFF \
64 -DENABLE_EXAMPLES=OFF \
65 %ifarch %arm
66 -DNEON_SIMD_ENABLE=OFF
67 %endif
68 %cmake_build
69
70 %install
71 %cmake_install
72
73 # Allow access only to users in usrp group
74 mkdir -p %{buildroot}%{_udevrulesdir}
75 mv %{buildroot}%{_libdir}/uhd/utils/uhd-usrp.rules %{buildroot}%{_udevrulesdir}/10-usrp-uhd.rules
76 sed -i 's/MODE:="0666"/MODE:="0660"/' %{buildroot}%{_udevrulesdir}/10-usrp-uhd.rules
77
78 # Remove binaries for tests, examples
79 rm -rf %{buildroot}%{_libdir}/uhd/{tests,examples}
80
81 # Move the utils stuff to libexec dir
82 mkdir -p %{buildroot}%{_libexecdir}/uhd
83 mv %{buildroot}%{_libdir}/uhd/utils %{buildroot}%{_libexecdir}/uhd/utils
84 mv %{buildroot}%{_datadir}/uhd/rfnoc %{buildroot}%{_libexecdir}/uhd/
85
86 # Package base docs to base package
87 mkdir _tmpdoc
88 mv %{buildroot}%{_docdir}/%{name}/{LICENSE,README.md} _tmpdoc
89
90 # Make version sane in uhd.pc
91 sed -i '/Version/c Version: %{version}' %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
92
93 %package -n %{libname}
94 Summary: Library files
95 Group: Communications/Radio
96 Requires: %{name} = %{version}-%{release}
97
98 %description -n %{libname}
99 Library files for the Universal Hardware Driver (UHD).
100
101 %package -n %{devname}
102 Summary: Development files for UHD
103 Group: Communications/Radio
104 Requires: %{libname} = %{version}-%{release}
105 Provides: %{name}-devel = %{version}-%{release}
106
107 %description -n %{devname}
108 Development files for the Universal Hardware Driver (UHD).
109
110 %package doc
111 Summary: Documentation files for UHD
112 Group: Communications/Radio
113 BuildArch: noarch
114
115 %description doc
116 Documentation for the Universal Hardware Driver (UHD).
117
118 %pre -n uhd
119 getent group usrp >/dev/null || groupadd -r usrp
120
121 %files
122 %doc _tmpdoc/*
123 %{_bindir}/*
124 %{_datadir}/%{name}/cal/*.fbs
125 %{_udevrulesdir}/10-usrp-uhd.rules
126 %{_libexecdir}/%{name}
127 %{python3_sitearch}/%{name}/
128 %{python3_sitearch}/usrp_mpm/
129
130 %files -n %{libname}
131 %{_libdir}/lib%{name}.so.%{major}{,.*}
132
133 %files -n %{devname}
134 %{_includedir}/*
135 %{_libdir}/lib%{name}.so
136 %{_libdir}/pkgconfig/*.pc
137 %{_libdir}/cmake/%{name}/
138
139 %files doc
140 %doc %{_docdir}/%{name}/
141 %{_mandir}/man1/*

  ViewVC Help
Powered by ViewVC 1.1.28