blob: 3fde143e89e8ab67d2750a133a721204e5d1bae0 [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)
Daniel Willmannf91d2aa2023-01-04 18:20:55 +010035BuildRequires: pkgconfig(liburing)
Oliver Smithbfeeb1c2020-05-14 11:23:13 +020036
37%description
38libosmocore is a package with various utility functions that were
39originally developed as part of the OpenBSC project, but which are of
40a more generic nature and thus useful to (at least) other programs
41that Osmocom develops w.r.t. mobile communications.
42
43There is no clear scope of it. It simply houses all code shared
44between OsmocomBB and OpenBSC to avoid code duplication.
45
46%package tools
47Summary: GSM utilities from the osmocore project
48License: GPL-2.0-only AND GPL-2.0-or-later AND LGPL-3.0-or-later AND AGPL-3.0-or-later
49Group: Productivity/Telephony/Utilities
50Provides: %name-utils = %version-%release
51
52%description tools
53libosmocore is a package with various utility functions that were
54originally developed as part of the OpenBSC project.
55
56This package contains a program for frequency calculation for GSM
57called "osmo-arfcn", and a program called "osmo-auc-gen" that is used
Vadim Yanitskiy663eaaa2021-12-27 14:49:16 +060058for testing GSM authentication, as well as "osmo-config-merge", a tool
59for merging Osmocom configuration files.
Oliver Smithbfeeb1c2020-05-14 11:23:13 +020060
61%package -n libosmocodec0
62Summary: GSM 06.10, 06.20, 06.60, 06.90 codec library
63License: GPL-2.0-or-later
64Group: System/Libraries
65
66%description -n libosmocodec0
67The libosmocodec library contains an implementation of multiple
68GSM codecs:
69
70* GSM 06.10 Full Rate (FR) codec
71* GSM 06.20 Half Rate (HR) codec
72* GSM 06.60 Enhanced Full Range (EFR) codec
73* GSM 06.90 Adaptive Multi-Rate (AMR) codec
74
75%package -n libosmocodec-devel
76Summary: Development files for the Osmocom GSM codec library
77License: GPL-2.0-or-later
78Group: Development/Libraries/C and C++
79Requires: libosmocodec0 = %version
80
81%description -n libosmocodec-devel
82The libosmocodec library contains an implementation of multiple
83GSM codecs.
84
85This subpackage contains libraries and header files for developing
86applications that want to make use of libosmocodec.
87
88%package -n libosmocoding0
89Summary: GSM/GPRS/EDGE transcoding routines library
90License: GPL-2.0-or-later
91Group: System/Libraries
92
93%description -n libosmocoding0
94libosmocoding is a library which provides GSM, GPRS and EDGE
95transcoding routines.
96
97The following data types are currently supported: xCCH, PDTCH (CS 1-4
98and MCS 1-9), TCH/FR, TCH/HR, TCH/AFS, RCH/AHS, RACH and SCH.
99
100%package -n libosmocoding-devel
101Summary: Development files for the Osmocom transcoding library
102License: GPL-2.0-or-later
103Group: Development/Libraries/C and C++
104Requires: libosmocodec-devel = %version
105Requires: libosmocoding0 = %version
106Requires: libosmocore-devel = %version
107Requires: libosmogsm-devel = %version
108
109%description -n libosmocoding-devel
110libosmocoding is a library which provides GSM, GPRS and EDGE
111transcoding routines.
112
113This subpackage contains libraries and header files for developing
114applications that want to make use of libosmocoding.
115
Pau Espin Pedrol5f15e412023-02-07 11:20:41 +0100116%package -n libosmocore20
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200117Summary: Osmocom core library
118# crc16.c has GPL2-only clauses, the rest (*.c) is GPL-2.0+
119License: GPL-2.0-only AND GPL-2.0-or-later
120Group: System/Libraries
121
Pau Espin Pedrol5f15e412023-02-07 11:20:41 +0100122%description -n libosmocore20
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200123libosmocore is a library with various utility functions shared
124between OpenBSC and OsmocomBB.
125
126%package -n libosmocore-devel
127Summary: Development files for the Osmocom core library
128# crc16.h has GPL2-only clauses, the rest (*.h) is GPL-2.0+
129License: GPL-2.0-only AND GPL-2.0-or-later
130Group: Development/Libraries/C and C++
Pau Espin Pedrol5f15e412023-02-07 11:20:41 +0100131Requires: libosmocore20 = %version
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200132Requires: libtalloc-devel
Harald Weltec73a1602022-03-25 11:27:35 +0100133Requires: lksctp-tools-devel
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200134
135%description -n libosmocore-devel
136libosmocore is a library with various utility functions shared
137between OpenBSC and OsmocomBB.
138
139This subpackage contains libraries and header files for developing
140applications that want to make use of libosmocore.
141
142%package -n libosmoctrl0
143Summary: Osmocom SNMP-like control interface library
144License: GPL-2.0-or-later
145Group: System/Libraries
146
147%description -n libosmoctrl0
148libosmocore is a package with various utility functions that were
149originally developed as part of the OpenBSC project.
150
151libosmoctrl is an SNMP-like control interface. In contrast to the VTY
152interface, the control interface is meant to be used by programs.
153
154%package -n libosmoctrl-devel
155Summary: Osmocom control interface library
156License: GPL-2.0-or-later
157Group: Development/Libraries/C and C++
158Requires: libosmocore-devel = %version
159Requires: libosmoctrl0 = %version
160Requires: libosmogsm-devel = %version
161
162%description -n libosmoctrl-devel
163libosmoctrl is an SNMP-like control interface. In contrast to the VTY
164interface, the control interface is meant to be used by programs.
165
166This subpackage contains libraries and header files for developing
167applications that want to make use of libosmoctrl.
168
Pau Espin Pedrola1584d22022-06-28 17:00:51 +0200169%package -n libosmogb14
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200170Summary: Osmocom GPRS Gb Interface (NS/BSSGP) library
171License: AGPL-3.0-or-later
172Group: System/Libraries
173
Pau Espin Pedrola1584d22022-06-28 17:00:51 +0200174%description -n libosmogb14
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200175libosmocore is a package with various utility functions that were
176originally developed as part of the OpenBSC project.
177
178The libosmogb library contains a GPRS BSSGP protocol implementation.
179
180%package -n libosmogb-devel
181Summary: Development files for the Osmocom GPRS Gb interface library
182License: AGPL-3.0-or-later
183Group: Development/Libraries/C and C++
184Requires: libosmocore-devel = %version
Pau Espin Pedrola1584d22022-06-28 17:00:51 +0200185Requires: libosmogb14 = %version
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200186Requires: libosmovty-devel = %version
187
188%description -n libosmogb-devel
189The libosmogb library contains a GPRS BSSGP protocol implementation.
190
191This subpackage contains libraries and header files for developing
192applications that want to make use of libosmogb.
193
Pau Espin Pedrola1584d22022-06-28 17:00:51 +0200194%package -n libosmogsm18
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200195Summary: Osmocom GSM utility library
196License: GPL-2.0-or-later AND AGPL-3.0-or-later
197Group: System/Libraries
198
Pau Espin Pedrola1584d22022-06-28 17:00:51 +0200199%description -n libosmogsm18
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200200libosmocore is a package with various utility functions that were
201originally developed as part of the OpenBSC project.
202
203The libosmogsm library in particular is a collection of common code
204used in various GSM related sub-projects inside the Osmocom family of
205projects. It includes A5/1 and A5/2 ciphers, COMP128v1, a LAPDm
206implementation, a GSM TLV parser, SMS utility routines as well as
207protocol definitions for a series of protocols.
208
209%package -n libosmogsm-devel
210Summary: Development files for the Osmocom GSM utility library
211License: GPL-2.0-or-later AND AGPL-3.0-or-later
212Group: Development/Libraries/C and C++
213Requires: libosmocore-devel = %version
Pau Espin Pedrola1584d22022-06-28 17:00:51 +0200214Requires: libosmogsm18 = %version
Harald Welted55a2092022-11-29 22:33:54 +0100215Requires: libosmoisdn-devel = %version
216Requires: libosmoisdn0 = %version
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200217
218%description -n libosmogsm-devel
219The libosmogsm library in particular is a collection of common code
220used in various GSM related sub-projects inside the Osmocom family of
221projects. It includes A5/1 and A5/2 ciphers, COMP128v1, a LAPDm
222implementation, a GSM TLV parser, SMS utility routines as well as
223protocol definitions for a series of protocols.
224
225This subpackage contains libraries and header files for developing
226applications that want to make use of libosmogsm.
227
Harald Welted55a2092022-11-29 22:33:54 +0100228%package -n libosmoisdn0
229Summary: Osmocom ISDN utility library
230License: GPL-2.0-or-later
231Group: System/Libraries
232
233%description -n libosmoisdn0
234libosmocore is a package with various utility functions that were
235originally developed as part of the OpenBSC project.
236
237The libosmoisdn library in particular is a collection of common code used in
238various ISDN related sub-projects inside the Osmocom family of projects. It
239includes an I.460 sub-channel multiplex and a generic LAPD core.
240
241%package -n libosmoisdn-devel
242Summary: Development files for the Osmocom ISDN utility library
243License: GPL-2.0-or-later
244Group: Development/Libraries/C and C++
245Requires: libosmocore-devel = %version
246Requires: libosmoisdn0 = %version
247
248%description -n libosmoisdn-devel
249The libosmoisdn library in particular is a collection of common code used in
250various ISDN related sub-projects inside the Osmocom family of projects. It
251includes an I.460 sub-channel multiplex and a generic LAPD core.
252
253This subpackage contains libraries and header files for developing
254applications that want to make use of libosmogsm.
255
Harald Welte5c5713e2020-08-13 11:06:36 +0200256%package -n libosmosim2
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200257Summary: Osmocom SIM card related utility library
258License: GPL-2.0-or-later
259Group: System/Libraries
260
Harald Welte5c5713e2020-08-13 11:06:36 +0200261%description -n libosmosim2
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200262libosmocore is a package with various utility functions that were
263originally developed as part of the OpenBSC project.
264
265The libosmosim library in particular contains routines for SIM card
266access.
267
268%package -n libosmosim-devel
269Summary: Development files for the Osmocom SIM card utility library
270License: GPL-2.0-or-later
271Group: Development/Libraries/C and C++
272Requires: libosmocore-devel = %version
Harald Welte5c5713e2020-08-13 11:06:36 +0200273Requires: libosmosim2 = %version
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200274
275%description -n libosmosim-devel
276The libosmosim library in particular contains routines for SIM card
277access.
278
279This subpackage contains libraries and header files for developing
280applications that want to make use of libosmosim.
281
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100282%package -n libosmovty9
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200283Summary: Osmocom VTY interface library
284License: GPL-2.0-or-later
285Group: System/Libraries
286
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100287%description -n libosmovty9
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200288libosmocore is a package with various utility functions that were
289originally developed as part of the OpenBSC project.
290
291The libosmovty library implements the interactive command-line on the
292VTY (Virtual TTY), as well as configuration file parsing.
293
294%package -n libosmovty-devel
295Summary: Development files for the Osmocom VTY interface library
296License: GPL-2.0-or-later
297Group: Development/Libraries/C and C++
298Requires: libosmocore-devel = %version
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100299Requires: libosmovty9 = %version
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200300
301%description -n libosmovty-devel
302The libosmovty library implements the interactive command-line on the
303VTY (Virtual TTY), as well as configuration file parsing.
304
305This subpackage contains libraries and header files for developing
306applications that want to make use of libosmovty.
307
308%package -n libosmousb0
309Summary: Osmocom USB library
310License: GPL-2.0-or-later
311Group: System/Libraries
312
313%description -n libosmousb0
314libosmocore is a package with various utility functions that were
315originally developed as part of the OpenBSC project.
316
317The libosmosub library in particular contains routines for USB device
318access via libusb-1.0, integrated into the libosmocore select event loop.
319
320%package -n libosmousb-devel
321Summary: Development files for the Osmocom USB library
322License: GPL-2.0-or-later
323Group: Development/Libraries/C and C++
324Requires: libosmocore-devel = %version
325Requires: libosmousb0 = %version
Oliver Smith6370f5d2020-05-14 11:27:08 +0200326Requires: pkgconfig(libusb-1.0)
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200327
328%description -n libosmousb-devel
329The libosmosub library in particular contains routines for USB device
330access via libusb-1.0, integrated into the libosmocore select event loop.
331
332This subpackage contains libraries and header files for developing
333applications that want to make use of libosmousb.
334
335
336%prep
337%setup -q
338
339%build
340echo "%version" >.tarball-version
341autoreconf -fiv
Harald Welte700822b2021-02-03 14:52:13 +0100342%configure --enable-shared --disable-static --enable-systemd-logging \
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200343 --includedir="%_includedir/%name"
344make %{?_smp_mflags} V=1
345
346%install
347b="%buildroot"
348make %{?_smp_mflags} install DESTDIR="$b"
349find "$b/%_libdir" -type f -name "*.la" -delete
350
351%check
352make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
353
354%post -n libosmocodec0 -p /sbin/ldconfig
355%postun -n libosmocodec0 -p /sbin/ldconfig
356%post -n libosmocoding0 -p /sbin/ldconfig
357%postun -n libosmocoding0 -p /sbin/ldconfig
Pau Espin Pedrol5f15e412023-02-07 11:20:41 +0100358%post -n libosmocore20 -p /sbin/ldconfig
359%postun -n libosmocore20 -p /sbin/ldconfig
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200360%post -n libosmoctrl0 -p /sbin/ldconfig
361%postun -n libosmoctrl0 -p /sbin/ldconfig
Pau Espin Pedrola1584d22022-06-28 17:00:51 +0200362%post -n libosmogb14 -p /sbin/ldconfig
363%postun -n libosmogb14 -p /sbin/ldconfig
364%post -n libosmogsm18 -p /sbin/ldconfig
365%postun -n libosmogsm18 -p /sbin/ldconfig
Harald Welted55a2092022-11-29 22:33:54 +0100366%post -n libosmoisdn0 -p /sbin/ldconfig
367%postun -n libosmoisdn0 -p /sbin/ldconfig
Harald Welte5c5713e2020-08-13 11:06:36 +0200368%post -n libosmosim2 -p /sbin/ldconfig
369%postun -n libosmosim2 -p /sbin/ldconfig
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100370%post -n libosmovty9 -p /sbin/ldconfig
371%postun -n libosmovty9 -p /sbin/ldconfig
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200372%post -n libosmousb0 -p /sbin/ldconfig
373%postun -n libosmousb0 -p /sbin/ldconfig
374
375%files tools
376%defattr(-,root,root)
377%_bindir/osmo-*
378
379%files -n libosmocodec0
380%defattr(-,root,root)
381%_libdir/libosmocodec.so.0*
382
383%files -n libosmocodec-devel
384%defattr(-,root,root)
385%dir %_includedir/%name
386%dir %_includedir/%name/osmocom
387%_includedir/%name/osmocom/codec/
388%_libdir/libosmocodec.so
389%_libdir/pkgconfig/libosmocodec.pc
390
391%files -n libosmocoding0
392%defattr(-,root,root)
393%_libdir/libosmocoding.so.0*
394
395%files -n libosmocoding-devel
396%defattr(-,root,root)
397%dir %_includedir/%name
398%dir %_includedir/%name/osmocom
399%_includedir/%name/osmocom/coding/
400%_libdir/libosmocoding.so
401%_libdir/pkgconfig/libosmocoding.pc
402
Pau Espin Pedrol5f15e412023-02-07 11:20:41 +0100403%files -n libosmocore20
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200404%defattr(-,root,root)
Pau Espin Pedrol5f15e412023-02-07 11:20:41 +0100405%_libdir/libosmocore.so.20*
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200406
407%files -n libosmocore-devel
408%defattr(-,root,root)
409%dir %_includedir/%name
410%dir %_includedir/%name/osmocom
411%_includedir/%name/osmocom/core/
412%_libdir/libosmocore.so
413%_libdir/pkgconfig/libosmocore.pc
414%_datadir/aclocal/osmo_ax_code_coverage.m4
415%_datadir/aclocal/osmo_ac_code_coverage.m4
416
417%files -n libosmoctrl0
418%defattr(-,root,root)
419%_libdir/libosmoctrl.so.0*
420
421%files -n libosmoctrl-devel
422%defattr(-,root,root)
423%dir %_includedir/%name
424%dir %_includedir/%name/osmocom
425%_includedir/%name/osmocom/ctrl/
426%_libdir/libosmoctrl.so
427%_libdir/pkgconfig/libosmoctrl.pc
428
Pau Espin Pedrola1584d22022-06-28 17:00:51 +0200429%files -n libosmogb14
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200430%defattr(-,root,root)
Pau Espin Pedrola1584d22022-06-28 17:00:51 +0200431%_libdir/libosmogb.so.14*
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200432
433%files -n libosmogb-devel
434%defattr(-,root,root)
435%dir %_includedir/%name
436%dir %_includedir/%name/osmocom
437%_includedir/%name/osmocom/gprs/
438%_libdir/libosmogb.so
439%_libdir/pkgconfig/libosmogb.pc
440
Pau Espin Pedrola1584d22022-06-28 17:00:51 +0200441%files -n libosmogsm18
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200442%defattr(-,root,root)
Pau Espin Pedrola1584d22022-06-28 17:00:51 +0200443%_libdir/libosmogsm.so.18*
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200444
445%files -n libosmogsm-devel
446%defattr(-,root,root)
447%dir %_includedir/%name
448%dir %_includedir/%name/osmocom
449%_includedir/%name/osmocom/gsm/
450%_includedir/%name/osmocom/crypt/
451%_libdir/libosmogsm.so
452%_libdir/pkgconfig/libosmogsm.pc
453
Harald Welted55a2092022-11-29 22:33:54 +0100454%files -n libosmoisdn0
455%defattr(-,root,root)
456%_libdir/libosmoisdn.so.0*
457
458%files -n libosmoisdn-devel
459%defattr(-,root,root)
460%dir %_includedir/%name
461%dir %_includedir/%name/osmocom
462%_includedir/%name/osmocom/isdn/
463%_libdir/libosmoisdn.so
464%_libdir/pkgconfig/libosmoisdn.pc
465
Harald Welte5c5713e2020-08-13 11:06:36 +0200466%files -n libosmosim2
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200467%defattr(-,root,root)
Harald Welte5c5713e2020-08-13 11:06:36 +0200468%_libdir/libosmosim.so.2*
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200469
470%files -n libosmosim-devel
471%defattr(-,root,root)
472%dir %_includedir/%name
473%dir %_includedir/%name/osmocom/
474%_includedir/%name/osmocom/sim/
475%_libdir/libosmosim.so
476%_libdir/pkgconfig/libosmosim.pc
477
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100478%files -n libosmovty9
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200479%defattr(-,root,root)
Harald Welteaf52bcc2021-02-24 09:05:57 +0100480%_libdir/libosmovty.so.9*
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200481
482%files -n libosmovty-devel
483%defattr(-,root,root)
484%dir %_includedir/%name
485%dir %_includedir/%name/osmocom
486%_includedir/%name/osmocom/vty/
487%_includedir/%name/osmo-release.mk
488%_libdir/libosmovty.so
489%_libdir/pkgconfig/libosmovty.pc
490
491%files -n libosmousb0
492%defattr(-,root,root)
493%_libdir/libosmousb.so.0*
494
495%files -n libosmousb-devel
496%defattr(-,root,root)
497%dir %_includedir/%name
498%dir %_includedir/%name/osmocom
499%_includedir/%name/osmocom/usb/
500%_libdir/libosmousb.so
501%_libdir/pkgconfig/libosmousb.pc
502
503%changelog