blob: 696147f7df0416cb25007100214d7e06db356187 [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
72
73%description uhd
74OsmoTRX is a software-defined radio transceiver that implements the Layer 1
75physical layer of a BTS comprising the following 3GPP specifications:
76
77TS 05.01 "Physical layer on the radio path"
78TS 05.02 "Multiplexing and Multiple Access on the Radio Path"
79TS 05.04 "Modulation"
80TS 05.10 "Radio subsystem synchronization"
81
82In this context, BTS is "Base transceiver station". It's the stations that
83connect mobile phones to the mobile network.
84
853GPP is the "3rd Generation Partnership Project" which is the collaboration
86between different telecommunication associations for developing new
87generations of mobile phone networks. (post-2G/GSM)
88
Oliver Smith7bbe19e2020-05-14 11:54:54 +020089%if ! 0%{?centos_ver}
Oliver Smithf669bf42020-05-14 11:54:22 +020090%package usrp1
91Summary: SDR transceiver that implements Layer 1 of a GSM BTS (USRP1)
92Group: Productivity/Telephony/Servers
93
94%description usrp1
95OsmoTRX is a software-defined radio transceiver that implements the Layer 1
96physical layer of a BTS comprising the following 3GPP specifications:
97
98TS 05.01 "Physical layer on the radio path"
99TS 05.02 "Multiplexing and Multiple Access on the Radio Path"
100TS 05.04 "Modulation"
101TS 05.10 "Radio subsystem synchronization"
102
103In this context, BTS is "Base transceiver station". It's the stations that
104connect mobile phones to the mobile network.
105
1063GPP is the "3rd Generation Partnership Project" which is the collaboration
107between different telecommunication associations for developing new
108generations of mobile phone networks. (post-2G/GSM)
109
110%package lms
111Summary: SDR transceiver that implements Layer 1 of a GSM BTS (LimeSuite)
112Group: Productivity/Telephony/Servers
113
114%description lms
115OsmoTRX is a software-defined radio transceiver that implements the Layer 1
116physical layer of a BTS comprising the following 3GPP specifications:
117
118TS 05.01 "Physical layer on the radio path"
119TS 05.02 "Multiplexing and Multiple Access on the Radio Path"
120TS 05.04 "Modulation"
121TS 05.10 "Radio subsystem synchronization"
122
123In this context, BTS is "Base transceiver station". It's the stations that
124connect mobile phones to the mobile network.
125
1263GPP is the "3rd Generation Partnership Project" which is the collaboration
127between different telecommunication associations for developing new
128generations of mobile phone networks. (post-2G/GSM)
Oliver Smith7bbe19e2020-05-14 11:54:54 +0200129%endif
Oliver Smithf669bf42020-05-14 11:54:22 +0200130
Oliver Smith7cc7e3d2020-05-19 13:24:46 +0200131%package ipc
132Summary: SDR transceiver that implements Layer 1 of a GSM BTS (IPC)
133Group: Productivity/Telephony/Servers
134
135%description ipc
136OsmoTRX is a software-defined radio transceiver that implements the Layer 1
137physical layer of a BTS comprising the following 3GPP specifications:
138
139TS 05.01 "Physical layer on the radio path"
140TS 05.02 "Multiplexing and Multiple Access on the Radio Path"
141TS 05.04 "Modulation"
142TS 05.10 "Radio subsystem synchronization"
143
144In this context, BTS is "Base transceiver station". It's the stations that
145connect mobile phones to the mobile network.
146
1473GPP is the "3rd Generation Partnership Project" which is the collaboration
148between different telecommunication associations for developing new
149generations of mobile phone networks. (post-2G/GSM)
150
Oliver Smithf669bf42020-05-14 11:54:22 +0200151%prep
152%setup -q
153
154%build
155echo "%{version}" >.tarball-version
156autoreconf -fi
Oliver Smith7bbe19e2020-05-14 11:54:54 +0200157
158%if 0%{?centos_ver}
159%configure \
160 --docdir=%{_docdir}/%{name} \
161 --with-systemdsystemunitdir=%{_unitdir} \
162 --without-lms \
163 --with-uhd \
Oliver Smith7cc7e3d2020-05-19 13:24:46 +0200164 --without-usrp1 \
165 --with-ipc
Oliver Smith7bbe19e2020-05-14 11:54:54 +0200166%else
Oliver Smithf669bf42020-05-14 11:54:22 +0200167%configure \
168 --docdir=%{_docdir}/%{name} \
169 --with-systemdsystemunitdir=%{_unitdir} \
170 --with-lms \
171 --with-uhd \
Oliver Smith7cc7e3d2020-05-19 13:24:46 +0200172 --with-usrp1 \
173 --with-ipc
Oliver Smith7bbe19e2020-05-14 11:54:54 +0200174%endif
Oliver Smithf669bf42020-05-14 11:54:22 +0200175
176make %{?_smp_mflags} V=1
177
178%check
179make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
180
181%install
182%make_install
183%fdupes -s %{buildroot}/%{_datadir}
184
Oliver Smith7bbe19e2020-05-14 11:54:54 +0200185%if 0%{?suse_version}
Oliver Smithf669bf42020-05-14 11:54:22 +0200186%pre lms %service_add_pre osmo-trx-lms.service
187%post lms %service_add_post osmo-trx-lms.service
188%preun lms %service_del_preun osmo-trx-lms.service
189%postun lms %service_del_postun osmo-trx-lms.service
190%pre uhd %service_add_pre osmo-trx-uhd.service
191%post uhd %service_add_post osmo-trx-uhd.service
192%preun uhd %service_del_preun osmo-trx-uhd.service
193%postun uhd %service_del_postun osmo-trx-uhd.service
194%pre usrp1 %service_add_pre osmo-trx-usrp1.service
195%post usrp1 %service_add_post osmo-trx-usrp1.service
196%preun usrp1 %service_del_preun osmo-trx-usrp1.service
197%postun usrp1 %service_del_postun osmo-trx-usrp1.service
Oliver Smith7cc7e3d2020-05-19 13:24:46 +0200198%pre ipc %service_add_pre osmo-trx-ipc.service
199%post ipc %service_add_post osmo-trx-ipc.service
200%preun ipc %service_del_preun osmo-trx-ipc.service
201%postun ipc %service_del_postun osmo-trx-ipc.service
Oliver Smith7bbe19e2020-05-14 11:54:54 +0200202%endif
Oliver Smithf669bf42020-05-14 11:54:22 +0200203
204%files
205%license COPYING
206%doc README.md
207%doc %{_docdir}/%{name}/examples
208
Oliver Smith7bbe19e2020-05-14 11:54:54 +0200209%if ! 0%{?centos_ver}
Oliver Smithf669bf42020-05-14 11:54:22 +0200210%files lms
211%{_bindir}/osmo-trx-lms
212%dir %{_sysconfdir}/osmocom
213%config %{_sysconfdir}/osmocom/osmo-trx-lms.cfg
214%{_unitdir}/osmo-trx-lms.service
Oliver Smith7bbe19e2020-05-14 11:54:54 +0200215%endif
Oliver Smithf669bf42020-05-14 11:54:22 +0200216
217%files uhd
218%{_bindir}/osmo-trx-uhd
219%dir %{_sysconfdir}/osmocom
220%config %{_sysconfdir}/osmocom/osmo-trx-uhd.cfg
221%{_unitdir}/osmo-trx-uhd.service
222
Oliver Smith7bbe19e2020-05-14 11:54:54 +0200223%if ! 0%{?centos_ver}
Oliver Smithf669bf42020-05-14 11:54:22 +0200224%files usrp1
225%{_bindir}/osmo-trx-usrp1
226%dir %{_datadir}/usrp
227%dir %{_datadir}/usrp/rev2
228%dir %{_datadir}/usrp/rev4
229%{_datadir}/usrp/rev2/std_inband.rbf
230%{_datadir}/usrp/rev4/std_inband.rbf
231%{_unitdir}/osmo-trx-usrp1.service
Oliver Smith7bbe19e2020-05-14 11:54:54 +0200232%endif
Oliver Smithf669bf42020-05-14 11:54:22 +0200233
Oliver Smith7cc7e3d2020-05-19 13:24:46 +0200234%files ipc
235%{_bindir}/osmo-trx-ipc
236%{_bindir}/ipc-driver-test
237%dir %{_sysconfdir}/osmocom
238# FIXME: missing: osmo-trx-ipc.cfg
239%{_unitdir}/osmo-trx-ipc.service
240
Oliver Smithf669bf42020-05-14 11:54:22 +0200241%changelog