blob: df98a1f5b32e8e3174d4e0aecea8bd4eda04d188 [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
Oliver Smith81022c82020-05-14 11:51:40 +020015%define sover 1
16Name: 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)
34BuildRequires: pkgconfig(libosmocore) >= 0.11.0
35BuildRequires: pkgconfig(libosmogsm) >= 0.11.0
36BuildRequires: pkgconfig(libosmosim)
37BuildRequires: pkgconfig(libpcsclite)
38BuildRequires: pkgconfig(libulfius)
39BuildRequires: pkgconfig(libusb-1.0)
40BuildRequires: pkgconfig(libosmousb)
41BuildRequires: pkgconfig(libosmo-simtrace2)
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
98%package -n osmo-remsim-bankd
99Summary: Osmocom Remote SIM - Bank Daemon
100License: GPL-2.0-or-later
101Group: Productivity/Telephony/Servers
102
103%description -n osmo-remsim-bankd
104The remsim-bankd is managing a bank of SIM card readers and their
105respective cards. It establishes a control connection to remsim-server
106and receives inbound connections from remsim-clients.
107
108%package -n osmo-remsim-client-st2
109Summary: Osmocom Remote SIM - Client for SIMtrace2
110License: GPL-2.0-or-later
111Group: Productivity/Telephony/Servers
112
113%description -n osmo-remsim-client-st2
114Description: Osmocom Remote SIM - Client for SIMtrace2 cardem firmware
115The remsim-client is managing a given phone/modem. It attaches to the
116'cardem' firmware of a SIMtrcace2 (or compatible, such as sysmoQMOD)
117hardware and forwards the SIM card communication to a remsim-bankd,
118under the control of remsim-server.
119
120%package -n osmo-remsim-client-shell
121Summary: Osmocom Remote SIM - Interactive Client
122License: GPL-2.0-or-later
123Group: Productivity/Telephony/Servers
124
125%description -n osmo-remsim-client-shell
126The remsim-client-shell is for manually interacting with a remote SIM
127card via remsim-bankd + remsim-server. It's mostly a test/debug tool.
128
129%package -n libifd-osmo-remsim-client0
130Summary: Osmocom Remote SIM Client - PC/SC driver
131License: GPL-2.0-or-later
132Group: Productivity/Telephony/Servers
133Requires: pcsc-lite
134
135%description -n libifd-osmo-remsim-client0
136This is an incarnation of osmo-remsim-client which can plug as ifd_handler
137driver into pcscd. This means you can use remote smart cards managed
138by osmo-remsim-server via normal PC/SC applications.
139
140%prep
141%setup -q
142
143%build
144echo "%{version}" >.tarball-version
145autoreconf -fi
146%configure \
147 --disable-static \
148 --with-systemdsystemunitdir=%{_unitdir}
149make V=1 %{?_smp_mflags}
150
151%install
152%make_install
153find %{buildroot} -type f -name "*.la" -delete -print
154
155%check
156make %{?_smp_mflags} check || find . -name testsuite.log -exec cat {} +
157
158%post -n libosmo-rspro%{sover} -p /sbin/ldconfig
159%postun -n libosmo-rspro%{sover} -p /sbin/ldconfig
160
Oliver Smith54797c42020-05-14 11:52:23 +0200161%if 0%{?suse_version}
Oliver Smith81022c82020-05-14 11:51:40 +0200162%pre -n osmo-remsim-bankd %service_add_pre osmo-remsim-bankd.service
163%post -n osmo-remsim-bankd %service_add_post osmo-remsim-bankd.service
164%preun -n osmo-remsim-bankd %service_del_preun osmo-remsim-bankd.service
165%postun -n osmo-remsim-bankd %service_del_postun osmo-remsim-bankd.service
166
167%pre -n osmo-remsim-client-st2 %service_add_pre osmo-remsim-client@.service
168%post -n osmo-remsim-client-st2 %service_add_post osmo-remsim-client@.service
169%preun -n osmo-remsim-client-st2 %service_del_preun osmo-remsim-client@.service
170%postun -n osmo-remsim-client-st2 %service_del_postun osmo-remsim-client@.service
171
172%pre -n osmo-remsim-server %service_add_pre osmo-remsim-server.service
173%post -n osmo-remsim-server %service_add_post osmo-remsim-server.service
174%preun -n osmo-remsim-server %service_del_preun osmo-remsim-server.service
175%postun -n osmo-remsim-server %service_del_postun osmo-remsim-server.service
Oliver Smith54797c42020-05-14 11:52:23 +0200176%endif
Oliver Smith81022c82020-05-14 11:51:40 +0200177
178%files -n libosmo-rspro%{sover}
179%license COPYING
180%doc README.md
181%{_libdir}/libosmo-rspro.so.%{sover}*
182
183%files -n libosmo-rspro-devel
Oliver Smith81022c82020-05-14 11:51:40 +0200184%dir %{_includedir}/osmocom/rspro
Oliver Smith54797c42020-05-14 11:52:23 +0200185%{_includedir}/osmocom/rspro/*
Oliver Smith81022c82020-05-14 11:51:40 +0200186%{_libdir}/libosmo-rspro.so
187%{_libdir}/pkgconfig/libosmo-rspro.pc
188
189%files -n osmo-remsim-server
190%{_bindir}/osmo-remsim-server
191%{_unitdir}/osmo-remsim-server.service
192
193%files -n osmo-remsim-bankd
194%{_bindir}/osmo-remsim-bankd
195%{_unitdir}/osmo-remsim-bankd.service
Harald Welteb80fcf02020-06-22 15:21:45 +0200196%config(noreplace) %{_sysconfdir}/default/osmo-remsim-bankd
Oliver Smith905bc4d2021-06-22 17:22:26 +0200197%config(noreplace) %{_sysconfdir}/osmocom/bankd_pcsc_slots.csv
Oliver Smith588ec1a2021-06-23 10:33:57 +0200198%{_docdir}/osmo-remsim/examples/bankd_pcsc_slots.csv
Oliver Smith81022c82020-05-14 11:51:40 +0200199
200%files -n osmo-remsim-client-shell
201%{_bindir}/osmo-remsim-client-shell
202
203%files -n osmo-remsim-client-st2
204%{_bindir}/osmo-remsim-client-st2
205%{_unitdir}/osmo-remsim-client*
Harald Welteb80fcf02020-06-22 15:21:45 +0200206%config(noreplace) %{_sysconfdir}/default/osmo-remsim-client*
Oliver Smith81022c82020-05-14 11:51:40 +0200207
208%files -n libifd-osmo-remsim-client0
Oliver Smith54797c42020-05-14 11:52:23 +0200209%if 0%{?centos_ver}
210%dir %{_libdir}/pcsc/drivers/libifd-osmo-remsim-client.bundle
211%{_libdir}/pcsc/drivers/libifd-osmo-remsim-client.bundle/*
212%else
Oliver Smith81022c82020-05-14 11:51:40 +0200213%dir %{_libdir}/readers/libifd-osmo-remsim-client.bundle
Oliver Smith54797c42020-05-14 11:52:23 +0200214%{_libdir}/readers/libifd-osmo-remsim-client.bundle/*
215%endif
Harald Welteb80fcf02020-06-22 15:21:45 +0200216%config(noreplace) %{_sysconfdir}/reader.conf.d/osmo-remsim-client-reader_conf
Oliver Smith81022c82020-05-14 11:51:40 +0200217
218%changelog