blob: fdd1a65788d09f7d39ac69ec32a18d5cb19065c7 [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 Pedrol5f15e412023-02-07 11:20:41 +0100115%package -n libosmocore20
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 Pedrol5f15e412023-02-07 11:20:41 +0100121%description -n libosmocore20
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 Pedrol5f15e412023-02-07 11:20:41 +0100130Requires: libosmocore20 = %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
Harald Welted55a2092022-11-29 22:33:54 +0100214Requires: libosmoisdn-devel = %version
215Requires: libosmoisdn0 = %version
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200216
217%description -n libosmogsm-devel
218The libosmogsm library in particular is a collection of common code
219used in various GSM related sub-projects inside the Osmocom family of
220projects. It includes A5/1 and A5/2 ciphers, COMP128v1, a LAPDm
221implementation, a GSM TLV parser, SMS utility routines as well as
222protocol definitions for a series of protocols.
223
224This subpackage contains libraries and header files for developing
225applications that want to make use of libosmogsm.
226
Harald Welted55a2092022-11-29 22:33:54 +0100227%package -n libosmoisdn0
228Summary: Osmocom ISDN utility library
229License: GPL-2.0-or-later
230Group: System/Libraries
231
232%description -n libosmoisdn0
233libosmocore is a package with various utility functions that were
234originally developed as part of the OpenBSC project.
235
236The libosmoisdn library in particular is a collection of common code used in
237various ISDN related sub-projects inside the Osmocom family of projects. It
238includes an I.460 sub-channel multiplex and a generic LAPD core.
239
240%package -n libosmoisdn-devel
241Summary: Development files for the Osmocom ISDN utility library
242License: GPL-2.0-or-later
243Group: Development/Libraries/C and C++
244Requires: libosmocore-devel = %version
245Requires: libosmoisdn0 = %version
246
247%description -n libosmoisdn-devel
248The libosmoisdn library in particular is a collection of common code used in
249various ISDN related sub-projects inside the Osmocom family of projects. It
250includes an I.460 sub-channel multiplex and a generic LAPD core.
251
252This subpackage contains libraries and header files for developing
253applications that want to make use of libosmogsm.
254
Harald Welte5c5713e2020-08-13 11:06:36 +0200255%package -n libosmosim2
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200256Summary: Osmocom SIM card related utility library
257License: GPL-2.0-or-later
258Group: System/Libraries
259
Harald Welte5c5713e2020-08-13 11:06:36 +0200260%description -n libosmosim2
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200261libosmocore is a package with various utility functions that were
262originally developed as part of the OpenBSC project.
263
264The libosmosim library in particular contains routines for SIM card
265access.
266
267%package -n libosmosim-devel
268Summary: Development files for the Osmocom SIM card utility library
269License: GPL-2.0-or-later
270Group: Development/Libraries/C and C++
271Requires: libosmocore-devel = %version
Harald Welte5c5713e2020-08-13 11:06:36 +0200272Requires: libosmosim2 = %version
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200273
274%description -n libosmosim-devel
275The libosmosim library in particular contains routines for SIM card
276access.
277
278This subpackage contains libraries and header files for developing
279applications that want to make use of libosmosim.
280
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100281%package -n libosmovty9
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200282Summary: Osmocom VTY interface library
283License: GPL-2.0-or-later
284Group: System/Libraries
285
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100286%description -n libosmovty9
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200287libosmocore is a package with various utility functions that were
288originally developed as part of the OpenBSC project.
289
290The libosmovty library implements the interactive command-line on the
291VTY (Virtual TTY), as well as configuration file parsing.
292
293%package -n libosmovty-devel
294Summary: Development files for the Osmocom VTY interface library
295License: GPL-2.0-or-later
296Group: Development/Libraries/C and C++
297Requires: libosmocore-devel = %version
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100298Requires: libosmovty9 = %version
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200299
300%description -n libosmovty-devel
301The libosmovty library implements the interactive command-line on the
302VTY (Virtual TTY), as well as configuration file parsing.
303
304This subpackage contains libraries and header files for developing
305applications that want to make use of libosmovty.
306
307%package -n libosmousb0
308Summary: Osmocom USB library
309License: GPL-2.0-or-later
310Group: System/Libraries
311
312%description -n libosmousb0
313libosmocore is a package with various utility functions that were
314originally developed as part of the OpenBSC project.
315
316The libosmosub library in particular contains routines for USB device
317access via libusb-1.0, integrated into the libosmocore select event loop.
318
319%package -n libosmousb-devel
320Summary: Development files for the Osmocom USB library
321License: GPL-2.0-or-later
322Group: Development/Libraries/C and C++
323Requires: libosmocore-devel = %version
324Requires: libosmousb0 = %version
Oliver Smith6370f5d2020-05-14 11:27:08 +0200325Requires: pkgconfig(libusb-1.0)
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200326
327%description -n libosmousb-devel
328The libosmosub library in particular contains routines for USB device
329access via libusb-1.0, integrated into the libosmocore select event loop.
330
331This subpackage contains libraries and header files for developing
332applications that want to make use of libosmousb.
333
334
335%prep
336%setup -q
337
338%build
339echo "%version" >.tarball-version
340autoreconf -fiv
Harald Welte700822b2021-02-03 14:52:13 +0100341%configure --enable-shared --disable-static --enable-systemd-logging \
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200342 --includedir="%_includedir/%name"
343make %{?_smp_mflags} V=1
344
345%install
346b="%buildroot"
347make %{?_smp_mflags} install DESTDIR="$b"
348find "$b/%_libdir" -type f -name "*.la" -delete
349
350%check
351make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
352
353%post -n libosmocodec0 -p /sbin/ldconfig
354%postun -n libosmocodec0 -p /sbin/ldconfig
355%post -n libosmocoding0 -p /sbin/ldconfig
356%postun -n libosmocoding0 -p /sbin/ldconfig
Pau Espin Pedrol5f15e412023-02-07 11:20:41 +0100357%post -n libosmocore20 -p /sbin/ldconfig
358%postun -n libosmocore20 -p /sbin/ldconfig
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200359%post -n libosmoctrl0 -p /sbin/ldconfig
360%postun -n libosmoctrl0 -p /sbin/ldconfig
Pau Espin Pedrola1584d22022-06-28 17:00:51 +0200361%post -n libosmogb14 -p /sbin/ldconfig
362%postun -n libosmogb14 -p /sbin/ldconfig
363%post -n libosmogsm18 -p /sbin/ldconfig
364%postun -n libosmogsm18 -p /sbin/ldconfig
Harald Welted55a2092022-11-29 22:33:54 +0100365%post -n libosmoisdn0 -p /sbin/ldconfig
366%postun -n libosmoisdn0 -p /sbin/ldconfig
Harald Welte5c5713e2020-08-13 11:06:36 +0200367%post -n libosmosim2 -p /sbin/ldconfig
368%postun -n libosmosim2 -p /sbin/ldconfig
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100369%post -n libosmovty9 -p /sbin/ldconfig
370%postun -n libosmovty9 -p /sbin/ldconfig
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200371%post -n libosmousb0 -p /sbin/ldconfig
372%postun -n libosmousb0 -p /sbin/ldconfig
373
374%files tools
375%defattr(-,root,root)
376%_bindir/osmo-*
377
378%files -n libosmocodec0
379%defattr(-,root,root)
380%_libdir/libosmocodec.so.0*
381
382%files -n libosmocodec-devel
383%defattr(-,root,root)
384%dir %_includedir/%name
385%dir %_includedir/%name/osmocom
386%_includedir/%name/osmocom/codec/
387%_libdir/libosmocodec.so
388%_libdir/pkgconfig/libosmocodec.pc
389
390%files -n libosmocoding0
391%defattr(-,root,root)
392%_libdir/libosmocoding.so.0*
393
394%files -n libosmocoding-devel
395%defattr(-,root,root)
396%dir %_includedir/%name
397%dir %_includedir/%name/osmocom
398%_includedir/%name/osmocom/coding/
399%_libdir/libosmocoding.so
400%_libdir/pkgconfig/libosmocoding.pc
401
Pau Espin Pedrol5f15e412023-02-07 11:20:41 +0100402%files -n libosmocore20
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200403%defattr(-,root,root)
Pau Espin Pedrol5f15e412023-02-07 11:20:41 +0100404%_libdir/libosmocore.so.20*
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200405
406%files -n libosmocore-devel
407%defattr(-,root,root)
408%dir %_includedir/%name
409%dir %_includedir/%name/osmocom
410%_includedir/%name/osmocom/core/
411%_libdir/libosmocore.so
412%_libdir/pkgconfig/libosmocore.pc
413%_datadir/aclocal/osmo_ax_code_coverage.m4
414%_datadir/aclocal/osmo_ac_code_coverage.m4
415
416%files -n libosmoctrl0
417%defattr(-,root,root)
418%_libdir/libosmoctrl.so.0*
419
420%files -n libosmoctrl-devel
421%defattr(-,root,root)
422%dir %_includedir/%name
423%dir %_includedir/%name/osmocom
424%_includedir/%name/osmocom/ctrl/
425%_libdir/libosmoctrl.so
426%_libdir/pkgconfig/libosmoctrl.pc
427
Pau Espin Pedrola1584d22022-06-28 17:00:51 +0200428%files -n libosmogb14
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200429%defattr(-,root,root)
Pau Espin Pedrola1584d22022-06-28 17:00:51 +0200430%_libdir/libosmogb.so.14*
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200431
432%files -n libosmogb-devel
433%defattr(-,root,root)
434%dir %_includedir/%name
435%dir %_includedir/%name/osmocom
436%_includedir/%name/osmocom/gprs/
437%_libdir/libosmogb.so
438%_libdir/pkgconfig/libosmogb.pc
439
Pau Espin Pedrola1584d22022-06-28 17:00:51 +0200440%files -n libosmogsm18
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200441%defattr(-,root,root)
Pau Espin Pedrola1584d22022-06-28 17:00:51 +0200442%_libdir/libosmogsm.so.18*
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200443
444%files -n libosmogsm-devel
445%defattr(-,root,root)
446%dir %_includedir/%name
447%dir %_includedir/%name/osmocom
448%_includedir/%name/osmocom/gsm/
449%_includedir/%name/osmocom/crypt/
450%_libdir/libosmogsm.so
451%_libdir/pkgconfig/libosmogsm.pc
452
Harald Welted55a2092022-11-29 22:33:54 +0100453%files -n libosmoisdn0
454%defattr(-,root,root)
455%_libdir/libosmoisdn.so.0*
456
457%files -n libosmoisdn-devel
458%defattr(-,root,root)
459%dir %_includedir/%name
460%dir %_includedir/%name/osmocom
461%_includedir/%name/osmocom/isdn/
462%_libdir/libosmoisdn.so
463%_libdir/pkgconfig/libosmoisdn.pc
464
Harald Welte5c5713e2020-08-13 11:06:36 +0200465%files -n libosmosim2
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200466%defattr(-,root,root)
Harald Welte5c5713e2020-08-13 11:06:36 +0200467%_libdir/libosmosim.so.2*
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200468
469%files -n libosmosim-devel
470%defattr(-,root,root)
471%dir %_includedir/%name
472%dir %_includedir/%name/osmocom/
473%_includedir/%name/osmocom/sim/
474%_libdir/libosmosim.so
475%_libdir/pkgconfig/libosmosim.pc
476
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100477%files -n libosmovty9
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200478%defattr(-,root,root)
Harald Welteaf52bcc2021-02-24 09:05:57 +0100479%_libdir/libosmovty.so.9*
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200480
481%files -n libosmovty-devel
482%defattr(-,root,root)
483%dir %_includedir/%name
484%dir %_includedir/%name/osmocom
485%_includedir/%name/osmocom/vty/
486%_includedir/%name/osmo-release.mk
487%_libdir/libosmovty.so
488%_libdir/pkgconfig/libosmovty.pc
489
490%files -n libosmousb0
491%defattr(-,root,root)
492%_libdir/libosmousb.so.0*
493
494%files -n libosmousb-devel
495%defattr(-,root,root)
496%dir %_includedir/%name
497%dir %_includedir/%name/osmocom
498%_includedir/%name/osmocom/usb/
499%_libdir/libosmousb.so
500%_libdir/pkgconfig/libosmousb.pc
501
502%changelog