Oliver Smith | b74e08e | 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 | b74e08e | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 15 | Name: osmo-trx |
Oliver Smith | c25356e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 16 | Version: 0.0.0 |
Oliver Smith | b74e08e | 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 |
| 21 | URL: https://osmocom.org/projects/osmotrx/wiki/OsmoTRX |
| 22 | Source: %{name}-%{version}.tar.xz |
Oliver Smith | b74e08e | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 23 | BuildRequires: autoconf |
| 24 | BuildRequires: automake |
Oliver Smith | c25356e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 25 | %if 0%{?suse_version} |
Oliver Smith | b74e08e | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 26 | BuildRequires: fdupes |
Oliver Smith | c25356e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 27 | %endif |
Oliver Smith | b74e08e | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 28 | BuildRequires: gcc-c++ |
| 29 | BuildRequires: libtool |
| 30 | BuildRequires: pkgconfig >= 0.20 |
Oliver Smith | c25356e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 31 | %if ! 0%{?centos_ver} |
Oliver Smith | b74e08e | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 32 | BuildRequires: pkgconfig(LimeSuite) |
Oliver Smith | c25356e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 33 | BuildRequires: pkgconfig(usrp) >= 3.3 |
| 34 | %endif |
Oliver Smith | b74e08e | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 35 | BuildRequires: pkgconfig(fftw3f) |
Oliver Smith | c25356e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 36 | BuildRequires: pkgconfig(libosmocoding) >= 1.3.0 |
Oliver Smith | b74e08e | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 37 | BuildRequires: pkgconfig(libosmocore) >= 0.12.0 |
| 38 | BuildRequires: pkgconfig(libosmoctrl) >= 0.12.0 |
| 39 | BuildRequires: pkgconfig(libosmovty) >= 0.12.0 |
| 40 | BuildRequires: pkgconfig(libusb-1.0) |
| 41 | BuildRequires: pkgconfig(uhd) |
Oliver Smith | b74e08e | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 42 | %{?systemd_requires} |
| 43 | %if 0%{?suse_version} > 1325 |
| 44 | BuildRequires: libboost_program_options-devel |
| 45 | BuildRequires: libboost_system-devel |
| 46 | BuildRequires: libboost_test-devel |
| 47 | BuildRequires: libboost_thread-devel |
| 48 | %else |
| 49 | BuildRequires: boost-devel |
| 50 | %endif |
| 51 | |
| 52 | %description |
| 53 | OsmoTRX is a software-defined radio transceiver that implements the Layer 1 |
| 54 | physical layer of a BTS comprising the following 3GPP specifications: |
| 55 | |
| 56 | TS 05.01 "Physical layer on the radio path" |
| 57 | TS 05.02 "Multiplexing and Multiple Access on the Radio Path" |
| 58 | TS 05.04 "Modulation" |
| 59 | TS 05.10 "Radio subsystem synchronization" |
| 60 | |
| 61 | In this context, BTS is "Base transceiver station". It's the stations that |
| 62 | connect mobile phones to the mobile network. |
| 63 | |
| 64 | 3GPP is the "3rd Generation Partnership Project" which is the collaboration |
| 65 | between different telecommunication associations for developing new |
| 66 | generations of mobile phone networks. (post-2G/GSM) |
| 67 | |
| 68 | %package uhd |
| 69 | Summary: SDR transceiver that implements Layer 1 of a GSM BTS (UHD) |
| 70 | Group: Productivity/Telephony/Servers |
| 71 | |
| 72 | %description uhd |
| 73 | OsmoTRX is a software-defined radio transceiver that implements the Layer 1 |
| 74 | physical layer of a BTS comprising the following 3GPP specifications: |
| 75 | |
| 76 | TS 05.01 "Physical layer on the radio path" |
| 77 | TS 05.02 "Multiplexing and Multiple Access on the Radio Path" |
| 78 | TS 05.04 "Modulation" |
| 79 | TS 05.10 "Radio subsystem synchronization" |
| 80 | |
| 81 | In this context, BTS is "Base transceiver station". It's the stations that |
| 82 | connect mobile phones to the mobile network. |
| 83 | |
| 84 | 3GPP is the "3rd Generation Partnership Project" which is the collaboration |
| 85 | between different telecommunication associations for developing new |
| 86 | generations of mobile phone networks. (post-2G/GSM) |
| 87 | |
Oliver Smith | c25356e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 88 | %if ! 0%{?centos_ver} |
Oliver Smith | b74e08e | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 89 | %package usrp1 |
| 90 | Summary: SDR transceiver that implements Layer 1 of a GSM BTS (USRP1) |
| 91 | Group: Productivity/Telephony/Servers |
| 92 | |
| 93 | %description usrp1 |
| 94 | OsmoTRX is a software-defined radio transceiver that implements the Layer 1 |
| 95 | physical layer of a BTS comprising the following 3GPP specifications: |
| 96 | |
| 97 | TS 05.01 "Physical layer on the radio path" |
| 98 | TS 05.02 "Multiplexing and Multiple Access on the Radio Path" |
| 99 | TS 05.04 "Modulation" |
| 100 | TS 05.10 "Radio subsystem synchronization" |
| 101 | |
| 102 | In this context, BTS is "Base transceiver station". It's the stations that |
| 103 | connect mobile phones to the mobile network. |
| 104 | |
| 105 | 3GPP is the "3rd Generation Partnership Project" which is the collaboration |
| 106 | between different telecommunication associations for developing new |
| 107 | generations of mobile phone networks. (post-2G/GSM) |
| 108 | |
| 109 | %package lms |
| 110 | Summary: SDR transceiver that implements Layer 1 of a GSM BTS (LimeSuite) |
| 111 | Group: Productivity/Telephony/Servers |
| 112 | |
| 113 | %description lms |
| 114 | OsmoTRX is a software-defined radio transceiver that implements the Layer 1 |
| 115 | physical layer of a BTS comprising the following 3GPP specifications: |
| 116 | |
| 117 | TS 05.01 "Physical layer on the radio path" |
| 118 | TS 05.02 "Multiplexing and Multiple Access on the Radio Path" |
| 119 | TS 05.04 "Modulation" |
| 120 | TS 05.10 "Radio subsystem synchronization" |
| 121 | |
| 122 | In this context, BTS is "Base transceiver station". It's the stations that |
| 123 | connect mobile phones to the mobile network. |
| 124 | |
| 125 | 3GPP is the "3rd Generation Partnership Project" which is the collaboration |
| 126 | between different telecommunication associations for developing new |
| 127 | generations of mobile phone networks. (post-2G/GSM) |
Oliver Smith | c25356e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 128 | %endif |
Oliver Smith | b74e08e | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 129 | |
| 130 | %prep |
| 131 | %setup -q |
| 132 | |
| 133 | %build |
| 134 | echo "%{version}" >.tarball-version |
| 135 | autoreconf -fi |
Oliver Smith | c25356e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 136 | |
| 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 Smith | b74e08e | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 145 | %configure \ |
| 146 | --docdir=%{_docdir}/%{name} \ |
| 147 | --with-systemdsystemunitdir=%{_unitdir} \ |
| 148 | --with-lms \ |
| 149 | --with-uhd \ |
| 150 | --with-usrp1 |
Oliver Smith | c25356e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 151 | %endif |
Oliver Smith | b74e08e | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 152 | |
| 153 | make %{?_smp_mflags} V=1 |
| 154 | |
| 155 | %check |
| 156 | make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +) |
| 157 | |
| 158 | %install |
| 159 | %make_install |
Oliver Smith | c25356e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 160 | %if 0%{?suse_version} |
Oliver Smith | b74e08e | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 161 | %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 Smith | c25356e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 175 | %endif |
Oliver Smith | b74e08e | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 176 | |
| 177 | %files |
| 178 | %license COPYING |
| 179 | %doc README.md |
| 180 | %doc %{_docdir}/%{name}/examples |
| 181 | |
Oliver Smith | c25356e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 182 | %if ! 0%{?centos_ver} |
Oliver Smith | b74e08e | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 183 | %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 Smith | c25356e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 188 | %endif |
Oliver Smith | b74e08e | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 189 | |
| 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 Smith | c25356e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 196 | %if ! 0%{?centos_ver} |
Oliver Smith | b74e08e | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 197 | %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 Smith | c25356e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 205 | %endif |
Oliver Smith | b74e08e | 2020-05-14 11:54:22 +0200 | [diff] [blame] | 206 | |
| 207 | %changelog |