blob: b80d8e2f7bb115e8ec5b19d382d5f9b49119623b [file] [log] [blame]
Oliver Smithf669bf42020-05-14 11:54:22 +02001#
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
Oliver Smithf669bf42020-05-14 11:54:22 +020015Name: osmo-trx
Oliver Smith7bbe19e2020-05-14 11:54:54 +020016Version: @VERSION@
Oliver Smithf669bf42020-05-14 11:54:22 +020017Release: 0
18Summary: SDR transceiver that implements Layer 1 of a GSM BTS
19License: AGPL-3.0-or-later
20Group: Productivity/Telephony/Servers
Oliver Smith7bbe19e2020-05-14 11:54:54 +020021URL: https://osmocom.org/projects/osmotrx
Oliver Smithf669bf42020-05-14 11:54:22 +020022Source: %{name}-%{version}.tar.xz
Oliver Smithf669bf42020-05-14 11:54:22 +020023BuildRequires: autoconf
24BuildRequires: automake
25BuildRequires: fdupes
26BuildRequires: gcc-c++
27BuildRequires: libtool
28BuildRequires: pkgconfig >= 0.20
Oliver Smith7bbe19e2020-05-14 11:54:54 +020029%if 0%{?suse_version}
30BuildRequires: systemd-rpm-macros
31%endif
32%if ! 0%{?centos_ver}
Oliver Smithf669bf42020-05-14 11:54:22 +020033BuildRequires: pkgconfig(LimeSuite)
Oliver Smith7bbe19e2020-05-14 11:54:54 +020034BuildRequires: pkgconfig(usrp) >= 3.3
35%endif
Oliver Smithf669bf42020-05-14 11:54:22 +020036BuildRequires: pkgconfig(fftw3f)
Pau Espin Pedrol309ad4d2021-02-23 14:27:15 +010037BuildRequires: pkgconfig(libosmocoding) >= 1.5.0
38BuildRequires: pkgconfig(libosmocore) >= 1.5.0
39BuildRequires: pkgconfig(libosmoctrl) >= 1.5.0
40BuildRequires: pkgconfig(libosmovty) >= 1.5.0
Oliver Smithf669bf42020-05-14 11:54:22 +020041BuildRequires: pkgconfig(libusb-1.0)
42BuildRequires: pkgconfig(uhd)
Oliver Smithf669bf42020-05-14 11:54:22 +020043%{?systemd_requires}
44%if 0%{?suse_version} > 1325
45BuildRequires: libboost_program_options-devel
46BuildRequires: libboost_system-devel
47BuildRequires: libboost_test-devel
48BuildRequires: libboost_thread-devel
49%else
50BuildRequires: boost-devel
51%endif
52
53%description
54OsmoTRX is a software-defined radio transceiver that implements the Layer 1
55physical layer of a BTS comprising the following 3GPP specifications:
56
57TS 05.01 "Physical layer on the radio path"
58TS 05.02 "Multiplexing and Multiple Access on the Radio Path"
59TS 05.04 "Modulation"
60TS 05.10 "Radio subsystem synchronization"
61
62In this context, BTS is "Base transceiver station". It's the stations that
63connect mobile phones to the mobile network.
64
653GPP is the "3rd Generation Partnership Project" which is the collaboration
66between different telecommunication associations for developing new
67generations of mobile phone networks. (post-2G/GSM)
68
69%package uhd
70Summary: SDR transceiver that implements Layer 1 of a GSM BTS (UHD)
71Group: Productivity/Telephony/Servers
Harald Welte174fb032020-06-17 15:28:18 +020072Requires: uhd-firmware
Oliver Smithf669bf42020-05-14 11:54:22 +020073
74%description uhd
75OsmoTRX is a software-defined radio transceiver that implements the Layer 1
76physical layer of a BTS comprising the following 3GPP specifications:
77
78TS 05.01 "Physical layer on the radio path"
79TS 05.02 "Multiplexing and Multiple Access on the Radio Path"
80TS 05.04 "Modulation"
81TS 05.10 "Radio subsystem synchronization"
82
83In this context, BTS is "Base transceiver station". It's the stations that
84connect mobile phones to the mobile network.
85
863GPP is the "3rd Generation Partnership Project" which is the collaboration
87between different telecommunication associations for developing new
88generations of mobile phone networks. (post-2G/GSM)
89
Oliver Smith7bbe19e2020-05-14 11:54:54 +020090%if ! 0%{?centos_ver}
Oliver Smithf669bf42020-05-14 11:54:22 +020091%package usrp1
92Summary: SDR transceiver that implements Layer 1 of a GSM BTS (USRP1)
93Group: Productivity/Telephony/Servers
94
95%description usrp1
96OsmoTRX is a software-defined radio transceiver that implements the Layer 1
97physical layer of a BTS comprising the following 3GPP specifications:
98
99TS 05.01 "Physical layer on the radio path"
100TS 05.02 "Multiplexing and Multiple Access on the Radio Path"
101TS 05.04 "Modulation"
102TS 05.10 "Radio subsystem synchronization"
103
104In this context, BTS is "Base transceiver station". It's the stations that
105connect mobile phones to the mobile network.
106
1073GPP is the "3rd Generation Partnership Project" which is the collaboration
108between different telecommunication associations for developing new
109generations of mobile phone networks. (post-2G/GSM)
110
111%package lms
112Summary: SDR transceiver that implements Layer 1 of a GSM BTS (LimeSuite)
113Group: Productivity/Telephony/Servers
114
115%description lms
116OsmoTRX is a software-defined radio transceiver that implements the Layer 1
117physical layer of a BTS comprising the following 3GPP specifications:
118
119TS 05.01 "Physical layer on the radio path"
120TS 05.02 "Multiplexing and Multiple Access on the Radio Path"
121TS 05.04 "Modulation"
122TS 05.10 "Radio subsystem synchronization"
123
124In this context, BTS is "Base transceiver station". It's the stations that
125connect mobile phones to the mobile network.
126
1273GPP is the "3rd Generation Partnership Project" which is the collaboration
128between different telecommunication associations for developing new
129generations of mobile phone networks. (post-2G/GSM)
Oliver Smith7bbe19e2020-05-14 11:54:54 +0200130%endif
Oliver Smithf669bf42020-05-14 11:54:22 +0200131
Eric Wild1e17c4f2020-03-24 17:19:27 +0100132%package ipc
133Summary: SDR transceiver that implements Layer 1 of a GSM BTS (IPC)
134Group: Productivity/Telephony/Servers
135
136%description ipc
137OsmoTRX is a software-defined radio transceiver that implements the Layer 1
138physical layer of a BTS comprising the following 3GPP specifications:
139
140TS 05.01 "Physical layer on the radio path"
141TS 05.02 "Multiplexing and Multiple Access on the Radio Path"
142TS 05.04 "Modulation"
143TS 05.10 "Radio subsystem synchronization"
144
145In this context, BTS is "Base transceiver station". It's the stations that
146connect mobile phones to the mobile network.
147
1483GPP is the "3rd Generation Partnership Project" which is the collaboration
149between different telecommunication associations for developing new
150generations of mobile phone networks. (post-2G/GSM)
151
Alexander Couzens7e27deb2021-01-08 09:28:58 +0100152%package ipc-test
153Summary: SDR transceiver that implements Layer 1 of a GSM BTS (IPC) driver test utility
154Group: Productivity/Telephony/Servers
155
156%description ipc-test
157OsmoTRX is a software-defined radio transceiver that implements the Layer 1
158physical layer of a BTS comprising the following 3GPP specifications:
159
160This package include the test tools for osmo-trx-ipc
161
Oliver Smithf669bf42020-05-14 11:54:22 +0200162%prep
163%setup -q
164
165%build
166echo "%{version}" >.tarball-version
167autoreconf -fi
Oliver Smith7bbe19e2020-05-14 11:54:54 +0200168
169%if 0%{?centos_ver}
170%configure \
171 --docdir=%{_docdir}/%{name} \
172 --with-systemdsystemunitdir=%{_unitdir} \
173 --without-lms \
174 --with-uhd \
Eric Wild1e17c4f2020-03-24 17:19:27 +0100175 --without-usrp1 \
176 --with-ipc
Oliver Smith7bbe19e2020-05-14 11:54:54 +0200177%else
Oliver Smithf669bf42020-05-14 11:54:22 +0200178%configure \
179 --docdir=%{_docdir}/%{name} \
180 --with-systemdsystemunitdir=%{_unitdir} \
181 --with-lms \
182 --with-uhd \
Eric Wild1e17c4f2020-03-24 17:19:27 +0100183 --with-usrp1 \
184 --with-ipc
Oliver Smith7bbe19e2020-05-14 11:54:54 +0200185%endif
Oliver Smithf669bf42020-05-14 11:54:22 +0200186
187make %{?_smp_mflags} V=1
188
189%check
190make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
191
192%install
193%make_install
194%fdupes -s %{buildroot}/%{_datadir}
195
Oliver Smith7bbe19e2020-05-14 11:54:54 +0200196%if 0%{?suse_version}
Oliver Smithf669bf42020-05-14 11:54:22 +0200197%pre lms %service_add_pre osmo-trx-lms.service
198%post lms %service_add_post osmo-trx-lms.service
199%preun lms %service_del_preun osmo-trx-lms.service
200%postun lms %service_del_postun osmo-trx-lms.service
201%pre uhd %service_add_pre osmo-trx-uhd.service
202%post uhd %service_add_post osmo-trx-uhd.service
203%preun uhd %service_del_preun osmo-trx-uhd.service
204%postun uhd %service_del_postun osmo-trx-uhd.service
205%pre usrp1 %service_add_pre osmo-trx-usrp1.service
206%post usrp1 %service_add_post osmo-trx-usrp1.service
207%preun usrp1 %service_del_preun osmo-trx-usrp1.service
208%postun usrp1 %service_del_postun osmo-trx-usrp1.service
Eric Wild1e17c4f2020-03-24 17:19:27 +0100209%pre ipc %service_add_pre osmo-trx-ipc.service
210%post ipc %service_add_post osmo-trx-ipc.service
211%preun ipc %service_del_preun osmo-trx-ipc.service
212%postun ipc %service_del_postun osmo-trx-ipc.service
Oliver Smith7bbe19e2020-05-14 11:54:54 +0200213%endif
Oliver Smithf669bf42020-05-14 11:54:22 +0200214
215%files
216%license COPYING
217%doc README.md
218%doc %{_docdir}/%{name}/examples
219
Oliver Smith7bbe19e2020-05-14 11:54:54 +0200220%if ! 0%{?centos_ver}
Oliver Smithf669bf42020-05-14 11:54:22 +0200221%files lms
222%{_bindir}/osmo-trx-lms
223%dir %{_sysconfdir}/osmocom
Harald Welte8ac169f2020-06-22 14:18:30 +0200224%config(noreplace) %{_sysconfdir}/osmocom/osmo-trx-lms.cfg
Oliver Smithf669bf42020-05-14 11:54:22 +0200225%{_unitdir}/osmo-trx-lms.service
Oliver Smith7bbe19e2020-05-14 11:54:54 +0200226%endif
Oliver Smithf669bf42020-05-14 11:54:22 +0200227
228%files uhd
229%{_bindir}/osmo-trx-uhd
230%dir %{_sysconfdir}/osmocom
Harald Welte8ac169f2020-06-22 14:18:30 +0200231%config(noreplace) %{_sysconfdir}/osmocom/osmo-trx-uhd.cfg
Oliver Smithf669bf42020-05-14 11:54:22 +0200232%{_unitdir}/osmo-trx-uhd.service
233
Oliver Smith7bbe19e2020-05-14 11:54:54 +0200234%if ! 0%{?centos_ver}
Oliver Smithf669bf42020-05-14 11:54:22 +0200235%files usrp1
236%{_bindir}/osmo-trx-usrp1
237%dir %{_datadir}/usrp
238%dir %{_datadir}/usrp/rev2
239%dir %{_datadir}/usrp/rev4
240%{_datadir}/usrp/rev2/std_inband.rbf
241%{_datadir}/usrp/rev4/std_inband.rbf
242%{_unitdir}/osmo-trx-usrp1.service
Oliver Smith7bbe19e2020-05-14 11:54:54 +0200243%endif
Oliver Smithf669bf42020-05-14 11:54:22 +0200244
Eric Wild1e17c4f2020-03-24 17:19:27 +0100245%files ipc
246%{_bindir}/osmo-trx-ipc
Eric Wild1e17c4f2020-03-24 17:19:27 +0100247%dir %{_sysconfdir}/osmocom
248%config(noreplace) %{_sysconfdir}/osmocom/osmo-trx-ipc.cfg
249%{_unitdir}/osmo-trx-ipc.service
250
Alexander Couzens7e27deb2021-01-08 09:28:58 +0100251%files ipc-test
252%{_bindir}/ipc-driver-test
253
Oliver Smithf669bf42020-05-14 11:54:22 +0200254%changelog