blob: c2fe73891bc8c09d984505356f061b90689a61ef [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 Pedrolc7deaf22021-11-16 13:08:22 +0100115%package -n libosmocore18
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 Pedrolc7deaf22021-11-16 13:08:22 +0100121%description -n libosmocore18
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 Pedrolc7deaf22021-11-16 13:08:22 +0100130Requires: libosmocore18 = %version
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200131Requires: libtalloc-devel
132
133%description -n libosmocore-devel
134libosmocore is a library with various utility functions shared
135between OpenBSC and OsmocomBB.
136
137This subpackage contains libraries and header files for developing
138applications that want to make use of libosmocore.
139
140%package -n libosmoctrl0
141Summary: Osmocom SNMP-like control interface library
142License: GPL-2.0-or-later
143Group: System/Libraries
144
145%description -n libosmoctrl0
146libosmocore is a package with various utility functions that were
147originally developed as part of the OpenBSC project.
148
149libosmoctrl is an SNMP-like control interface. In contrast to the VTY
150interface, the control interface is meant to be used by programs.
151
152%package -n libosmoctrl-devel
153Summary: Osmocom control interface library
154License: GPL-2.0-or-later
155Group: Development/Libraries/C and C++
156Requires: libosmocore-devel = %version
157Requires: libosmoctrl0 = %version
158Requires: libosmogsm-devel = %version
159
160%description -n libosmoctrl-devel
161libosmoctrl is an SNMP-like control interface. In contrast to the VTY
162interface, the control interface is meant to be used by programs.
163
164This subpackage contains libraries and header files for developing
165applications that want to make use of libosmoctrl.
166
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100167%package -n libosmogb12
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200168Summary: Osmocom GPRS Gb Interface (NS/BSSGP) library
169License: AGPL-3.0-or-later
170Group: System/Libraries
171
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100172%description -n libosmogb12
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200173libosmocore is a package with various utility functions that were
174originally developed as part of the OpenBSC project.
175
176The libosmogb library contains a GPRS BSSGP protocol implementation.
177
178%package -n libosmogb-devel
179Summary: Development files for the Osmocom GPRS Gb interface library
180License: AGPL-3.0-or-later
181Group: Development/Libraries/C and C++
182Requires: libosmocore-devel = %version
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100183Requires: libosmogb12 = %version
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200184Requires: libosmovty-devel = %version
185
186%description -n libosmogb-devel
187The libosmogb library contains a GPRS BSSGP protocol implementation.
188
189This subpackage contains libraries and header files for developing
190applications that want to make use of libosmogb.
191
Pau Espin Pedrolc7deaf22021-11-16 13:08:22 +0100192%package -n libosmogsm17
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200193Summary: Osmocom GSM utility library
194License: GPL-2.0-or-later AND AGPL-3.0-or-later
195Group: System/Libraries
196
Pau Espin Pedrolc7deaf22021-11-16 13:08:22 +0100197%description -n libosmogsm17
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200198libosmocore is a package with various utility functions that were
199originally developed as part of the OpenBSC project.
200
201The libosmogsm library in particular is a collection of common code
202used in various GSM related sub-projects inside the Osmocom family of
203projects. It includes A5/1 and A5/2 ciphers, COMP128v1, a LAPDm
204implementation, a GSM TLV parser, SMS utility routines as well as
205protocol definitions for a series of protocols.
206
207%package -n libosmogsm-devel
208Summary: Development files for the Osmocom GSM utility library
209License: GPL-2.0-or-later AND AGPL-3.0-or-later
210Group: Development/Libraries/C and C++
211Requires: libosmocore-devel = %version
Pau Espin Pedrolc7deaf22021-11-16 13:08:22 +0100212Requires: libosmogsm17 = %version
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200213
214%description -n libosmogsm-devel
215The libosmogsm library in particular is a collection of common code
216used in various GSM related sub-projects inside the Osmocom family of
217projects. It includes A5/1 and A5/2 ciphers, COMP128v1, a LAPDm
218implementation, a GSM TLV parser, SMS utility routines as well as
219protocol definitions for a series of protocols.
220
221This subpackage contains libraries and header files for developing
222applications that want to make use of libosmogsm.
223
Harald Welte5c5713e2020-08-13 11:06:36 +0200224%package -n libosmosim2
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200225Summary: Osmocom SIM card related utility library
226License: GPL-2.0-or-later
227Group: System/Libraries
228
Harald Welte5c5713e2020-08-13 11:06:36 +0200229%description -n libosmosim2
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200230libosmocore is a package with various utility functions that were
231originally developed as part of the OpenBSC project.
232
233The libosmosim library in particular contains routines for SIM card
234access.
235
236%package -n libosmosim-devel
237Summary: Development files for the Osmocom SIM card utility library
238License: GPL-2.0-or-later
239Group: Development/Libraries/C and C++
240Requires: libosmocore-devel = %version
Harald Welte5c5713e2020-08-13 11:06:36 +0200241Requires: libosmosim2 = %version
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200242
243%description -n libosmosim-devel
244The libosmosim library in particular contains routines for SIM card
245access.
246
247This subpackage contains libraries and header files for developing
248applications that want to make use of libosmosim.
249
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100250%package -n libosmovty9
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200251Summary: Osmocom VTY interface library
252License: GPL-2.0-or-later
253Group: System/Libraries
254
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100255%description -n libosmovty9
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200256libosmocore is a package with various utility functions that were
257originally developed as part of the OpenBSC project.
258
259The libosmovty library implements the interactive command-line on the
260VTY (Virtual TTY), as well as configuration file parsing.
261
262%package -n libosmovty-devel
263Summary: Development files for the Osmocom VTY interface library
264License: GPL-2.0-or-later
265Group: Development/Libraries/C and C++
266Requires: libosmocore-devel = %version
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100267Requires: libosmovty9 = %version
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200268
269%description -n libosmovty-devel
270The libosmovty library implements the interactive command-line on the
271VTY (Virtual TTY), as well as configuration file parsing.
272
273This subpackage contains libraries and header files for developing
274applications that want to make use of libosmovty.
275
276%package -n libosmousb0
277Summary: Osmocom USB library
278License: GPL-2.0-or-later
279Group: System/Libraries
280
281%description -n libosmousb0
282libosmocore is a package with various utility functions that were
283originally developed as part of the OpenBSC project.
284
285The libosmosub library in particular contains routines for USB device
286access via libusb-1.0, integrated into the libosmocore select event loop.
287
288%package -n libosmousb-devel
289Summary: Development files for the Osmocom USB library
290License: GPL-2.0-or-later
291Group: Development/Libraries/C and C++
292Requires: libosmocore-devel = %version
293Requires: libosmousb0 = %version
Oliver Smith6370f5d2020-05-14 11:27:08 +0200294Requires: pkgconfig(libusb-1.0)
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200295
296%description -n libosmousb-devel
297The libosmosub library in particular contains routines for USB device
298access via libusb-1.0, integrated into the libosmocore select event loop.
299
300This subpackage contains libraries and header files for developing
301applications that want to make use of libosmousb.
302
303
304%prep
305%setup -q
306
307%build
308echo "%version" >.tarball-version
309autoreconf -fiv
Harald Welte700822b2021-02-03 14:52:13 +0100310%configure --enable-shared --disable-static --enable-systemd-logging \
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200311 --includedir="%_includedir/%name"
312make %{?_smp_mflags} V=1
313
314%install
315b="%buildroot"
316make %{?_smp_mflags} install DESTDIR="$b"
317find "$b/%_libdir" -type f -name "*.la" -delete
318
319%check
320make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
321
322%post -n libosmocodec0 -p /sbin/ldconfig
323%postun -n libosmocodec0 -p /sbin/ldconfig
324%post -n libosmocoding0 -p /sbin/ldconfig
325%postun -n libosmocoding0 -p /sbin/ldconfig
Pau Espin Pedrolc7deaf22021-11-16 13:08:22 +0100326%post -n libosmocore18 -p /sbin/ldconfig
327%postun -n libosmocore18 -p /sbin/ldconfig
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200328%post -n libosmoctrl0 -p /sbin/ldconfig
329%postun -n libosmoctrl0 -p /sbin/ldconfig
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100330%post -n libosmogb12 -p /sbin/ldconfig
331%postun -n libosmogb12 -p /sbin/ldconfig
Pau Espin Pedrolc7deaf22021-11-16 13:08:22 +0100332%post -n libosmogsm17 -p /sbin/ldconfig
333%postun -n libosmogsm17 -p /sbin/ldconfig
Harald Welte5c5713e2020-08-13 11:06:36 +0200334%post -n libosmosim2 -p /sbin/ldconfig
335%postun -n libosmosim2 -p /sbin/ldconfig
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100336%post -n libosmovty9 -p /sbin/ldconfig
337%postun -n libosmovty9 -p /sbin/ldconfig
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200338%post -n libosmousb0 -p /sbin/ldconfig
339%postun -n libosmousb0 -p /sbin/ldconfig
340
341%files tools
342%defattr(-,root,root)
343%_bindir/osmo-*
344
345%files -n libosmocodec0
346%defattr(-,root,root)
347%_libdir/libosmocodec.so.0*
348
349%files -n libosmocodec-devel
350%defattr(-,root,root)
351%dir %_includedir/%name
352%dir %_includedir/%name/osmocom
353%_includedir/%name/osmocom/codec/
354%_libdir/libosmocodec.so
355%_libdir/pkgconfig/libosmocodec.pc
356
357%files -n libosmocoding0
358%defattr(-,root,root)
359%_libdir/libosmocoding.so.0*
360
361%files -n libosmocoding-devel
362%defattr(-,root,root)
363%dir %_includedir/%name
364%dir %_includedir/%name/osmocom
365%_includedir/%name/osmocom/coding/
366%_libdir/libosmocoding.so
367%_libdir/pkgconfig/libosmocoding.pc
368
Pau Espin Pedrolc7deaf22021-11-16 13:08:22 +0100369%files -n libosmocore18
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200370%defattr(-,root,root)
Pau Espin Pedrolc7deaf22021-11-16 13:08:22 +0100371%_libdir/libosmocore.so.18*
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200372
373%files -n libosmocore-devel
374%defattr(-,root,root)
375%dir %_includedir/%name
376%dir %_includedir/%name/osmocom
377%_includedir/%name/osmocom/core/
378%_libdir/libosmocore.so
379%_libdir/pkgconfig/libosmocore.pc
380%_datadir/aclocal/osmo_ax_code_coverage.m4
381%_datadir/aclocal/osmo_ac_code_coverage.m4
382
383%files -n libosmoctrl0
384%defattr(-,root,root)
385%_libdir/libosmoctrl.so.0*
386
387%files -n libosmoctrl-devel
388%defattr(-,root,root)
389%dir %_includedir/%name
390%dir %_includedir/%name/osmocom
391%_includedir/%name/osmocom/ctrl/
392%_libdir/libosmoctrl.so
393%_libdir/pkgconfig/libosmoctrl.pc
394
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100395%files -n libosmogb12
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200396%defattr(-,root,root)
Harald Welteaf52bcc2021-02-24 09:05:57 +0100397%_libdir/libosmogb.so.12*
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200398
399%files -n libosmogb-devel
400%defattr(-,root,root)
401%dir %_includedir/%name
402%dir %_includedir/%name/osmocom
403%_includedir/%name/osmocom/gprs/
404%_libdir/libosmogb.so
405%_libdir/pkgconfig/libosmogb.pc
406
Pau Espin Pedrolc7deaf22021-11-16 13:08:22 +0100407%files -n libosmogsm17
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200408%defattr(-,root,root)
Pau Espin Pedrolc7deaf22021-11-16 13:08:22 +0100409%_libdir/libosmogsm.so.17*
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200410
411%files -n libosmogsm-devel
412%defattr(-,root,root)
413%dir %_includedir/%name
414%dir %_includedir/%name/osmocom
415%_includedir/%name/osmocom/gsm/
416%_includedir/%name/osmocom/crypt/
417%_libdir/libosmogsm.so
418%_libdir/pkgconfig/libosmogsm.pc
419
Harald Welte5c5713e2020-08-13 11:06:36 +0200420%files -n libosmosim2
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200421%defattr(-,root,root)
Harald Welte5c5713e2020-08-13 11:06:36 +0200422%_libdir/libosmosim.so.2*
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200423
424%files -n libosmosim-devel
425%defattr(-,root,root)
426%dir %_includedir/%name
427%dir %_includedir/%name/osmocom/
428%_includedir/%name/osmocom/sim/
429%_libdir/libosmosim.so
430%_libdir/pkgconfig/libosmosim.pc
431
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100432%files -n libosmovty9
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200433%defattr(-,root,root)
Harald Welteaf52bcc2021-02-24 09:05:57 +0100434%_libdir/libosmovty.so.9*
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200435
436%files -n libosmovty-devel
437%defattr(-,root,root)
438%dir %_includedir/%name
439%dir %_includedir/%name/osmocom
440%_includedir/%name/osmocom/vty/
441%_includedir/%name/osmo-release.mk
442%_libdir/libosmovty.so
443%_libdir/pkgconfig/libosmovty.pc
444
445%files -n libosmousb0
446%defattr(-,root,root)
447%_libdir/libosmousb.so.0*
448
449%files -n libosmousb-devel
450%defattr(-,root,root)
451%dir %_includedir/%name
452%dir %_includedir/%name/osmocom
453%_includedir/%name/osmocom/usb/
454%_libdir/libosmousb.so
455%_libdir/pkgconfig/libosmousb.pc
456
457%changelog