blob: 208f42da2980c86ec9a35b48794515d2bd9fe65f [file] [log] [blame]
Oliver Smithbfeeb1c2020-05-14 11:23:13 +02001#
2# spec file for package libosmocore
3#
4# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
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 Smithbfeeb1c2020-05-14 11:23:13 +020015Name: libosmocore
Oliver Smith6370f5d2020-05-14 11:27:08 +020016Version: @VERSION@
Oliver Smithbfeeb1c2020-05-14 11:23:13 +020017Release: 0
18Summary: The Open Source Mobile Communications Core Library
19License: GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND AGPL-3.0-or-later
20Group: Productivity/Telephony/Utilities
21Url: https://osmocom.org/projects/libosmocore/wiki/Libosmocore
22Source: %name-%version.tar.xz
23BuildRequires: automake >= 1.6
24BuildRequires: libtool >= 2
25BuildRequires: lksctp-tools-devel
26BuildRequires: pkg-config >= 0.20
Oliver Smith6370f5d2020-05-14 11:27:08 +020027BuildRequires: python3
Oliver Smithbfeeb1c2020-05-14 11:23:13 +020028BuildRequires: xz
29BuildRequires: pkgconfig(gnutls) >= 2.12.0
30BuildRequires: pkgconfig(libpcsclite)
31BuildRequires: pkgconfig(libusb-1.0)
Pau Espin Pedrol4a15c2d2021-11-16 12:47:03 +010032BuildRequires: pkgconfig(talloc) >= 2.1.0
Harald Welte53a2fde2020-12-01 22:21:14 +010033BuildRequires: pkgconfig(libmnl)
Harald Welte700822b2021-02-03 14:52:13 +010034BuildRequires: pkgconfig(libsystemd)
Oliver Smithbfeeb1c2020-05-14 11:23:13 +020035
36%description
37libosmocore is a package with various utility functions that were
38originally developed as part of the OpenBSC project, but which are of
39a more generic nature and thus useful to (at least) other programs
40that Osmocom develops w.r.t. mobile communications.
41
42There is no clear scope of it. It simply houses all code shared
43between OsmocomBB and OpenBSC to avoid code duplication.
44
45%package tools
46Summary: GSM utilities from the osmocore project
47License: GPL-2.0-only AND GPL-2.0-or-later AND LGPL-3.0-or-later AND AGPL-3.0-or-later
48Group: Productivity/Telephony/Utilities
49Provides: %name-utils = %version-%release
50
51%description tools
52libosmocore is a package with various utility functions that were
53originally developed as part of the OpenBSC project.
54
55This package contains a program for frequency calculation for GSM
56called "osmo-arfcn", and a program called "osmo-auc-gen" that is used
Vadim Yanitskiy663eaaa2021-12-27 14:49:16 +060057for testing GSM authentication, as well as "osmo-config-merge", a tool
58for merging Osmocom configuration files.
Oliver Smithbfeeb1c2020-05-14 11:23:13 +020059
60%package -n libosmocodec0
61Summary: GSM 06.10, 06.20, 06.60, 06.90 codec library
62License: GPL-2.0-or-later
63Group: System/Libraries
64
65%description -n libosmocodec0
66The libosmocodec library contains an implementation of multiple
67GSM codecs:
68
69* GSM 06.10 Full Rate (FR) codec
70* GSM 06.20 Half Rate (HR) codec
71* GSM 06.60 Enhanced Full Range (EFR) codec
72* GSM 06.90 Adaptive Multi-Rate (AMR) codec
73
74%package -n libosmocodec-devel
75Summary: Development files for the Osmocom GSM codec library
76License: GPL-2.0-or-later
77Group: Development/Libraries/C and C++
78Requires: libosmocodec0 = %version
79
80%description -n libosmocodec-devel
81The libosmocodec library contains an implementation of multiple
82GSM codecs.
83
84This subpackage contains libraries and header files for developing
85applications that want to make use of libosmocodec.
86
87%package -n libosmocoding0
88Summary: GSM/GPRS/EDGE transcoding routines library
89License: GPL-2.0-or-later
90Group: System/Libraries
91
92%description -n libosmocoding0
93libosmocoding is a library which provides GSM, GPRS and EDGE
94transcoding routines.
95
96The following data types are currently supported: xCCH, PDTCH (CS 1-4
97and MCS 1-9), TCH/FR, TCH/HR, TCH/AFS, RCH/AHS, RACH and SCH.
98
99%package -n libosmocoding-devel
100Summary: Development files for the Osmocom transcoding library
101License: GPL-2.0-or-later
102Group: Development/Libraries/C and C++
103Requires: libosmocodec-devel = %version
104Requires: libosmocoding0 = %version
105Requires: libosmocore-devel = %version
106Requires: libosmogsm-devel = %version
107
108%description -n libosmocoding-devel
109libosmocoding is a library which provides GSM, GPRS and EDGE
110transcoding routines.
111
112This subpackage contains libraries and header files for developing
113applications that want to make use of libosmocoding.
114
Pau Espin Pedrola1584d22022-06-28 17:00:51 +0200115%package -n libosmocore19
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200116Summary: Osmocom core library
117# crc16.c has GPL2-only clauses, the rest (*.c) is GPL-2.0+
118License: GPL-2.0-only AND GPL-2.0-or-later
119Group: System/Libraries
120
Pau Espin Pedrola1584d22022-06-28 17:00:51 +0200121%description -n libosmocore19
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200122libosmocore is a library with various utility functions shared
123between OpenBSC and OsmocomBB.
124
125%package -n libosmocore-devel
126Summary: Development files for the Osmocom core library
127# crc16.h has GPL2-only clauses, the rest (*.h) is GPL-2.0+
128License: GPL-2.0-only AND GPL-2.0-or-later
129Group: Development/Libraries/C and C++
Pau Espin Pedrola1584d22022-06-28 17:00:51 +0200130Requires: libosmocore19 = %version
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200131Requires: libtalloc-devel
Harald Weltec73a1602022-03-25 11:27:35 +0100132Requires: lksctp-tools-devel
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200133
134%description -n libosmocore-devel
135libosmocore is a library with various utility functions shared
136between OpenBSC and OsmocomBB.
137
138This subpackage contains libraries and header files for developing
139applications that want to make use of libosmocore.
140
141%package -n libosmoctrl0
142Summary: Osmocom SNMP-like control interface library
143License: GPL-2.0-or-later
144Group: System/Libraries
145
146%description -n libosmoctrl0
147libosmocore is a package with various utility functions that were
148originally developed as part of the OpenBSC project.
149
150libosmoctrl is an SNMP-like control interface. In contrast to the VTY
151interface, the control interface is meant to be used by programs.
152
153%package -n libosmoctrl-devel
154Summary: Osmocom control interface library
155License: GPL-2.0-or-later
156Group: Development/Libraries/C and C++
157Requires: libosmocore-devel = %version
158Requires: libosmoctrl0 = %version
159Requires: libosmogsm-devel = %version
160
161%description -n libosmoctrl-devel
162libosmoctrl is an SNMP-like control interface. In contrast to the VTY
163interface, the control interface is meant to be used by programs.
164
165This subpackage contains libraries and header files for developing
166applications that want to make use of libosmoctrl.
167
Pau Espin Pedrola1584d22022-06-28 17:00:51 +0200168%package -n libosmogb14
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200169Summary: Osmocom GPRS Gb Interface (NS/BSSGP) library
170License: AGPL-3.0-or-later
171Group: System/Libraries
172
Pau Espin Pedrola1584d22022-06-28 17:00:51 +0200173%description -n libosmogb14
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200174libosmocore is a package with various utility functions that were
175originally developed as part of the OpenBSC project.
176
177The libosmogb library contains a GPRS BSSGP protocol implementation.
178
179%package -n libosmogb-devel
180Summary: Development files for the Osmocom GPRS Gb interface library
181License: AGPL-3.0-or-later
182Group: Development/Libraries/C and C++
183Requires: libosmocore-devel = %version
Pau Espin Pedrola1584d22022-06-28 17:00:51 +0200184Requires: libosmogb14 = %version
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200185Requires: libosmovty-devel = %version
186
187%description -n libosmogb-devel
188The libosmogb library contains a GPRS BSSGP protocol implementation.
189
190This subpackage contains libraries and header files for developing
191applications that want to make use of libosmogb.
192
Pau Espin Pedrola1584d22022-06-28 17:00:51 +0200193%package -n libosmogsm18
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200194Summary: Osmocom GSM utility library
195License: GPL-2.0-or-later AND AGPL-3.0-or-later
196Group: System/Libraries
197
Pau Espin Pedrola1584d22022-06-28 17:00:51 +0200198%description -n libosmogsm18
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200199libosmocore is a package with various utility functions that were
200originally developed as part of the OpenBSC project.
201
202The libosmogsm library in particular is a collection of common code
203used in various GSM related sub-projects inside the Osmocom family of
204projects. It includes A5/1 and A5/2 ciphers, COMP128v1, a LAPDm
205implementation, a GSM TLV parser, SMS utility routines as well as
206protocol definitions for a series of protocols.
207
208%package -n libosmogsm-devel
209Summary: Development files for the Osmocom GSM utility library
210License: GPL-2.0-or-later AND AGPL-3.0-or-later
211Group: Development/Libraries/C and C++
212Requires: libosmocore-devel = %version
Pau Espin Pedrola1584d22022-06-28 17:00:51 +0200213Requires: libosmogsm18 = %version
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200214
215%description -n libosmogsm-devel
216The libosmogsm library in particular is a collection of common code
217used in various GSM related sub-projects inside the Osmocom family of
218projects. It includes A5/1 and A5/2 ciphers, COMP128v1, a LAPDm
219implementation, a GSM TLV parser, SMS utility routines as well as
220protocol definitions for a series of protocols.
221
222This subpackage contains libraries and header files for developing
223applications that want to make use of libosmogsm.
224
Harald Welte5c5713e2020-08-13 11:06:36 +0200225%package -n libosmosim2
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200226Summary: Osmocom SIM card related utility library
227License: GPL-2.0-or-later
228Group: System/Libraries
229
Harald Welte5c5713e2020-08-13 11:06:36 +0200230%description -n libosmosim2
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200231libosmocore is a package with various utility functions that were
232originally developed as part of the OpenBSC project.
233
234The libosmosim library in particular contains routines for SIM card
235access.
236
237%package -n libosmosim-devel
238Summary: Development files for the Osmocom SIM card utility library
239License: GPL-2.0-or-later
240Group: Development/Libraries/C and C++
241Requires: libosmocore-devel = %version
Harald Welte5c5713e2020-08-13 11:06:36 +0200242Requires: libosmosim2 = %version
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200243
244%description -n libosmosim-devel
245The libosmosim library in particular contains routines for SIM card
246access.
247
248This subpackage contains libraries and header files for developing
249applications that want to make use of libosmosim.
250
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100251%package -n libosmovty9
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200252Summary: Osmocom VTY interface library
253License: GPL-2.0-or-later
254Group: System/Libraries
255
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100256%description -n libosmovty9
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200257libosmocore is a package with various utility functions that were
258originally developed as part of the OpenBSC project.
259
260The libosmovty library implements the interactive command-line on the
261VTY (Virtual TTY), as well as configuration file parsing.
262
263%package -n libosmovty-devel
264Summary: Development files for the Osmocom VTY interface library
265License: GPL-2.0-or-later
266Group: Development/Libraries/C and C++
267Requires: libosmocore-devel = %version
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100268Requires: libosmovty9 = %version
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200269
270%description -n libosmovty-devel
271The libosmovty library implements the interactive command-line on the
272VTY (Virtual TTY), as well as configuration file parsing.
273
274This subpackage contains libraries and header files for developing
275applications that want to make use of libosmovty.
276
277%package -n libosmousb0
278Summary: Osmocom USB library
279License: GPL-2.0-or-later
280Group: System/Libraries
281
282%description -n libosmousb0
283libosmocore is a package with various utility functions that were
284originally developed as part of the OpenBSC project.
285
286The libosmosub library in particular contains routines for USB device
287access via libusb-1.0, integrated into the libosmocore select event loop.
288
289%package -n libosmousb-devel
290Summary: Development files for the Osmocom USB library
291License: GPL-2.0-or-later
292Group: Development/Libraries/C and C++
293Requires: libosmocore-devel = %version
294Requires: libosmousb0 = %version
Oliver Smith6370f5d2020-05-14 11:27:08 +0200295Requires: pkgconfig(libusb-1.0)
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200296
297%description -n libosmousb-devel
298The libosmosub library in particular contains routines for USB device
299access via libusb-1.0, integrated into the libosmocore select event loop.
300
301This subpackage contains libraries and header files for developing
302applications that want to make use of libosmousb.
303
304
305%prep
306%setup -q
307
308%build
309echo "%version" >.tarball-version
310autoreconf -fiv
Harald Welte700822b2021-02-03 14:52:13 +0100311%configure --enable-shared --disable-static --enable-systemd-logging \
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200312 --includedir="%_includedir/%name"
313make %{?_smp_mflags} V=1
314
315%install
316b="%buildroot"
317make %{?_smp_mflags} install DESTDIR="$b"
318find "$b/%_libdir" -type f -name "*.la" -delete
319
320%check
321make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
322
323%post -n libosmocodec0 -p /sbin/ldconfig
324%postun -n libosmocodec0 -p /sbin/ldconfig
325%post -n libosmocoding0 -p /sbin/ldconfig
326%postun -n libosmocoding0 -p /sbin/ldconfig
Pau Espin Pedrola1584d22022-06-28 17:00:51 +0200327%post -n libosmocore19 -p /sbin/ldconfig
328%postun -n libosmocore19 -p /sbin/ldconfig
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200329%post -n libosmoctrl0 -p /sbin/ldconfig
330%postun -n libosmoctrl0 -p /sbin/ldconfig
Pau Espin Pedrola1584d22022-06-28 17:00:51 +0200331%post -n libosmogb14 -p /sbin/ldconfig
332%postun -n libosmogb14 -p /sbin/ldconfig
333%post -n libosmogsm18 -p /sbin/ldconfig
334%postun -n libosmogsm18 -p /sbin/ldconfig
Harald Welte5c5713e2020-08-13 11:06:36 +0200335%post -n libosmosim2 -p /sbin/ldconfig
336%postun -n libosmosim2 -p /sbin/ldconfig
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100337%post -n libosmovty9 -p /sbin/ldconfig
338%postun -n libosmovty9 -p /sbin/ldconfig
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200339%post -n libosmousb0 -p /sbin/ldconfig
340%postun -n libosmousb0 -p /sbin/ldconfig
341
342%files tools
343%defattr(-,root,root)
344%_bindir/osmo-*
345
346%files -n libosmocodec0
347%defattr(-,root,root)
348%_libdir/libosmocodec.so.0*
349
350%files -n libosmocodec-devel
351%defattr(-,root,root)
352%dir %_includedir/%name
353%dir %_includedir/%name/osmocom
354%_includedir/%name/osmocom/codec/
355%_libdir/libosmocodec.so
356%_libdir/pkgconfig/libosmocodec.pc
357
358%files -n libosmocoding0
359%defattr(-,root,root)
360%_libdir/libosmocoding.so.0*
361
362%files -n libosmocoding-devel
363%defattr(-,root,root)
364%dir %_includedir/%name
365%dir %_includedir/%name/osmocom
366%_includedir/%name/osmocom/coding/
367%_libdir/libosmocoding.so
368%_libdir/pkgconfig/libosmocoding.pc
369
Pau Espin Pedrola1584d22022-06-28 17:00:51 +0200370%files -n libosmocore19
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200371%defattr(-,root,root)
Pau Espin Pedrola1584d22022-06-28 17:00:51 +0200372%_libdir/libosmocore.so.19*
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200373
374%files -n libosmocore-devel
375%defattr(-,root,root)
376%dir %_includedir/%name
377%dir %_includedir/%name/osmocom
378%_includedir/%name/osmocom/core/
379%_libdir/libosmocore.so
380%_libdir/pkgconfig/libosmocore.pc
381%_datadir/aclocal/osmo_ax_code_coverage.m4
382%_datadir/aclocal/osmo_ac_code_coverage.m4
383
384%files -n libosmoctrl0
385%defattr(-,root,root)
386%_libdir/libosmoctrl.so.0*
387
388%files -n libosmoctrl-devel
389%defattr(-,root,root)
390%dir %_includedir/%name
391%dir %_includedir/%name/osmocom
392%_includedir/%name/osmocom/ctrl/
393%_libdir/libosmoctrl.so
394%_libdir/pkgconfig/libosmoctrl.pc
395
Pau Espin Pedrola1584d22022-06-28 17:00:51 +0200396%files -n libosmogb14
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200397%defattr(-,root,root)
Pau Espin Pedrola1584d22022-06-28 17:00:51 +0200398%_libdir/libosmogb.so.14*
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200399
400%files -n libosmogb-devel
401%defattr(-,root,root)
402%dir %_includedir/%name
403%dir %_includedir/%name/osmocom
404%_includedir/%name/osmocom/gprs/
405%_libdir/libosmogb.so
406%_libdir/pkgconfig/libosmogb.pc
407
Pau Espin Pedrola1584d22022-06-28 17:00:51 +0200408%files -n libosmogsm18
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200409%defattr(-,root,root)
Pau Espin Pedrola1584d22022-06-28 17:00:51 +0200410%_libdir/libosmogsm.so.18*
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200411
412%files -n libosmogsm-devel
413%defattr(-,root,root)
414%dir %_includedir/%name
415%dir %_includedir/%name/osmocom
416%_includedir/%name/osmocom/gsm/
417%_includedir/%name/osmocom/crypt/
418%_libdir/libosmogsm.so
419%_libdir/pkgconfig/libosmogsm.pc
420
Harald Welte5c5713e2020-08-13 11:06:36 +0200421%files -n libosmosim2
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200422%defattr(-,root,root)
Harald Welte5c5713e2020-08-13 11:06:36 +0200423%_libdir/libosmosim.so.2*
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200424
425%files -n libosmosim-devel
426%defattr(-,root,root)
427%dir %_includedir/%name
428%dir %_includedir/%name/osmocom/
429%_includedir/%name/osmocom/sim/
430%_libdir/libosmosim.so
431%_libdir/pkgconfig/libosmosim.pc
432
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100433%files -n libosmovty9
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200434%defattr(-,root,root)
Harald Welteaf52bcc2021-02-24 09:05:57 +0100435%_libdir/libosmovty.so.9*
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200436
437%files -n libosmovty-devel
438%defattr(-,root,root)
439%dir %_includedir/%name
440%dir %_includedir/%name/osmocom
441%_includedir/%name/osmocom/vty/
442%_includedir/%name/osmo-release.mk
443%_libdir/libosmovty.so
444%_libdir/pkgconfig/libosmovty.pc
445
446%files -n libosmousb0
447%defattr(-,root,root)
448%_libdir/libosmousb.so.0*
449
450%files -n libosmousb-devel
451%defattr(-,root,root)
452%dir %_includedir/%name
453%dir %_includedir/%name/osmocom
454%_includedir/%name/osmocom/usb/
455%_libdir/libosmousb.so
456%_libdir/pkgconfig/libosmousb.pc
457
458%changelog