blob: 513fe5994b82a1b624dc5728d1edae39fd0b5566 [file] [log] [blame]
Oliver Smithb74e08e2020-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 Smithb74e08e2020-05-14 11:54:22 +020015Name: osmo-trx
Oliver Smithc25356e2020-05-14 11:54:54 +020016Version: 0.0.0
Oliver Smithb74e08e2020-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
21URL: https://osmocom.org/projects/osmotrx/wiki/OsmoTRX
22Source: %{name}-%{version}.tar.xz
Oliver Smithb74e08e2020-05-14 11:54:22 +020023BuildRequires: autoconf
24BuildRequires: automake
Oliver Smithc25356e2020-05-14 11:54:54 +020025%if 0%{?suse_version}
Oliver Smithb74e08e2020-05-14 11:54:22 +020026BuildRequires: fdupes
Oliver Smithc25356e2020-05-14 11:54:54 +020027%endif
Oliver Smithb74e08e2020-05-14 11:54:22 +020028BuildRequires: gcc-c++
29BuildRequires: libtool
30BuildRequires: pkgconfig >= 0.20
Oliver Smithc25356e2020-05-14 11:54:54 +020031%if ! 0%{?centos_ver}
Oliver Smithb74e08e2020-05-14 11:54:22 +020032BuildRequires: pkgconfig(LimeSuite)
Oliver Smithc25356e2020-05-14 11:54:54 +020033BuildRequires: pkgconfig(usrp) >= 3.3
34%endif
Oliver Smithb74e08e2020-05-14 11:54:22 +020035BuildRequires: pkgconfig(fftw3f)
Oliver Smithc25356e2020-05-14 11:54:54 +020036BuildRequires: pkgconfig(libosmocoding) >= 1.3.0
Oliver Smithb74e08e2020-05-14 11:54:22 +020037BuildRequires: pkgconfig(libosmocore) >= 0.12.0
38BuildRequires: pkgconfig(libosmoctrl) >= 0.12.0
39BuildRequires: pkgconfig(libosmovty) >= 0.12.0
40BuildRequires: pkgconfig(libusb-1.0)
41BuildRequires: pkgconfig(uhd)
Oliver Smithb74e08e2020-05-14 11:54:22 +020042%{?systemd_requires}
43%if 0%{?suse_version} > 1325
44BuildRequires: libboost_program_options-devel
45BuildRequires: libboost_system-devel
46BuildRequires: libboost_test-devel
47BuildRequires: libboost_thread-devel
48%else
49BuildRequires: boost-devel
50%endif
51
52%description
53OsmoTRX is a software-defined radio transceiver that implements the Layer 1
54physical layer of a BTS comprising the following 3GPP specifications:
55
56TS 05.01 "Physical layer on the radio path"
57TS 05.02 "Multiplexing and Multiple Access on the Radio Path"
58TS 05.04 "Modulation"
59TS 05.10 "Radio subsystem synchronization"
60
61In this context, BTS is "Base transceiver station". It's the stations that
62connect mobile phones to the mobile network.
63
643GPP is the "3rd Generation Partnership Project" which is the collaboration
65between different telecommunication associations for developing new
66generations of mobile phone networks. (post-2G/GSM)
67
68%package uhd
69Summary: SDR transceiver that implements Layer 1 of a GSM BTS (UHD)
70Group: Productivity/Telephony/Servers
71
72%description uhd
73OsmoTRX is a software-defined radio transceiver that implements the Layer 1
74physical layer of a BTS comprising the following 3GPP specifications:
75
76TS 05.01 "Physical layer on the radio path"
77TS 05.02 "Multiplexing and Multiple Access on the Radio Path"
78TS 05.04 "Modulation"
79TS 05.10 "Radio subsystem synchronization"
80
81In this context, BTS is "Base transceiver station". It's the stations that
82connect mobile phones to the mobile network.
83
843GPP is the "3rd Generation Partnership Project" which is the collaboration
85between different telecommunication associations for developing new
86generations of mobile phone networks. (post-2G/GSM)
87
Oliver Smithc25356e2020-05-14 11:54:54 +020088%if ! 0%{?centos_ver}
Oliver Smithb74e08e2020-05-14 11:54:22 +020089%package usrp1
90Summary: SDR transceiver that implements Layer 1 of a GSM BTS (USRP1)
91Group: Productivity/Telephony/Servers
92
93%description usrp1
94OsmoTRX is a software-defined radio transceiver that implements the Layer 1
95physical layer of a BTS comprising the following 3GPP specifications:
96
97TS 05.01 "Physical layer on the radio path"
98TS 05.02 "Multiplexing and Multiple Access on the Radio Path"
99TS 05.04 "Modulation"
100TS 05.10 "Radio subsystem synchronization"
101
102In this context, BTS is "Base transceiver station". It's the stations that
103connect mobile phones to the mobile network.
104
1053GPP is the "3rd Generation Partnership Project" which is the collaboration
106between different telecommunication associations for developing new
107generations of mobile phone networks. (post-2G/GSM)
108
109%package lms
110Summary: SDR transceiver that implements Layer 1 of a GSM BTS (LimeSuite)
111Group: Productivity/Telephony/Servers
112
113%description lms
114OsmoTRX is a software-defined radio transceiver that implements the Layer 1
115physical layer of a BTS comprising the following 3GPP specifications:
116
117TS 05.01 "Physical layer on the radio path"
118TS 05.02 "Multiplexing and Multiple Access on the Radio Path"
119TS 05.04 "Modulation"
120TS 05.10 "Radio subsystem synchronization"
121
122In this context, BTS is "Base transceiver station". It's the stations that
123connect mobile phones to the mobile network.
124
1253GPP is the "3rd Generation Partnership Project" which is the collaboration
126between different telecommunication associations for developing new
127generations of mobile phone networks. (post-2G/GSM)
Oliver Smithc25356e2020-05-14 11:54:54 +0200128%endif
Oliver Smithb74e08e2020-05-14 11:54:22 +0200129
130%prep
131%setup -q
132
133%build
134echo "%{version}" >.tarball-version
135autoreconf -fi
Oliver Smithc25356e2020-05-14 11:54:54 +0200136
137%if 0%{?centos_ver}
138%configure \
139 --docdir=%{_docdir}/%{name} \
140 --with-systemdsystemunitdir=%{_unitdir} \
141 --without-lms \
142 --with-uhd \
143 --without-usrp1
144%else
Oliver Smithb74e08e2020-05-14 11:54:22 +0200145%configure \
146 --docdir=%{_docdir}/%{name} \
147 --with-systemdsystemunitdir=%{_unitdir} \
148 --with-lms \
149 --with-uhd \
150 --with-usrp1
Oliver Smithc25356e2020-05-14 11:54:54 +0200151%endif
Oliver Smithb74e08e2020-05-14 11:54:22 +0200152
153make %{?_smp_mflags} V=1
154
155%check
156make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
157
158%install
159%make_install
Oliver Smithc25356e2020-05-14 11:54:54 +0200160%if 0%{?suse_version}
Oliver Smithb74e08e2020-05-14 11:54:22 +0200161%fdupes -s %{buildroot}/%{_datadir}
162
163%pre lms %service_add_pre osmo-trx-lms.service
164%post lms %service_add_post osmo-trx-lms.service
165%preun lms %service_del_preun osmo-trx-lms.service
166%postun lms %service_del_postun osmo-trx-lms.service
167%pre uhd %service_add_pre osmo-trx-uhd.service
168%post uhd %service_add_post osmo-trx-uhd.service
169%preun uhd %service_del_preun osmo-trx-uhd.service
170%postun uhd %service_del_postun osmo-trx-uhd.service
171%pre usrp1 %service_add_pre osmo-trx-usrp1.service
172%post usrp1 %service_add_post osmo-trx-usrp1.service
173%preun usrp1 %service_del_preun osmo-trx-usrp1.service
174%postun usrp1 %service_del_postun osmo-trx-usrp1.service
Oliver Smithc25356e2020-05-14 11:54:54 +0200175%endif
Oliver Smithb74e08e2020-05-14 11:54:22 +0200176
177%files
178%license COPYING
179%doc README.md
180%doc %{_docdir}/%{name}/examples
181
Oliver Smithc25356e2020-05-14 11:54:54 +0200182%if ! 0%{?centos_ver}
Oliver Smithb74e08e2020-05-14 11:54:22 +0200183%files lms
184%{_bindir}/osmo-trx-lms
185%dir %{_sysconfdir}/osmocom
186%config %{_sysconfdir}/osmocom/osmo-trx-lms.cfg
187%{_unitdir}/osmo-trx-lms.service
Oliver Smithc25356e2020-05-14 11:54:54 +0200188%endif
Oliver Smithb74e08e2020-05-14 11:54:22 +0200189
190%files uhd
191%{_bindir}/osmo-trx-uhd
192%dir %{_sysconfdir}/osmocom
193%config %{_sysconfdir}/osmocom/osmo-trx-uhd.cfg
194%{_unitdir}/osmo-trx-uhd.service
195
Oliver Smithc25356e2020-05-14 11:54:54 +0200196%if ! 0%{?centos_ver}
Oliver Smithb74e08e2020-05-14 11:54:22 +0200197%files usrp1
198%{_bindir}/osmo-trx-usrp1
199%dir %{_datadir}/usrp
200%dir %{_datadir}/usrp/rev2
201%dir %{_datadir}/usrp/rev4
202%{_datadir}/usrp/rev2/std_inband.rbf
203%{_datadir}/usrp/rev4/std_inband.rbf
204%{_unitdir}/osmo-trx-usrp1.service
Oliver Smithc25356e2020-05-14 11:54:54 +0200205%endif
Oliver Smithb74e08e2020-05-14 11:54:22 +0200206
207%changelog