blob: 7c67b122138fb98461bbaaf321e6479121a0ecc2 [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
Oliver Smithc69d5c82022-12-08 16:33:39 +0100103Requires: python3-requests
Harald Welte4e0e5b82022-07-11 22:29:40 +0200104
105%description -n osmo-remsim-apitool
106This is a small python tool for generating API requests to remsim-server,
107which can be used by the system administrator to introspect and/or modify
108the state (mostly slotmaps).
109
Oliver Smith81022c82020-05-14 11:51:40 +0200110%package -n osmo-remsim-bankd
111Summary: Osmocom Remote SIM - Bank Daemon
112License: GPL-2.0-or-later
113Group: Productivity/Telephony/Servers
114
115%description -n osmo-remsim-bankd
116The remsim-bankd is managing a bank of SIM card readers and their
117respective cards. It establishes a control connection to remsim-server
118and receives inbound connections from remsim-clients.
119
120%package -n osmo-remsim-client-st2
121Summary: Osmocom Remote SIM - Client for SIMtrace2
122License: GPL-2.0-or-later
123Group: Productivity/Telephony/Servers
124
125%description -n osmo-remsim-client-st2
126Description: Osmocom Remote SIM - Client for SIMtrace2 cardem firmware
127The remsim-client is managing a given phone/modem. It attaches to the
128'cardem' firmware of a SIMtrcace2 (or compatible, such as sysmoQMOD)
129hardware and forwards the SIM card communication to a remsim-bankd,
130under the control of remsim-server.
131
132%package -n osmo-remsim-client-shell
133Summary: Osmocom Remote SIM - Interactive Client
134License: GPL-2.0-or-later
135Group: Productivity/Telephony/Servers
136
137%description -n osmo-remsim-client-shell
138The remsim-client-shell is for manually interacting with a remote SIM
139card via remsim-bankd + remsim-server. It's mostly a test/debug tool.
140
141%package -n libifd-osmo-remsim-client0
142Summary: Osmocom Remote SIM Client - PC/SC driver
143License: GPL-2.0-or-later
144Group: Productivity/Telephony/Servers
145Requires: pcsc-lite
146
147%description -n libifd-osmo-remsim-client0
148This is an incarnation of osmo-remsim-client which can plug as ifd_handler
149driver into pcscd. This means you can use remote smart cards managed
150by osmo-remsim-server via normal PC/SC applications.
151
152%prep
153%setup -q
154
155%build
156echo "%{version}" >.tarball-version
157autoreconf -fi
158%configure \
159 --disable-static \
Oliver Smith694e3b52021-06-23 12:26:18 +0200160 --docdir=%{_docdir}/osmo-remsim \
Oliver Smith81022c82020-05-14 11:51:40 +0200161 --with-systemdsystemunitdir=%{_unitdir}
162make V=1 %{?_smp_mflags}
163
164%install
165%make_install
166find %{buildroot} -type f -name "*.la" -delete -print
167
168%check
169make %{?_smp_mflags} check || find . -name testsuite.log -exec cat {} +
170
171%post -n libosmo-rspro%{sover} -p /sbin/ldconfig
172%postun -n libosmo-rspro%{sover} -p /sbin/ldconfig
173
Oliver Smith54797c42020-05-14 11:52:23 +0200174%if 0%{?suse_version}
Oliver Smith81022c82020-05-14 11:51:40 +0200175%pre -n osmo-remsim-bankd %service_add_pre osmo-remsim-bankd.service
176%post -n osmo-remsim-bankd %service_add_post osmo-remsim-bankd.service
177%preun -n osmo-remsim-bankd %service_del_preun osmo-remsim-bankd.service
178%postun -n osmo-remsim-bankd %service_del_postun osmo-remsim-bankd.service
179
180%pre -n osmo-remsim-client-st2 %service_add_pre osmo-remsim-client@.service
181%post -n osmo-remsim-client-st2 %service_add_post osmo-remsim-client@.service
182%preun -n osmo-remsim-client-st2 %service_del_preun osmo-remsim-client@.service
183%postun -n osmo-remsim-client-st2 %service_del_postun osmo-remsim-client@.service
184
185%pre -n osmo-remsim-server %service_add_pre osmo-remsim-server.service
186%post -n osmo-remsim-server %service_add_post osmo-remsim-server.service
187%preun -n osmo-remsim-server %service_del_preun osmo-remsim-server.service
188%postun -n osmo-remsim-server %service_del_postun osmo-remsim-server.service
Oliver Smith54797c42020-05-14 11:52:23 +0200189%endif
Oliver Smith81022c82020-05-14 11:51:40 +0200190
191%files -n libosmo-rspro%{sover}
192%license COPYING
193%doc README.md
194%{_libdir}/libosmo-rspro.so.%{sover}*
195
196%files -n libosmo-rspro-devel
Oliver Smith81022c82020-05-14 11:51:40 +0200197%dir %{_includedir}/osmocom/rspro
Oliver Smith54797c42020-05-14 11:52:23 +0200198%{_includedir}/osmocom/rspro/*
Oliver Smith81022c82020-05-14 11:51:40 +0200199%{_libdir}/libosmo-rspro.so
200%{_libdir}/pkgconfig/libosmo-rspro.pc
201
202%files -n osmo-remsim-server
203%{_bindir}/osmo-remsim-server
204%{_unitdir}/osmo-remsim-server.service
205
Harald Welte6cfce3b2022-07-15 08:21:10 +0200206%files -n osmo-remsim-apitool
Harald Welte4e0e5b82022-07-11 22:29:40 +0200207%{_bindir}/osmo-remsim-apitool
208
Oliver Smith81022c82020-05-14 11:51:40 +0200209%files -n osmo-remsim-bankd
210%{_bindir}/osmo-remsim-bankd
211%{_unitdir}/osmo-remsim-bankd.service
Harald Welteb80fcf02020-06-22 15:21:45 +0200212%config(noreplace) %{_sysconfdir}/default/osmo-remsim-bankd
Oliver Smith694e3b52021-06-23 12:26:18 +0200213%dir %{_sysconfdir}/osmocom
Oliver Smith905bc4d2021-06-22 17:22:26 +0200214%config(noreplace) %{_sysconfdir}/osmocom/bankd_pcsc_slots.csv
Oliver Smith694e3b52021-06-23 12:26:18 +0200215%dir %{_docdir}/osmo-remsim
216%dir %{_docdir}/osmo-remsim/examples
Oliver Smith588ec1a2021-06-23 10:33:57 +0200217%{_docdir}/osmo-remsim/examples/bankd_pcsc_slots.csv
Oliver Smith81022c82020-05-14 11:51:40 +0200218
219%files -n osmo-remsim-client-shell
220%{_bindir}/osmo-remsim-client-shell
221
222%files -n osmo-remsim-client-st2
223%{_bindir}/osmo-remsim-client-st2
224%{_unitdir}/osmo-remsim-client*
Harald Welteb80fcf02020-06-22 15:21:45 +0200225%config(noreplace) %{_sysconfdir}/default/osmo-remsim-client*
Oliver Smith81022c82020-05-14 11:51:40 +0200226
227%files -n libifd-osmo-remsim-client0
Oliver Smith54797c42020-05-14 11:52:23 +0200228%if 0%{?centos_ver}
229%dir %{_libdir}/pcsc/drivers/libifd-osmo-remsim-client.bundle
230%{_libdir}/pcsc/drivers/libifd-osmo-remsim-client.bundle/*
231%else
Oliver Smith81022c82020-05-14 11:51:40 +0200232%dir %{_libdir}/readers/libifd-osmo-remsim-client.bundle
Oliver Smith54797c42020-05-14 11:52:23 +0200233%{_libdir}/readers/libifd-osmo-remsim-client.bundle/*
234%endif
Harald Welteb80fcf02020-06-22 15:21:45 +0200235%config(noreplace) %{_sysconfdir}/reader.conf.d/osmo-remsim-client-reader_conf
Oliver Smith81022c82020-05-14 11:51:40 +0200236
237%changelog