blob: 150a8ecf9b448e8f91bf49714321f3c3ae4041d8 [file] [log] [blame]
Oliver Smith81022c82020-05-14 11:51:40 +02001#
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 Welte5a3a0b12021-12-09 09:09:49 +010015%define sover 2
Oliver Smith81022c82020-05-14 11:51:40 +020016Name: osmo-remsim
Oliver Smith54797c42020-05-14 11:52:23 +020017Version: @VERSION@
Oliver Smith81022c82020-05-14 11:51:40 +020018Release: 0
19Summary: Osmocom remote SIM software suite
20License: GPL-2.0-or-later
21Group: Productivity/Telephony/Servers
Oliver Smith54797c42020-05-14 11:52:23 +020022URL: https://osmocom.org/projects/osmo-remsim
Oliver Smith81022c82020-05-14 11:51:40 +020023Source: %{name}-%{version}.tar.xz
24BuildRequires: autoconf
25BuildRequires: automake
26BuildRequires: libcsv-devel
27BuildRequires: libtool
28BuildRequires: pkgconfig
Oliver Smith54797c42020-05-14 11:52:23 +020029%if 0%{?suse_version}
Oliver Smith81022c82020-05-14 11:51:40 +020030BuildRequires: systemd-rpm-macros
Oliver Smith54797c42020-05-14 11:52:23 +020031%endif
Oliver Smith81022c82020-05-14 11:51:40 +020032BuildRequires: pkgconfig(libasn1c) >= 0.9.30
33BuildRequires: pkgconfig(libosmoabis)
Harald Welte507070d2021-12-09 07:59:30 +010034BuildRequires: pkgconfig(libosmocore) >= 1.6.0
Oliver Smith81022c82020-05-14 11:51:40 +020035BuildRequires: pkgconfig(libosmogsm) >= 0.11.0
36BuildRequires: pkgconfig(libosmosim)
37BuildRequires: pkgconfig(libpcsclite)
38BuildRequires: pkgconfig(libulfius)
39BuildRequires: pkgconfig(libusb-1.0)
40BuildRequires: pkgconfig(libosmousb)
Harald Welte7382eb32021-12-09 08:17:43 +010041BuildRequires: pkgconfig(libosmo-simtrace2) >= 0.8.0
Oliver Smith54797c42020-05-14 11:52:23 +020042%{?systemd_requires}
Oliver Smith81022c82020-05-14 11:51:40 +020043
44%description
45osmo-remsim is a suite of software programs enabling physical/geographic
46separation of a cellular phone (or modem) on the one hand side and the
47SIM/USIM/ISIM card on the other side.
48
49Using osmo-remsim, you can operate an entire fleet of modems/phones, as
50well as banks of SIM cards and dynamically establish or remove the
51connections between modems/phones and cards.
52
53So in technical terms, it behaves like a proxy for the ISO 7816 smart
54card interface between the MS/UE and the UICC/SIM/USIM/ISIM.
55
56While originally designed to be used in context of cellular networks,
57there is nothing cellular specific in the system. It can therefore also
58be used with other systems that use contact based smart cards according
59to ISO 7816. Currently only the T=0 protocol with standard
60(non-extended) APDUs is supported. Both T=1 and extended APDU support
61can easily be added as a pure software update, should it be required at
62some future point.
63
64%package -n libosmo-rspro%{sover}
65Summary: Osmocom Remote SIM - Shared Library
66License: GPL-2.0-or-later
67Group: System/Libraries
68
69%description -n libosmo-rspro%{sover}
70libosmo-rsrpo is an utility library for encoding/decoding the ASN.1 BER
71based RSPRO (Remote SIM Protocol) protocol used between the osmo-remsim
72programs.
73
74%package -n libosmo-rspro-devel
75Summary: Osmocom Remote SIM - Shared Library Development Haders
76License: GPL-2.0-or-later
77Group: Development/Libraries/C and C++
78Requires: libosmo-rspro%{sover} = %{version}
79
80%description -n libosmo-rspro-devel
81libosmo-rsrpo is an utility library for encoding/decoding the ASN.1 BER
82based RSPRO (Remote SIM Protocol) protocol used between the osmo-remsim
83programs.
84
85This subpackage contains libraries and header files for developing
86applications that want to make use of libosmo-rspro.
87
88%package -n osmo-remsim-server
89Summary: Osmocom Remote SIM - Central Server
90License: GPL-2.0-or-later
91Group: Productivity/Telephony/Servers
92
93%description -n osmo-remsim-server
94The remsim-server is the central element of a osmo-remsim deployment,
95it maintains a list of clients + bankds connected to it, as well as the
96dynamic SIM card mappings between them.
97
Harald Welte4e0e5b82022-07-11 22:29:40 +020098%package -n osmo-remsim-apitool
99Summary: Osmocom Remote SIM - API tool for Server
100License: GPL-2.0-or-later
101Group: Productivity/Telephony/Servers
102Requires: python3
103
104%description -n osmo-remsim-apitool
105This is a small python tool for generating API requests to remsim-server,
106which can be used by the system administrator to introspect and/or modify
107the state (mostly slotmaps).
108
Oliver Smith81022c82020-05-14 11:51:40 +0200109%package -n osmo-remsim-bankd
110Summary: Osmocom Remote SIM - Bank Daemon
111License: GPL-2.0-or-later
112Group: Productivity/Telephony/Servers
113
114%description -n osmo-remsim-bankd
115The remsim-bankd is managing a bank of SIM card readers and their
116respective cards. It establishes a control connection to remsim-server
117and receives inbound connections from remsim-clients.
118
119%package -n osmo-remsim-client-st2
120Summary: Osmocom Remote SIM - Client for SIMtrace2
121License: GPL-2.0-or-later
122Group: Productivity/Telephony/Servers
123
124%description -n osmo-remsim-client-st2
125Description: Osmocom Remote SIM - Client for SIMtrace2 cardem firmware
126The remsim-client is managing a given phone/modem. It attaches to the
127'cardem' firmware of a SIMtrcace2 (or compatible, such as sysmoQMOD)
128hardware and forwards the SIM card communication to a remsim-bankd,
129under the control of remsim-server.
130
131%package -n osmo-remsim-client-shell
132Summary: Osmocom Remote SIM - Interactive Client
133License: GPL-2.0-or-later
134Group: Productivity/Telephony/Servers
135
136%description -n osmo-remsim-client-shell
137The remsim-client-shell is for manually interacting with a remote SIM
138card via remsim-bankd + remsim-server. It's mostly a test/debug tool.
139
140%package -n libifd-osmo-remsim-client0
141Summary: Osmocom Remote SIM Client - PC/SC driver
142License: GPL-2.0-or-later
143Group: Productivity/Telephony/Servers
144Requires: pcsc-lite
145
146%description -n libifd-osmo-remsim-client0
147This is an incarnation of osmo-remsim-client which can plug as ifd_handler
148driver into pcscd. This means you can use remote smart cards managed
149by osmo-remsim-server via normal PC/SC applications.
150
151%prep
152%setup -q
153
154%build
155echo "%{version}" >.tarball-version
156autoreconf -fi
157%configure \
158 --disable-static \
Oliver Smith694e3b52021-06-23 12:26:18 +0200159 --docdir=%{_docdir}/osmo-remsim \
Oliver Smith81022c82020-05-14 11:51:40 +0200160 --with-systemdsystemunitdir=%{_unitdir}
161make V=1 %{?_smp_mflags}
162
163%install
164%make_install
165find %{buildroot} -type f -name "*.la" -delete -print
166
167%check
168make %{?_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 Smith54797c42020-05-14 11:52:23 +0200173%if 0%{?suse_version}
Oliver Smith81022c82020-05-14 11:51:40 +0200174%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 Smith54797c42020-05-14 11:52:23 +0200188%endif
Oliver Smith81022c82020-05-14 11:51:40 +0200189
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 Smith81022c82020-05-14 11:51:40 +0200196%dir %{_includedir}/osmocom/rspro
Oliver Smith54797c42020-05-14 11:52:23 +0200197%{_includedir}/osmocom/rspro/*
Oliver Smith81022c82020-05-14 11:51:40 +0200198%{_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 Welte4e0e5b82022-07-11 22:29:40 +0200205%files -n osmo-remsim-server
206%{_bindir}/osmo-remsim-apitool
207
Oliver Smith81022c82020-05-14 11:51:40 +0200208%files -n osmo-remsim-bankd
209%{_bindir}/osmo-remsim-bankd
210%{_unitdir}/osmo-remsim-bankd.service
Harald Welteb80fcf02020-06-22 15:21:45 +0200211%config(noreplace) %{_sysconfdir}/default/osmo-remsim-bankd
Oliver Smith694e3b52021-06-23 12:26:18 +0200212%dir %{_sysconfdir}/osmocom
Oliver Smith905bc4d2021-06-22 17:22:26 +0200213%config(noreplace) %{_sysconfdir}/osmocom/bankd_pcsc_slots.csv
Oliver Smith694e3b52021-06-23 12:26:18 +0200214%dir %{_docdir}/osmo-remsim
215%dir %{_docdir}/osmo-remsim/examples
Oliver Smith588ec1a2021-06-23 10:33:57 +0200216%{_docdir}/osmo-remsim/examples/bankd_pcsc_slots.csv
Oliver Smith81022c82020-05-14 11:51:40 +0200217
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 Welteb80fcf02020-06-22 15:21:45 +0200224%config(noreplace) %{_sysconfdir}/default/osmo-remsim-client*
Oliver Smith81022c82020-05-14 11:51:40 +0200225
226%files -n libifd-osmo-remsim-client0
Oliver Smith54797c42020-05-14 11:52:23 +0200227%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 Smith81022c82020-05-14 11:51:40 +0200231%dir %{_libdir}/readers/libifd-osmo-remsim-client.bundle
Oliver Smith54797c42020-05-14 11:52:23 +0200232%{_libdir}/readers/libifd-osmo-remsim-client.bundle/*
233%endif
Harald Welteb80fcf02020-06-22 15:21:45 +0200234%config(noreplace) %{_sysconfdir}/reader.conf.d/osmo-remsim-client-reader_conf
Oliver Smith81022c82020-05-14 11:51:40 +0200235
236%changelog