blob: ace721239c4e6f3cdf5b954ebf6a7137560a588c [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)
Oliver Smith7bbe19e2020-05-14 11:54:54 +020037BuildRequires: pkgconfig(libosmocoding) >= 1.3.0
Oliver Smithf669bf42020-05-14 11:54:22 +020038BuildRequires: pkgconfig(libosmocore) >= 0.12.0
39BuildRequires: pkgconfig(libosmoctrl) >= 0.12.0
40BuildRequires: pkgconfig(libosmovty) >= 0.12.0
41BuildRequires: 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
Oliver Smithf669bf42020-05-14 11:54:22 +0200152%prep
153%setup -q
154
155%build
156echo "%{version}" >.tarball-version
157autoreconf -fi
Oliver Smith7bbe19e2020-05-14 11:54:54 +0200158
159%if 0%{?centos_ver}
160%configure \
161 --docdir=%{_docdir}/%{name} \
162 --with-systemdsystemunitdir=%{_unitdir} \
163 --without-lms \
164 --with-uhd \
Eric Wild1e17c4f2020-03-24 17:19:27 +0100165 --without-usrp1 \
166 --with-ipc
Oliver Smith7bbe19e2020-05-14 11:54:54 +0200167%else
Oliver Smithf669bf42020-05-14 11:54:22 +0200168%configure \
169 --docdir=%{_docdir}/%{name} \
170 --with-systemdsystemunitdir=%{_unitdir} \
171 --with-lms \
172 --with-uhd \
Eric Wild1e17c4f2020-03-24 17:19:27 +0100173 --with-usrp1 \
174 --with-ipc
Oliver Smith7bbe19e2020-05-14 11:54:54 +0200175%endif
Oliver Smithf669bf42020-05-14 11:54:22 +0200176
177make %{?_smp_mflags} V=1
178
179%check
180make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
181
182%install
183%make_install
184%fdupes -s %{buildroot}/%{_datadir}
185
Oliver Smith7bbe19e2020-05-14 11:54:54 +0200186%if 0%{?suse_version}
Oliver Smithf669bf42020-05-14 11:54:22 +0200187%pre lms %service_add_pre osmo-trx-lms.service
188%post lms %service_add_post osmo-trx-lms.service
189%preun lms %service_del_preun osmo-trx-lms.service
190%postun lms %service_del_postun osmo-trx-lms.service
191%pre uhd %service_add_pre osmo-trx-uhd.service
192%post uhd %service_add_post osmo-trx-uhd.service
193%preun uhd %service_del_preun osmo-trx-uhd.service
194%postun uhd %service_del_postun osmo-trx-uhd.service
195%pre usrp1 %service_add_pre osmo-trx-usrp1.service
196%post usrp1 %service_add_post osmo-trx-usrp1.service
197%preun usrp1 %service_del_preun osmo-trx-usrp1.service
198%postun usrp1 %service_del_postun osmo-trx-usrp1.service
Eric Wild1e17c4f2020-03-24 17:19:27 +0100199%pre ipc %service_add_pre osmo-trx-ipc.service
200%post ipc %service_add_post osmo-trx-ipc.service
201%preun ipc %service_del_preun osmo-trx-ipc.service
202%postun ipc %service_del_postun osmo-trx-ipc.service
Oliver Smith7bbe19e2020-05-14 11:54:54 +0200203%endif
Oliver Smithf669bf42020-05-14 11:54:22 +0200204
205%files
206%license COPYING
207%doc README.md
208%doc %{_docdir}/%{name}/examples
209
Oliver Smith7bbe19e2020-05-14 11:54:54 +0200210%if ! 0%{?centos_ver}
Oliver Smithf669bf42020-05-14 11:54:22 +0200211%files lms
212%{_bindir}/osmo-trx-lms
213%dir %{_sysconfdir}/osmocom
Harald Welte8ac169f2020-06-22 14:18:30 +0200214%config(noreplace) %{_sysconfdir}/osmocom/osmo-trx-lms.cfg
Oliver Smithf669bf42020-05-14 11:54:22 +0200215%{_unitdir}/osmo-trx-lms.service
Oliver Smith7bbe19e2020-05-14 11:54:54 +0200216%endif
Oliver Smithf669bf42020-05-14 11:54:22 +0200217
218%files uhd
219%{_bindir}/osmo-trx-uhd
220%dir %{_sysconfdir}/osmocom
Harald Welte8ac169f2020-06-22 14:18:30 +0200221%config(noreplace) %{_sysconfdir}/osmocom/osmo-trx-uhd.cfg
Oliver Smithf669bf42020-05-14 11:54:22 +0200222%{_unitdir}/osmo-trx-uhd.service
223
Oliver Smith7bbe19e2020-05-14 11:54:54 +0200224%if ! 0%{?centos_ver}
Oliver Smithf669bf42020-05-14 11:54:22 +0200225%files usrp1
226%{_bindir}/osmo-trx-usrp1
227%dir %{_datadir}/usrp
228%dir %{_datadir}/usrp/rev2
229%dir %{_datadir}/usrp/rev4
230%{_datadir}/usrp/rev2/std_inband.rbf
231%{_datadir}/usrp/rev4/std_inband.rbf
232%{_unitdir}/osmo-trx-usrp1.service
Oliver Smith7bbe19e2020-05-14 11:54:54 +0200233%endif
Oliver Smithf669bf42020-05-14 11:54:22 +0200234
Eric Wild1e17c4f2020-03-24 17:19:27 +0100235%files ipc
236%{_bindir}/osmo-trx-ipc
237%{_bindir}/ipc-driver-test
238%dir %{_sysconfdir}/osmocom
239%config(noreplace) %{_sysconfdir}/osmocom/osmo-trx-ipc.cfg
240%{_unitdir}/osmo-trx-ipc.service
241
Oliver Smithf669bf42020-05-14 11:54:22 +0200242%changelog