Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 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 | |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 15 | Name: osmo-trx |
Oliver Smith | 7bbe19e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 16 | Version: @VERSION@ |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 17 | Release: 0 |
| 18 | Summary: SDR transceiver that implements Layer 1 of a GSM BTS |
| 19 | License: AGPL-3.0-or-later |
| 20 | Group: Productivity/Telephony/Servers |
Oliver Smith | 7bbe19e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 21 | URL: https://osmocom.org/projects/osmotrx |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 22 | Source: %{name}-%{version}.tar.xz |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 23 | BuildRequires: autoconf |
| 24 | BuildRequires: automake |
| 25 | BuildRequires: fdupes |
| 26 | BuildRequires: gcc-c++ |
| 27 | BuildRequires: libtool |
| 28 | BuildRequires: pkgconfig >= 0.20 |
Oliver Smith | 7bbe19e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 29 | %if 0%{?suse_version} |
| 30 | BuildRequires: systemd-rpm-macros |
| 31 | %endif |
| 32 | %if ! 0%{?centos_ver} |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 33 | BuildRequires: pkgconfig(LimeSuite) |
Oliver Smith | 7bbe19e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 34 | BuildRequires: pkgconfig(usrp) >= 3.3 |
| 35 | %endif |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 36 | BuildRequires: pkgconfig(fftw3f) |
Pau Espin Pedrol | 2ada887 | 2023-09-12 15:56:57 +0200 | [diff] [blame^] | 37 | BuildRequires: pkgconfig(libosmocoding) >= 1.9.0 |
| 38 | BuildRequires: pkgconfig(libosmocore) >= 1.9.0 |
| 39 | BuildRequires: pkgconfig(libosmoctrl) >= 1.9.0 |
| 40 | BuildRequires: pkgconfig(libosmovty) >= 1.9.0 |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 41 | BuildRequires: pkgconfig(libusb-1.0) |
| 42 | BuildRequires: pkgconfig(uhd) |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 43 | %{?systemd_requires} |
| 44 | %if 0%{?suse_version} > 1325 |
| 45 | BuildRequires: libboost_program_options-devel |
| 46 | BuildRequires: libboost_system-devel |
| 47 | BuildRequires: libboost_test-devel |
| 48 | BuildRequires: libboost_thread-devel |
| 49 | %else |
| 50 | BuildRequires: boost-devel |
| 51 | %endif |
| 52 | |
| 53 | %description |
| 54 | OsmoTRX is a software-defined radio transceiver that implements the Layer 1 |
| 55 | physical layer of a BTS comprising the following 3GPP specifications: |
| 56 | |
| 57 | TS 05.01 "Physical layer on the radio path" |
| 58 | TS 05.02 "Multiplexing and Multiple Access on the Radio Path" |
| 59 | TS 05.04 "Modulation" |
| 60 | TS 05.10 "Radio subsystem synchronization" |
| 61 | |
| 62 | In this context, BTS is "Base transceiver station". It's the stations that |
| 63 | connect mobile phones to the mobile network. |
| 64 | |
| 65 | 3GPP is the "3rd Generation Partnership Project" which is the collaboration |
| 66 | between different telecommunication associations for developing new |
| 67 | generations of mobile phone networks. (post-2G/GSM) |
| 68 | |
| 69 | %package uhd |
| 70 | Summary: SDR transceiver that implements Layer 1 of a GSM BTS (UHD) |
| 71 | Group: Productivity/Telephony/Servers |
Harald Welte | 174fb03 | 2020-06-17 15:28:18 +0200 | [diff] [blame] | 72 | Requires: uhd-firmware |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 73 | |
| 74 | %description uhd |
| 75 | OsmoTRX is a software-defined radio transceiver that implements the Layer 1 |
| 76 | physical layer of a BTS comprising the following 3GPP specifications: |
| 77 | |
| 78 | TS 05.01 "Physical layer on the radio path" |
| 79 | TS 05.02 "Multiplexing and Multiple Access on the Radio Path" |
| 80 | TS 05.04 "Modulation" |
| 81 | TS 05.10 "Radio subsystem synchronization" |
| 82 | |
| 83 | In this context, BTS is "Base transceiver station". It's the stations that |
| 84 | connect mobile phones to the mobile network. |
| 85 | |
| 86 | 3GPP is the "3rd Generation Partnership Project" which is the collaboration |
| 87 | between different telecommunication associations for developing new |
| 88 | generations of mobile phone networks. (post-2G/GSM) |
| 89 | |
Oliver Smith | 7bbe19e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 90 | %if ! 0%{?centos_ver} |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 91 | %package usrp1 |
| 92 | Summary: SDR transceiver that implements Layer 1 of a GSM BTS (USRP1) |
| 93 | Group: Productivity/Telephony/Servers |
| 94 | |
| 95 | %description usrp1 |
| 96 | OsmoTRX is a software-defined radio transceiver that implements the Layer 1 |
| 97 | physical layer of a BTS comprising the following 3GPP specifications: |
| 98 | |
| 99 | TS 05.01 "Physical layer on the radio path" |
| 100 | TS 05.02 "Multiplexing and Multiple Access on the Radio Path" |
| 101 | TS 05.04 "Modulation" |
| 102 | TS 05.10 "Radio subsystem synchronization" |
| 103 | |
| 104 | In this context, BTS is "Base transceiver station". It's the stations that |
| 105 | connect mobile phones to the mobile network. |
| 106 | |
| 107 | 3GPP is the "3rd Generation Partnership Project" which is the collaboration |
| 108 | between different telecommunication associations for developing new |
| 109 | generations of mobile phone networks. (post-2G/GSM) |
| 110 | |
| 111 | %package lms |
| 112 | Summary: SDR transceiver that implements Layer 1 of a GSM BTS (LimeSuite) |
| 113 | Group: Productivity/Telephony/Servers |
| 114 | |
| 115 | %description lms |
| 116 | OsmoTRX is a software-defined radio transceiver that implements the Layer 1 |
| 117 | physical layer of a BTS comprising the following 3GPP specifications: |
| 118 | |
| 119 | TS 05.01 "Physical layer on the radio path" |
| 120 | TS 05.02 "Multiplexing and Multiple Access on the Radio Path" |
| 121 | TS 05.04 "Modulation" |
| 122 | TS 05.10 "Radio subsystem synchronization" |
| 123 | |
| 124 | In this context, BTS is "Base transceiver station". It's the stations that |
| 125 | connect mobile phones to the mobile network. |
| 126 | |
| 127 | 3GPP is the "3rd Generation Partnership Project" which is the collaboration |
| 128 | between different telecommunication associations for developing new |
| 129 | generations of mobile phone networks. (post-2G/GSM) |
Oliver Smith | 7bbe19e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 130 | %endif |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 131 | |
Eric Wild | 1e17c4f | 2020-03-24 17:19:27 +0100 | [diff] [blame] | 132 | %package ipc |
| 133 | Summary: SDR transceiver that implements Layer 1 of a GSM BTS (IPC) |
| 134 | Group: Productivity/Telephony/Servers |
| 135 | |
| 136 | %description ipc |
| 137 | OsmoTRX is a software-defined radio transceiver that implements the Layer 1 |
| 138 | physical layer of a BTS comprising the following 3GPP specifications: |
| 139 | |
| 140 | TS 05.01 "Physical layer on the radio path" |
| 141 | TS 05.02 "Multiplexing and Multiple Access on the Radio Path" |
| 142 | TS 05.04 "Modulation" |
| 143 | TS 05.10 "Radio subsystem synchronization" |
| 144 | |
| 145 | In this context, BTS is "Base transceiver station". It's the stations that |
| 146 | connect mobile phones to the mobile network. |
| 147 | |
| 148 | 3GPP is the "3rd Generation Partnership Project" which is the collaboration |
| 149 | between different telecommunication associations for developing new |
| 150 | generations of mobile phone networks. (post-2G/GSM) |
| 151 | |
Alexander Couzens | 7e27deb | 2021-01-08 09:28:58 +0100 | [diff] [blame] | 152 | %package ipc-test |
| 153 | Summary: SDR transceiver that implements Layer 1 of a GSM BTS (IPC) driver test utility |
| 154 | Group: Productivity/Telephony/Servers |
| 155 | |
| 156 | %description ipc-test |
| 157 | OsmoTRX is a software-defined radio transceiver that implements the Layer 1 |
| 158 | physical layer of a BTS comprising the following 3GPP specifications: |
| 159 | |
| 160 | This package include the test tools for osmo-trx-ipc |
| 161 | |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 162 | %prep |
| 163 | %setup -q |
| 164 | |
| 165 | %build |
| 166 | echo "%{version}" >.tarball-version |
| 167 | autoreconf -fi |
Oliver Smith | 7bbe19e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 168 | |
| 169 | %if 0%{?centos_ver} |
| 170 | %configure \ |
| 171 | --docdir=%{_docdir}/%{name} \ |
| 172 | --with-systemdsystemunitdir=%{_unitdir} \ |
| 173 | --without-lms \ |
| 174 | --with-uhd \ |
Eric Wild | 1e17c4f | 2020-03-24 17:19:27 +0100 | [diff] [blame] | 175 | --without-usrp1 \ |
| 176 | --with-ipc |
Oliver Smith | 7bbe19e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 177 | %else |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 178 | %configure \ |
| 179 | --docdir=%{_docdir}/%{name} \ |
| 180 | --with-systemdsystemunitdir=%{_unitdir} \ |
| 181 | --with-lms \ |
| 182 | --with-uhd \ |
Eric Wild | 1e17c4f | 2020-03-24 17:19:27 +0100 | [diff] [blame] | 183 | --with-usrp1 \ |
| 184 | --with-ipc |
Oliver Smith | 7bbe19e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 185 | %endif |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 186 | |
| 187 | make %{?_smp_mflags} V=1 |
| 188 | |
| 189 | %check |
| 190 | make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +) |
| 191 | |
| 192 | %install |
| 193 | %make_install |
| 194 | %fdupes -s %{buildroot}/%{_datadir} |
| 195 | |
Oliver Smith | 7bbe19e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 196 | %if 0%{?suse_version} |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 197 | %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 Wild | 1e17c4f | 2020-03-24 17:19:27 +0100 | [diff] [blame] | 209 | %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 Smith | 7bbe19e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 213 | %endif |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 214 | |
| 215 | %files |
| 216 | %license COPYING |
| 217 | %doc README.md |
| 218 | %doc %{_docdir}/%{name}/examples |
| 219 | |
Oliver Smith | 7bbe19e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 220 | %if ! 0%{?centos_ver} |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 221 | %files lms |
| 222 | %{_bindir}/osmo-trx-lms |
| 223 | %dir %{_sysconfdir}/osmocom |
Harald Welte | 8ac169f | 2020-06-22 14:18:30 +0200 | [diff] [blame] | 224 | %config(noreplace) %{_sysconfdir}/osmocom/osmo-trx-lms.cfg |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 225 | %{_unitdir}/osmo-trx-lms.service |
Oliver Smith | 7bbe19e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 226 | %endif |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 227 | |
| 228 | %files uhd |
| 229 | %{_bindir}/osmo-trx-uhd |
| 230 | %dir %{_sysconfdir}/osmocom |
Harald Welte | 8ac169f | 2020-06-22 14:18:30 +0200 | [diff] [blame] | 231 | %config(noreplace) %{_sysconfdir}/osmocom/osmo-trx-uhd.cfg |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 232 | %{_unitdir}/osmo-trx-uhd.service |
| 233 | |
Oliver Smith | 7bbe19e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 234 | %if ! 0%{?centos_ver} |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 235 | %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 Smith | 7bbe19e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 243 | %endif |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 244 | |
Eric Wild | 1e17c4f | 2020-03-24 17:19:27 +0100 | [diff] [blame] | 245 | %files ipc |
| 246 | %{_bindir}/osmo-trx-ipc |
Eric Wild | 1e17c4f | 2020-03-24 17:19:27 +0100 | [diff] [blame] | 247 | %dir %{_sysconfdir}/osmocom |
| 248 | %config(noreplace) %{_sysconfdir}/osmocom/osmo-trx-ipc.cfg |
| 249 | %{_unitdir}/osmo-trx-ipc.service |
| 250 | |
Alexander Couzens | 7e27deb | 2021-01-08 09:28:58 +0100 | [diff] [blame] | 251 | %files ipc-test |
| 252 | %{_bindir}/ipc-driver-test |
| 253 | |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 254 | %changelog |