File osmo-trx.spec of Package osmo-trx (Revision 10)

Currently displaying revision 10 , Show latest

269
 
1
#
2
# spec file for package osmo-trx
3
#
4
# Copyright (c) 2017, Martin Hauke <mardnh@gmx.de>
5
#
6
# All modifications and additions to the file contributed by third parties
7
# remain the property of their copyright owners, unless otherwise agreed
8
# upon. The license for this file, and modifications and additions to the
9
# file, is the same license as for the pristine package itself (unless the
10
# license for the pristine package is not an Open Source License, in which
11
# case the license is the MIT License). An "Open Source License" is a
12
# license that conforms to the Open Source Definition (Version 1.9)
13
# published by the Open Source Initiative.
14
15
Name:           osmo-trx
16
Requires: osmocom-nightly = 1.0.0.202207050002
17
Version:  1.4.1.202207050002
18
Release:        0
19
Summary:        SDR transceiver that implements Layer 1 of a GSM BTS
20
License:        AGPL-3.0-or-later
21
Group:          Productivity/Telephony/Servers
22
URL:            https://osmocom.org/projects/osmotrx
23
Source:  osmo-trx_1.4.1.202207050002.tar.xz
24
BuildRequires:  autoconf
25
BuildRequires:  automake
26
BuildRequires:  fdupes
27
BuildRequires:  gcc-c++
28
BuildRequires:  libtool
29
BuildRequires:  pkgconfig >= 0.20
30
%if 0%{?suse_version}
31
BuildRequires:  systemd-rpm-macros
32
%endif
33
%if ! 0%{?centos_ver}
34
BuildRequires:  pkgconfig(LimeSuite)
35
BuildRequires:  pkgconfig(usrp) >= 3.3
36
%endif
37
BuildRequires:  pkgconfig(fftw3f)
38
BuildRequires:  pkgconfig(libosmocoding) >= 1.6.0
39
BuildRequires:  pkgconfig(libosmocore) >= 1.6.0
40
BuildRequires:  pkgconfig(libosmoctrl) >= 1.6.0
41
BuildRequires:  pkgconfig(libosmovty) >= 1.6.0
42
BuildRequires:  pkgconfig(libusb-1.0)
43
BuildRequires:  pkgconfig(uhd)
44
%{?systemd_requires}
45
%if 0%{?suse_version} > 1325
46
BuildRequires:  libboost_program_options-devel
47
BuildRequires:  libboost_system-devel
48
BuildRequires:  libboost_test-devel
49
BuildRequires:  libboost_thread-devel
50
%else
51
BuildRequires:  boost-devel
52
%endif
53
54
%description
55
OsmoTRX is a software-defined radio transceiver that implements the Layer 1
56
physical layer of a BTS comprising the following 3GPP specifications:
57
58
TS 05.01 "Physical layer on the radio path"
59
TS 05.02 "Multiplexing and Multiple Access on the Radio Path"
60
TS 05.04 "Modulation"
61
TS 05.10 "Radio subsystem synchronization"
62
63
In this context, BTS is "Base transceiver station". It's the stations that
64
connect mobile phones to the mobile network.
65
66
3GPP is the "3rd Generation Partnership Project" which is the collaboration
67
between different telecommunication associations for developing new
68
generations of mobile phone networks. (post-2G/GSM)
69
70
%package uhd
71
Requires: osmocom-nightly = 1.0.0.202207050002
72
Summary:        SDR transceiver that implements Layer 1 of a GSM BTS (UHD)
73
Group:          Productivity/Telephony/Servers
74
Requires:       uhd-firmware
75
76
%description uhd
77
OsmoTRX is a software-defined radio transceiver that implements the Layer 1
78
physical layer of a BTS comprising the following 3GPP specifications:
79
80
TS 05.01 "Physical layer on the radio path"
81
TS 05.02 "Multiplexing and Multiple Access on the Radio Path"
82
TS 05.04 "Modulation"
83
TS 05.10 "Radio subsystem synchronization"
84
85
In this context, BTS is "Base transceiver station". It's the stations that
86
connect mobile phones to the mobile network.
87
88
3GPP is the "3rd Generation Partnership Project" which is the collaboration
89
between different telecommunication associations for developing new
90
generations of mobile phone networks. (post-2G/GSM)
91
92
%if ! 0%{?centos_ver}
93
%package usrp1
94
Requires: osmocom-nightly = 1.0.0.202207050002
95
Summary:        SDR transceiver that implements Layer 1 of a GSM BTS (USRP1)
96
Group:          Productivity/Telephony/Servers
97
98
%description usrp1
99
OsmoTRX is a software-defined radio transceiver that implements the Layer 1
100
physical layer of a BTS comprising the following 3GPP specifications:
101
102
TS 05.01 "Physical layer on the radio path"
103
TS 05.02 "Multiplexing and Multiple Access on the Radio Path"
104
TS 05.04 "Modulation"
105
TS 05.10 "Radio subsystem synchronization"
106
107
In this context, BTS is "Base transceiver station". It's the stations that
108
connect mobile phones to the mobile network.
109
110
3GPP is the "3rd Generation Partnership Project" which is the collaboration
111
between different telecommunication associations for developing new
112
generations of mobile phone networks. (post-2G/GSM)
113
114
%package lms
115
Requires: osmocom-nightly = 1.0.0.202207050002
116
Summary:        SDR transceiver that implements Layer 1 of a GSM BTS (LimeSuite)
117
Group:          Productivity/Telephony/Servers
118
119
%description lms
120
OsmoTRX is a software-defined radio transceiver that implements the Layer 1
121
physical layer of a BTS comprising the following 3GPP specifications:
122
123
TS 05.01 "Physical layer on the radio path"
124
TS 05.02 "Multiplexing and Multiple Access on the Radio Path"
125
TS 05.04 "Modulation"
126
TS 05.10 "Radio subsystem synchronization"
127
128
In this context, BTS is "Base transceiver station". It's the stations that
129
connect mobile phones to the mobile network.
130
131
3GPP is the "3rd Generation Partnership Project" which is the collaboration
132
between different telecommunication associations for developing new
133
generations of mobile phone networks. (post-2G/GSM)
134
%endif
135
136
%package ipc
137
Requires: osmocom-nightly = 1.0.0.202207050002
138
Summary:        SDR transceiver that implements Layer 1 of a GSM BTS (IPC)
139
Group:          Productivity/Telephony/Servers
140
141
%description ipc
142
OsmoTRX is a software-defined radio transceiver that implements the Layer 1
143
physical layer of a BTS comprising the following 3GPP specifications:
144
145
TS 05.01 "Physical layer on the radio path"
146
TS 05.02 "Multiplexing and Multiple Access on the Radio Path"
147
TS 05.04 "Modulation"
148
TS 05.10 "Radio subsystem synchronization"
149
150
In this context, BTS is "Base transceiver station". It's the stations that
151
connect mobile phones to the mobile network.
152
153
3GPP is the "3rd Generation Partnership Project" which is the collaboration
154
between different telecommunication associations for developing new
155
generations of mobile phone networks. (post-2G/GSM)
156
157
%package ipc-test
158
Requires: osmocom-nightly = 1.0.0.202207050002
159
Summary:        SDR transceiver that implements Layer 1 of a GSM BTS (IPC) driver test utility
160
Group:          Productivity/Telephony/Servers
161
162
%description ipc-test
163
OsmoTRX is a software-defined radio transceiver that implements the Layer 1
164
physical layer of a BTS comprising the following 3GPP specifications:
165
166
This package include the test tools for osmo-trx-ipc
167
168
%prep
169
%setup -q
170
171
%build
172
# HACK: don't let rpmlint abort the build when it finds that a library depends
173
# on a package with a specific version. The path used here is listed in:
174
# https://build.opensuse.org/package/view_file/devel:openSUSE:Factory:rpmlint/rpmlint-mini/rpmlint-mini.config?expand=1
175
# Instead of writing to the SOURCES dir, we could upload osmocom-rpmlintrc as
176
# additional source for each package. But that's way more effort, not worth it.
177
echo "setBadness('shlib-fixed-dependency', 0)" \
178
    > "%{_sourcedir}/osmocom-rpmlintrc"
179
180
echo "%{version}" >.tarball-version
181
autoreconf -fi
182
183
%if 0%{?centos_ver}
184
%configure \
185
  --docdir=%{_docdir}/%{name} \
186
  --with-systemdsystemunitdir=%{_unitdir} \
187
  --without-lms \
188
  --with-uhd \
189
  --without-usrp1 \
190
  --with-ipc
191
%else
192
%configure \
193
  --docdir=%{_docdir}/%{name} \
194
  --with-systemdsystemunitdir=%{_unitdir} \
195
  --with-lms \
196
  --with-uhd \
197
  --with-usrp1 \
198
  --with-ipc
199
%endif
200
201
make %{?_smp_mflags} V=1
202
203
%check
204
make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
205
206
%install
207
%make_install
208
%fdupes -s %{buildroot}/%{_datadir}
209
210
%if 0%{?suse_version}
211
%pre    lms %service_add_pre    osmo-trx-lms.service
212
%post   lms %service_add_post   osmo-trx-lms.service
213
%preun  lms %service_del_preun  osmo-trx-lms.service
214
%postun lms %service_del_postun osmo-trx-lms.service
215
%pre    uhd %service_add_pre    osmo-trx-uhd.service
216
%post   uhd %service_add_post   osmo-trx-uhd.service
217
%preun  uhd %service_del_preun  osmo-trx-uhd.service
218
%postun uhd %service_del_postun osmo-trx-uhd.service
219
%pre    usrp1 %service_add_pre    osmo-trx-usrp1.service
220
%post   usrp1 %service_add_post   osmo-trx-usrp1.service
221
%preun  usrp1 %service_del_preun  osmo-trx-usrp1.service
222
%postun usrp1 %service_del_postun osmo-trx-usrp1.service
223
%pre    ipc %service_add_pre    osmo-trx-ipc.service
224
%post   ipc %service_add_post   osmo-trx-ipc.service
225
%preun  ipc %service_del_preun  osmo-trx-ipc.service
226
%postun ipc %service_del_postun osmo-trx-ipc.service
227
%endif
228
229
%files
230
%license COPYING
231
%doc README.md
232
%doc %{_docdir}/%{name}/examples
233
234
%if ! 0%{?centos_ver}
235
%files lms
236
%{_bindir}/osmo-trx-lms
237
%dir %{_sysconfdir}/osmocom
238
%config(noreplace) %{_sysconfdir}/osmocom/osmo-trx-lms.cfg
239
%{_unitdir}/osmo-trx-lms.service
240
%endif
241
242
%files uhd
243
%{_bindir}/osmo-trx-uhd
244
%dir %{_sysconfdir}/osmocom
245
%config(noreplace) %{_sysconfdir}/osmocom/osmo-trx-uhd.cfg
246
%{_unitdir}/osmo-trx-uhd.service
247
248
%if ! 0%{?centos_ver}
249
%files usrp1
250
%{_bindir}/osmo-trx-usrp1
251
%dir %{_datadir}/usrp
252
%dir %{_datadir}/usrp/rev2
253
%dir %{_datadir}/usrp/rev4
254
%{_datadir}/usrp/rev2/std_inband.rbf
255
%{_datadir}/usrp/rev4/std_inband.rbf
256
%{_unitdir}/osmo-trx-usrp1.service
257
%endif
258
259
%files ipc
260
%{_bindir}/osmo-trx-ipc
261
%dir %{_sysconfdir}/osmocom
262
%config(noreplace) %{_sysconfdir}/osmocom/osmo-trx-ipc.cfg
263
%{_unitdir}/osmo-trx-ipc.service
264
265
%files ipc-test
266
%{_bindir}/ipc-driver-test
267
268
%changelog
269