Oliver Smith | 81022c8 | 2020-05-14 11:51:40 +0200 | [diff] [blame] | 1 | # |
| 2 | # spec file for package osmo-remsim |
| 3 | # |
| 4 | # Copyright (c) 2018, 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 | |
Harald Welte | 5a3a0b1 | 2021-12-09 09:09:49 +0100 | [diff] [blame] | 15 | %define sover 2 |
Oliver Smith | 81022c8 | 2020-05-14 11:51:40 +0200 | [diff] [blame] | 16 | Name: osmo-remsim |
Oliver Smith | 54797c4 | 2020-05-14 11:52:23 +0200 | [diff] [blame] | 17 | Version: @VERSION@ |
Oliver Smith | 81022c8 | 2020-05-14 11:51:40 +0200 | [diff] [blame] | 18 | Release: 0 |
| 19 | Summary: Osmocom remote SIM software suite |
| 20 | License: GPL-2.0-or-later |
| 21 | Group: Productivity/Telephony/Servers |
Oliver Smith | 54797c4 | 2020-05-14 11:52:23 +0200 | [diff] [blame] | 22 | URL: https://osmocom.org/projects/osmo-remsim |
Oliver Smith | 81022c8 | 2020-05-14 11:51:40 +0200 | [diff] [blame] | 23 | Source: %{name}-%{version}.tar.xz |
| 24 | BuildRequires: autoconf |
| 25 | BuildRequires: automake |
| 26 | BuildRequires: libcsv-devel |
| 27 | BuildRequires: libtool |
| 28 | BuildRequires: pkgconfig |
Oliver Smith | 54797c4 | 2020-05-14 11:52:23 +0200 | [diff] [blame] | 29 | %if 0%{?suse_version} |
Oliver Smith | 81022c8 | 2020-05-14 11:51:40 +0200 | [diff] [blame] | 30 | BuildRequires: systemd-rpm-macros |
Oliver Smith | 54797c4 | 2020-05-14 11:52:23 +0200 | [diff] [blame] | 31 | %endif |
Oliver Smith | 81022c8 | 2020-05-14 11:51:40 +0200 | [diff] [blame] | 32 | BuildRequires: pkgconfig(libasn1c) >= 0.9.30 |
| 33 | BuildRequires: pkgconfig(libosmoabis) |
Harald Welte | 507070d | 2021-12-09 07:59:30 +0100 | [diff] [blame] | 34 | BuildRequires: pkgconfig(libosmocore) >= 1.6.0 |
Oliver Smith | 81022c8 | 2020-05-14 11:51:40 +0200 | [diff] [blame] | 35 | BuildRequires: pkgconfig(libosmogsm) >= 0.11.0 |
| 36 | BuildRequires: pkgconfig(libosmosim) |
| 37 | BuildRequires: pkgconfig(libpcsclite) |
| 38 | BuildRequires: pkgconfig(libulfius) |
| 39 | BuildRequires: pkgconfig(libusb-1.0) |
| 40 | BuildRequires: pkgconfig(libosmousb) |
Harald Welte | 7382eb3 | 2021-12-09 08:17:43 +0100 | [diff] [blame] | 41 | BuildRequires: pkgconfig(libosmo-simtrace2) >= 0.8.0 |
Oliver Smith | 54797c4 | 2020-05-14 11:52:23 +0200 | [diff] [blame] | 42 | %{?systemd_requires} |
Oliver Smith | 81022c8 | 2020-05-14 11:51:40 +0200 | [diff] [blame] | 43 | |
| 44 | %description |
| 45 | osmo-remsim is a suite of software programs enabling physical/geographic |
| 46 | separation of a cellular phone (or modem) on the one hand side and the |
| 47 | SIM/USIM/ISIM card on the other side. |
| 48 | |
| 49 | Using osmo-remsim, you can operate an entire fleet of modems/phones, as |
| 50 | well as banks of SIM cards and dynamically establish or remove the |
| 51 | connections between modems/phones and cards. |
| 52 | |
| 53 | So in technical terms, it behaves like a proxy for the ISO 7816 smart |
| 54 | card interface between the MS/UE and the UICC/SIM/USIM/ISIM. |
| 55 | |
| 56 | While originally designed to be used in context of cellular networks, |
| 57 | there is nothing cellular specific in the system. It can therefore also |
| 58 | be used with other systems that use contact based smart cards according |
| 59 | to ISO 7816. Currently only the T=0 protocol with standard |
| 60 | (non-extended) APDUs is supported. Both T=1 and extended APDU support |
| 61 | can easily be added as a pure software update, should it be required at |
| 62 | some future point. |
| 63 | |
| 64 | %package -n libosmo-rspro%{sover} |
| 65 | Summary: Osmocom Remote SIM - Shared Library |
| 66 | License: GPL-2.0-or-later |
| 67 | Group: System/Libraries |
| 68 | |
| 69 | %description -n libosmo-rspro%{sover} |
| 70 | libosmo-rsrpo is an utility library for encoding/decoding the ASN.1 BER |
| 71 | based RSPRO (Remote SIM Protocol) protocol used between the osmo-remsim |
| 72 | programs. |
| 73 | |
| 74 | %package -n libosmo-rspro-devel |
| 75 | Summary: Osmocom Remote SIM - Shared Library Development Haders |
| 76 | License: GPL-2.0-or-later |
| 77 | Group: Development/Libraries/C and C++ |
| 78 | Requires: libosmo-rspro%{sover} = %{version} |
| 79 | |
| 80 | %description -n libosmo-rspro-devel |
| 81 | libosmo-rsrpo is an utility library for encoding/decoding the ASN.1 BER |
| 82 | based RSPRO (Remote SIM Protocol) protocol used between the osmo-remsim |
| 83 | programs. |
| 84 | |
| 85 | This subpackage contains libraries and header files for developing |
| 86 | applications that want to make use of libosmo-rspro. |
| 87 | |
| 88 | %package -n osmo-remsim-server |
| 89 | Summary: Osmocom Remote SIM - Central Server |
| 90 | License: GPL-2.0-or-later |
| 91 | Group: Productivity/Telephony/Servers |
| 92 | |
| 93 | %description -n osmo-remsim-server |
| 94 | The remsim-server is the central element of a osmo-remsim deployment, |
| 95 | it maintains a list of clients + bankds connected to it, as well as the |
| 96 | dynamic SIM card mappings between them. |
| 97 | |
Harald Welte | 4e0e5b8 | 2022-07-11 22:29:40 +0200 | [diff] [blame] | 98 | %package -n osmo-remsim-apitool |
| 99 | Summary: Osmocom Remote SIM - API tool for Server |
| 100 | License: GPL-2.0-or-later |
| 101 | Group: Productivity/Telephony/Servers |
| 102 | Requires: python3 |
| 103 | |
| 104 | %description -n osmo-remsim-apitool |
| 105 | This is a small python tool for generating API requests to remsim-server, |
| 106 | which can be used by the system administrator to introspect and/or modify |
| 107 | the state (mostly slotmaps). |
| 108 | |
Oliver Smith | 81022c8 | 2020-05-14 11:51:40 +0200 | [diff] [blame] | 109 | %package -n osmo-remsim-bankd |
| 110 | Summary: Osmocom Remote SIM - Bank Daemon |
| 111 | License: GPL-2.0-or-later |
| 112 | Group: Productivity/Telephony/Servers |
| 113 | |
| 114 | %description -n osmo-remsim-bankd |
| 115 | The remsim-bankd is managing a bank of SIM card readers and their |
| 116 | respective cards. It establishes a control connection to remsim-server |
| 117 | and receives inbound connections from remsim-clients. |
| 118 | |
| 119 | %package -n osmo-remsim-client-st2 |
| 120 | Summary: Osmocom Remote SIM - Client for SIMtrace2 |
| 121 | License: GPL-2.0-or-later |
| 122 | Group: Productivity/Telephony/Servers |
| 123 | |
| 124 | %description -n osmo-remsim-client-st2 |
| 125 | Description: Osmocom Remote SIM - Client for SIMtrace2 cardem firmware |
| 126 | The remsim-client is managing a given phone/modem. It attaches to the |
| 127 | 'cardem' firmware of a SIMtrcace2 (or compatible, such as sysmoQMOD) |
| 128 | hardware and forwards the SIM card communication to a remsim-bankd, |
| 129 | under the control of remsim-server. |
| 130 | |
| 131 | %package -n osmo-remsim-client-shell |
| 132 | Summary: Osmocom Remote SIM - Interactive Client |
| 133 | License: GPL-2.0-or-later |
| 134 | Group: Productivity/Telephony/Servers |
| 135 | |
| 136 | %description -n osmo-remsim-client-shell |
| 137 | The remsim-client-shell is for manually interacting with a remote SIM |
| 138 | card via remsim-bankd + remsim-server. It's mostly a test/debug tool. |
| 139 | |
| 140 | %package -n libifd-osmo-remsim-client0 |
| 141 | Summary: Osmocom Remote SIM Client - PC/SC driver |
| 142 | License: GPL-2.0-or-later |
| 143 | Group: Productivity/Telephony/Servers |
| 144 | Requires: pcsc-lite |
| 145 | |
| 146 | %description -n libifd-osmo-remsim-client0 |
| 147 | This is an incarnation of osmo-remsim-client which can plug as ifd_handler |
| 148 | driver into pcscd. This means you can use remote smart cards managed |
| 149 | by osmo-remsim-server via normal PC/SC applications. |
| 150 | |
| 151 | %prep |
| 152 | %setup -q |
| 153 | |
| 154 | %build |
| 155 | echo "%{version}" >.tarball-version |
| 156 | autoreconf -fi |
| 157 | %configure \ |
| 158 | --disable-static \ |
Oliver Smith | 694e3b5 | 2021-06-23 12:26:18 +0200 | [diff] [blame] | 159 | --docdir=%{_docdir}/osmo-remsim \ |
Oliver Smith | 81022c8 | 2020-05-14 11:51:40 +0200 | [diff] [blame] | 160 | --with-systemdsystemunitdir=%{_unitdir} |
| 161 | make V=1 %{?_smp_mflags} |
| 162 | |
| 163 | %install |
| 164 | %make_install |
| 165 | find %{buildroot} -type f -name "*.la" -delete -print |
| 166 | |
| 167 | %check |
| 168 | make %{?_smp_mflags} check || find . -name testsuite.log -exec cat {} + |
| 169 | |
| 170 | %post -n libosmo-rspro%{sover} -p /sbin/ldconfig |
| 171 | %postun -n libosmo-rspro%{sover} -p /sbin/ldconfig |
| 172 | |
Oliver Smith | 54797c4 | 2020-05-14 11:52:23 +0200 | [diff] [blame] | 173 | %if 0%{?suse_version} |
Oliver Smith | 81022c8 | 2020-05-14 11:51:40 +0200 | [diff] [blame] | 174 | %pre -n osmo-remsim-bankd %service_add_pre osmo-remsim-bankd.service |
| 175 | %post -n osmo-remsim-bankd %service_add_post osmo-remsim-bankd.service |
| 176 | %preun -n osmo-remsim-bankd %service_del_preun osmo-remsim-bankd.service |
| 177 | %postun -n osmo-remsim-bankd %service_del_postun osmo-remsim-bankd.service |
| 178 | |
| 179 | %pre -n osmo-remsim-client-st2 %service_add_pre osmo-remsim-client@.service |
| 180 | %post -n osmo-remsim-client-st2 %service_add_post osmo-remsim-client@.service |
| 181 | %preun -n osmo-remsim-client-st2 %service_del_preun osmo-remsim-client@.service |
| 182 | %postun -n osmo-remsim-client-st2 %service_del_postun osmo-remsim-client@.service |
| 183 | |
| 184 | %pre -n osmo-remsim-server %service_add_pre osmo-remsim-server.service |
| 185 | %post -n osmo-remsim-server %service_add_post osmo-remsim-server.service |
| 186 | %preun -n osmo-remsim-server %service_del_preun osmo-remsim-server.service |
| 187 | %postun -n osmo-remsim-server %service_del_postun osmo-remsim-server.service |
Oliver Smith | 54797c4 | 2020-05-14 11:52:23 +0200 | [diff] [blame] | 188 | %endif |
Oliver Smith | 81022c8 | 2020-05-14 11:51:40 +0200 | [diff] [blame] | 189 | |
| 190 | %files -n libosmo-rspro%{sover} |
| 191 | %license COPYING |
| 192 | %doc README.md |
| 193 | %{_libdir}/libosmo-rspro.so.%{sover}* |
| 194 | |
| 195 | %files -n libosmo-rspro-devel |
Oliver Smith | 81022c8 | 2020-05-14 11:51:40 +0200 | [diff] [blame] | 196 | %dir %{_includedir}/osmocom/rspro |
Oliver Smith | 54797c4 | 2020-05-14 11:52:23 +0200 | [diff] [blame] | 197 | %{_includedir}/osmocom/rspro/* |
Oliver Smith | 81022c8 | 2020-05-14 11:51:40 +0200 | [diff] [blame] | 198 | %{_libdir}/libosmo-rspro.so |
| 199 | %{_libdir}/pkgconfig/libosmo-rspro.pc |
| 200 | |
| 201 | %files -n osmo-remsim-server |
| 202 | %{_bindir}/osmo-remsim-server |
| 203 | %{_unitdir}/osmo-remsim-server.service |
| 204 | |
Harald Welte | 6cfce3b | 2022-07-15 08:21:10 +0200 | [diff] [blame^] | 205 | %files -n osmo-remsim-apitool |
Harald Welte | 4e0e5b8 | 2022-07-11 22:29:40 +0200 | [diff] [blame] | 206 | %{_bindir}/osmo-remsim-apitool |
| 207 | |
Oliver Smith | 81022c8 | 2020-05-14 11:51:40 +0200 | [diff] [blame] | 208 | %files -n osmo-remsim-bankd |
| 209 | %{_bindir}/osmo-remsim-bankd |
| 210 | %{_unitdir}/osmo-remsim-bankd.service |
Harald Welte | b80fcf0 | 2020-06-22 15:21:45 +0200 | [diff] [blame] | 211 | %config(noreplace) %{_sysconfdir}/default/osmo-remsim-bankd |
Oliver Smith | 694e3b5 | 2021-06-23 12:26:18 +0200 | [diff] [blame] | 212 | %dir %{_sysconfdir}/osmocom |
Oliver Smith | 905bc4d | 2021-06-22 17:22:26 +0200 | [diff] [blame] | 213 | %config(noreplace) %{_sysconfdir}/osmocom/bankd_pcsc_slots.csv |
Oliver Smith | 694e3b5 | 2021-06-23 12:26:18 +0200 | [diff] [blame] | 214 | %dir %{_docdir}/osmo-remsim |
| 215 | %dir %{_docdir}/osmo-remsim/examples |
Oliver Smith | 588ec1a | 2021-06-23 10:33:57 +0200 | [diff] [blame] | 216 | %{_docdir}/osmo-remsim/examples/bankd_pcsc_slots.csv |
Oliver Smith | 81022c8 | 2020-05-14 11:51:40 +0200 | [diff] [blame] | 217 | |
| 218 | %files -n osmo-remsim-client-shell |
| 219 | %{_bindir}/osmo-remsim-client-shell |
| 220 | |
| 221 | %files -n osmo-remsim-client-st2 |
| 222 | %{_bindir}/osmo-remsim-client-st2 |
| 223 | %{_unitdir}/osmo-remsim-client* |
Harald Welte | b80fcf0 | 2020-06-22 15:21:45 +0200 | [diff] [blame] | 224 | %config(noreplace) %{_sysconfdir}/default/osmo-remsim-client* |
Oliver Smith | 81022c8 | 2020-05-14 11:51:40 +0200 | [diff] [blame] | 225 | |
| 226 | %files -n libifd-osmo-remsim-client0 |
Oliver Smith | 54797c4 | 2020-05-14 11:52:23 +0200 | [diff] [blame] | 227 | %if 0%{?centos_ver} |
| 228 | %dir %{_libdir}/pcsc/drivers/libifd-osmo-remsim-client.bundle |
| 229 | %{_libdir}/pcsc/drivers/libifd-osmo-remsim-client.bundle/* |
| 230 | %else |
Oliver Smith | 81022c8 | 2020-05-14 11:51:40 +0200 | [diff] [blame] | 231 | %dir %{_libdir}/readers/libifd-osmo-remsim-client.bundle |
Oliver Smith | 54797c4 | 2020-05-14 11:52:23 +0200 | [diff] [blame] | 232 | %{_libdir}/readers/libifd-osmo-remsim-client.bundle/* |
| 233 | %endif |
Harald Welte | b80fcf0 | 2020-06-22 15:21:45 +0200 | [diff] [blame] | 234 | %config(noreplace) %{_sysconfdir}/reader.conf.d/osmo-remsim-client-reader_conf |
Oliver Smith | 81022c8 | 2020-05-14 11:51:40 +0200 | [diff] [blame] | 235 | |
| 236 | %changelog |