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) |
Oliver Smith | 7bbe19e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 37 | BuildRequires: pkgconfig(libosmocoding) >= 1.3.0 |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 38 | BuildRequires: pkgconfig(libosmocore) >= 0.12.0 |
| 39 | BuildRequires: pkgconfig(libosmoctrl) >= 0.12.0 |
| 40 | BuildRequires: pkgconfig(libosmovty) >= 0.12.0 |
| 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 |
| 72 | |
| 73 | %description uhd |
| 74 | OsmoTRX is a software-defined radio transceiver that implements the Layer 1 |
| 75 | physical layer of a BTS comprising the following 3GPP specifications: |
| 76 | |
| 77 | TS 05.01 "Physical layer on the radio path" |
| 78 | TS 05.02 "Multiplexing and Multiple Access on the Radio Path" |
| 79 | TS 05.04 "Modulation" |
| 80 | TS 05.10 "Radio subsystem synchronization" |
| 81 | |
| 82 | In this context, BTS is "Base transceiver station". It's the stations that |
| 83 | connect mobile phones to the mobile network. |
| 84 | |
| 85 | 3GPP is the "3rd Generation Partnership Project" which is the collaboration |
| 86 | between different telecommunication associations for developing new |
| 87 | generations of mobile phone networks. (post-2G/GSM) |
| 88 | |
Oliver Smith | 7bbe19e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 89 | %if ! 0%{?centos_ver} |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 90 | %package usrp1 |
| 91 | Summary: SDR transceiver that implements Layer 1 of a GSM BTS (USRP1) |
| 92 | Group: Productivity/Telephony/Servers |
| 93 | |
| 94 | %description usrp1 |
| 95 | OsmoTRX is a software-defined radio transceiver that implements the Layer 1 |
| 96 | physical layer of a BTS comprising the following 3GPP specifications: |
| 97 | |
| 98 | TS 05.01 "Physical layer on the radio path" |
| 99 | TS 05.02 "Multiplexing and Multiple Access on the Radio Path" |
| 100 | TS 05.04 "Modulation" |
| 101 | TS 05.10 "Radio subsystem synchronization" |
| 102 | |
| 103 | In this context, BTS is "Base transceiver station". It's the stations that |
| 104 | connect mobile phones to the mobile network. |
| 105 | |
| 106 | 3GPP is the "3rd Generation Partnership Project" which is the collaboration |
| 107 | between different telecommunication associations for developing new |
| 108 | generations of mobile phone networks. (post-2G/GSM) |
| 109 | |
| 110 | %package lms |
| 111 | Summary: SDR transceiver that implements Layer 1 of a GSM BTS (LimeSuite) |
| 112 | Group: Productivity/Telephony/Servers |
| 113 | |
| 114 | %description lms |
| 115 | OsmoTRX is a software-defined radio transceiver that implements the Layer 1 |
| 116 | physical layer of a BTS comprising the following 3GPP specifications: |
| 117 | |
| 118 | TS 05.01 "Physical layer on the radio path" |
| 119 | TS 05.02 "Multiplexing and Multiple Access on the Radio Path" |
| 120 | TS 05.04 "Modulation" |
| 121 | TS 05.10 "Radio subsystem synchronization" |
| 122 | |
| 123 | In this context, BTS is "Base transceiver station". It's the stations that |
| 124 | connect mobile phones to the mobile network. |
| 125 | |
| 126 | 3GPP is the "3rd Generation Partnership Project" which is the collaboration |
| 127 | between different telecommunication associations for developing new |
| 128 | generations of mobile phone networks. (post-2G/GSM) |
Oliver Smith | 7bbe19e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 129 | %endif |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 130 | |
Oliver Smith | 7cc7e3d | 2020-05-19 13:24:46 +0200 | [diff] [blame] | 131 | %package ipc |
| 132 | Summary: SDR transceiver that implements Layer 1 of a GSM BTS (IPC) |
| 133 | Group: Productivity/Telephony/Servers |
| 134 | |
| 135 | %description ipc |
| 136 | OsmoTRX is a software-defined radio transceiver that implements the Layer 1 |
| 137 | physical layer of a BTS comprising the following 3GPP specifications: |
| 138 | |
| 139 | TS 05.01 "Physical layer on the radio path" |
| 140 | TS 05.02 "Multiplexing and Multiple Access on the Radio Path" |
| 141 | TS 05.04 "Modulation" |
| 142 | TS 05.10 "Radio subsystem synchronization" |
| 143 | |
| 144 | In this context, BTS is "Base transceiver station". It's the stations that |
| 145 | connect mobile phones to the mobile network. |
| 146 | |
| 147 | 3GPP is the "3rd Generation Partnership Project" which is the collaboration |
| 148 | between different telecommunication associations for developing new |
| 149 | generations of mobile phone networks. (post-2G/GSM) |
| 150 | |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 151 | %prep |
| 152 | %setup -q |
| 153 | |
| 154 | %build |
| 155 | echo "%{version}" >.tarball-version |
| 156 | autoreconf -fi |
Oliver Smith | 7bbe19e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 157 | |
| 158 | %if 0%{?centos_ver} |
| 159 | %configure \ |
| 160 | --docdir=%{_docdir}/%{name} \ |
| 161 | --with-systemdsystemunitdir=%{_unitdir} \ |
| 162 | --without-lms \ |
| 163 | --with-uhd \ |
Oliver Smith | 7cc7e3d | 2020-05-19 13:24:46 +0200 | [diff] [blame] | 164 | --without-usrp1 \ |
| 165 | --with-ipc |
Oliver Smith | 7bbe19e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 166 | %else |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 167 | %configure \ |
| 168 | --docdir=%{_docdir}/%{name} \ |
| 169 | --with-systemdsystemunitdir=%{_unitdir} \ |
| 170 | --with-lms \ |
| 171 | --with-uhd \ |
Oliver Smith | 7cc7e3d | 2020-05-19 13:24:46 +0200 | [diff] [blame] | 172 | --with-usrp1 \ |
| 173 | --with-ipc |
Oliver Smith | 7bbe19e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 174 | %endif |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 175 | |
| 176 | make %{?_smp_mflags} V=1 |
| 177 | |
| 178 | %check |
| 179 | make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +) |
| 180 | |
| 181 | %install |
| 182 | %make_install |
| 183 | %fdupes -s %{buildroot}/%{_datadir} |
| 184 | |
Oliver Smith | 7bbe19e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 185 | %if 0%{?suse_version} |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 186 | %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 Smith | 7cc7e3d | 2020-05-19 13:24:46 +0200 | [diff] [blame] | 198 | %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 Smith | 7bbe19e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 202 | %endif |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 203 | |
| 204 | %files |
| 205 | %license COPYING |
| 206 | %doc README.md |
| 207 | %doc %{_docdir}/%{name}/examples |
| 208 | |
Oliver Smith | 7bbe19e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 209 | %if ! 0%{?centos_ver} |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 210 | %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 Smith | 7bbe19e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 215 | %endif |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 216 | |
| 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 Smith | 7bbe19e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 223 | %if ! 0%{?centos_ver} |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 224 | %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 Smith | 7bbe19e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 232 | %endif |
Oliver Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 233 | |
Oliver Smith | 7cc7e3d | 2020-05-19 13:24:46 +0200 | [diff] [blame] | 234 | %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 Smith | f669bf4 | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 241 | %changelog |