blob: b6791ebaca160bf4ccc3010e79533b024a61ae07 [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)
32BuildRequires: pkgconfig(talloc) >= 2.0.1
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
57for testing GSM authentication.
58
59%package -n libosmocodec0
60Summary: GSM 06.10, 06.20, 06.60, 06.90 codec library
61License: GPL-2.0-or-later
62Group: System/Libraries
63
64%description -n libosmocodec0
65The libosmocodec library contains an implementation of multiple
66GSM codecs:
67
68* GSM 06.10 Full Rate (FR) codec
69* GSM 06.20 Half Rate (HR) codec
70* GSM 06.60 Enhanced Full Range (EFR) codec
71* GSM 06.90 Adaptive Multi-Rate (AMR) codec
72
73%package -n libosmocodec-devel
74Summary: Development files for the Osmocom GSM codec library
75License: GPL-2.0-or-later
76Group: Development/Libraries/C and C++
77Requires: libosmocodec0 = %version
78
79%description -n libosmocodec-devel
80The libosmocodec library contains an implementation of multiple
81GSM codecs.
82
83This subpackage contains libraries and header files for developing
84applications that want to make use of libosmocodec.
85
86%package -n libosmocoding0
87Summary: GSM/GPRS/EDGE transcoding routines library
88License: GPL-2.0-or-later
89Group: System/Libraries
90
91%description -n libosmocoding0
92libosmocoding is a library which provides GSM, GPRS and EDGE
93transcoding routines.
94
95The following data types are currently supported: xCCH, PDTCH (CS 1-4
96and MCS 1-9), TCH/FR, TCH/HR, TCH/AFS, RCH/AHS, RACH and SCH.
97
98%package -n libosmocoding-devel
99Summary: Development files for the Osmocom transcoding library
100License: GPL-2.0-or-later
101Group: Development/Libraries/C and C++
102Requires: libosmocodec-devel = %version
103Requires: libosmocoding0 = %version
104Requires: libosmocore-devel = %version
105Requires: libosmogsm-devel = %version
106
107%description -n libosmocoding-devel
108libosmocoding is a library which provides GSM, GPRS and EDGE
109transcoding routines.
110
111This subpackage contains libraries and header files for developing
112applications that want to make use of libosmocoding.
113
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100114%package -n libosmocore17
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200115Summary: Osmocom core library
116# crc16.c has GPL2-only clauses, the rest (*.c) is GPL-2.0+
117License: GPL-2.0-only AND GPL-2.0-or-later
118Group: System/Libraries
119
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100120%description -n libosmocore17
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200121libosmocore is a library with various utility functions shared
122between OpenBSC and OsmocomBB.
123
124%package -n libosmocore-devel
125Summary: Development files for the Osmocom core library
126# crc16.h has GPL2-only clauses, the rest (*.h) is GPL-2.0+
127License: GPL-2.0-only AND GPL-2.0-or-later
128Group: Development/Libraries/C and C++
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100129Requires: libosmocore17 = %version
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200130Requires: libtalloc-devel
131
132%description -n libosmocore-devel
133libosmocore is a library with various utility functions shared
134between OpenBSC and OsmocomBB.
135
136This subpackage contains libraries and header files for developing
137applications that want to make use of libosmocore.
138
139%package -n libosmoctrl0
140Summary: Osmocom SNMP-like control interface library
141License: GPL-2.0-or-later
142Group: System/Libraries
143
144%description -n libosmoctrl0
145libosmocore is a package with various utility functions that were
146originally developed as part of the OpenBSC project.
147
148libosmoctrl is an SNMP-like control interface. In contrast to the VTY
149interface, the control interface is meant to be used by programs.
150
151%package -n libosmoctrl-devel
152Summary: Osmocom control interface library
153License: GPL-2.0-or-later
154Group: Development/Libraries/C and C++
155Requires: libosmocore-devel = %version
156Requires: libosmoctrl0 = %version
157Requires: libosmogsm-devel = %version
158
159%description -n libosmoctrl-devel
160libosmoctrl is an SNMP-like control interface. In contrast to the VTY
161interface, the control interface is meant to be used by programs.
162
163This subpackage contains libraries and header files for developing
164applications that want to make use of libosmoctrl.
165
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100166%package -n libosmogb12
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200167Summary: Osmocom GPRS Gb Interface (NS/BSSGP) library
168License: AGPL-3.0-or-later
169Group: System/Libraries
170
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100171%description -n libosmogb12
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200172libosmocore is a package with various utility functions that were
173originally developed as part of the OpenBSC project.
174
175The libosmogb library contains a GPRS BSSGP protocol implementation.
176
177%package -n libosmogb-devel
178Summary: Development files for the Osmocom GPRS Gb interface library
179License: AGPL-3.0-or-later
180Group: Development/Libraries/C and C++
181Requires: libosmocore-devel = %version
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100182Requires: libosmogb12 = %version
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200183Requires: libosmovty-devel = %version
184
185%description -n libosmogb-devel
186The libosmogb library contains a GPRS BSSGP protocol implementation.
187
188This subpackage contains libraries and header files for developing
189applications that want to make use of libosmogb.
190
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100191%package -n libosmogsm16
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200192Summary: Osmocom GSM utility library
193License: GPL-2.0-or-later AND AGPL-3.0-or-later
194Group: System/Libraries
195
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100196%description -n libosmogsm16
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200197libosmocore is a package with various utility functions that were
198originally developed as part of the OpenBSC project.
199
200The libosmogsm library in particular is a collection of common code
201used in various GSM related sub-projects inside the Osmocom family of
202projects. It includes A5/1 and A5/2 ciphers, COMP128v1, a LAPDm
203implementation, a GSM TLV parser, SMS utility routines as well as
204protocol definitions for a series of protocols.
205
206%package -n libosmogsm-devel
207Summary: Development files for the Osmocom GSM utility library
208License: GPL-2.0-or-later AND AGPL-3.0-or-later
209Group: Development/Libraries/C and C++
210Requires: libosmocore-devel = %version
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100211Requires: libosmogsm16 = %version
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200212
213%description -n libosmogsm-devel
214The libosmogsm library in particular is a collection of common code
215used in various GSM related sub-projects inside the Osmocom family of
216projects. It includes A5/1 and A5/2 ciphers, COMP128v1, a LAPDm
217implementation, a GSM TLV parser, SMS utility routines as well as
218protocol definitions for a series of protocols.
219
220This subpackage contains libraries and header files for developing
221applications that want to make use of libosmogsm.
222
Harald Welte5c5713e2020-08-13 11:06:36 +0200223%package -n libosmosim2
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200224Summary: Osmocom SIM card related utility library
225License: GPL-2.0-or-later
226Group: System/Libraries
227
Harald Welte5c5713e2020-08-13 11:06:36 +0200228%description -n libosmosim2
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200229libosmocore is a package with various utility functions that were
230originally developed as part of the OpenBSC project.
231
232The libosmosim library in particular contains routines for SIM card
233access.
234
235%package -n libosmosim-devel
236Summary: Development files for the Osmocom SIM card utility library
237License: GPL-2.0-or-later
238Group: Development/Libraries/C and C++
239Requires: libosmocore-devel = %version
Harald Welte5c5713e2020-08-13 11:06:36 +0200240Requires: libosmosim2 = %version
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200241
242%description -n libosmosim-devel
243The libosmosim library in particular contains routines for SIM card
244access.
245
246This subpackage contains libraries and header files for developing
247applications that want to make use of libosmosim.
248
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100249%package -n libosmovty9
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200250Summary: Osmocom VTY interface library
251License: GPL-2.0-or-later
252Group: System/Libraries
253
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100254%description -n libosmovty9
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200255libosmocore is a package with various utility functions that were
256originally developed as part of the OpenBSC project.
257
258The libosmovty library implements the interactive command-line on the
259VTY (Virtual TTY), as well as configuration file parsing.
260
261%package -n libosmovty-devel
262Summary: Development files for the Osmocom VTY interface library
263License: GPL-2.0-or-later
264Group: Development/Libraries/C and C++
265Requires: libosmocore-devel = %version
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100266Requires: libosmovty9 = %version
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200267
268%description -n libosmovty-devel
269The libosmovty library implements the interactive command-line on the
270VTY (Virtual TTY), as well as configuration file parsing.
271
272This subpackage contains libraries and header files for developing
273applications that want to make use of libosmovty.
274
275%package -n libosmousb0
276Summary: Osmocom USB library
277License: GPL-2.0-or-later
278Group: System/Libraries
279
280%description -n libosmousb0
281libosmocore is a package with various utility functions that were
282originally developed as part of the OpenBSC project.
283
284The libosmosub library in particular contains routines for USB device
285access via libusb-1.0, integrated into the libosmocore select event loop.
286
287%package -n libosmousb-devel
288Summary: Development files for the Osmocom USB library
289License: GPL-2.0-or-later
290Group: Development/Libraries/C and C++
291Requires: libosmocore-devel = %version
292Requires: libosmousb0 = %version
Oliver Smith6370f5d2020-05-14 11:27:08 +0200293Requires: pkgconfig(libusb-1.0)
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200294
295%description -n libosmousb-devel
296The libosmosub library in particular contains routines for USB device
297access via libusb-1.0, integrated into the libosmocore select event loop.
298
299This subpackage contains libraries and header files for developing
300applications that want to make use of libosmousb.
301
302
303%prep
304%setup -q
305
306%build
307echo "%version" >.tarball-version
308autoreconf -fiv
Harald Welte700822b2021-02-03 14:52:13 +0100309%configure --enable-shared --disable-static --enable-systemd-logging \
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200310 --includedir="%_includedir/%name"
311make %{?_smp_mflags} V=1
312
313%install
314b="%buildroot"
315make %{?_smp_mflags} install DESTDIR="$b"
316find "$b/%_libdir" -type f -name "*.la" -delete
317
318%check
319make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
320
321%post -n libosmocodec0 -p /sbin/ldconfig
322%postun -n libosmocodec0 -p /sbin/ldconfig
323%post -n libosmocoding0 -p /sbin/ldconfig
324%postun -n libosmocoding0 -p /sbin/ldconfig
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100325%post -n libosmocore17 -p /sbin/ldconfig
326%postun -n libosmocore17 -p /sbin/ldconfig
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200327%post -n libosmoctrl0 -p /sbin/ldconfig
328%postun -n libosmoctrl0 -p /sbin/ldconfig
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100329%post -n libosmogb12 -p /sbin/ldconfig
330%postun -n libosmogb12 -p /sbin/ldconfig
331%post -n libosmogsm16 -p /sbin/ldconfig
332%postun -n libosmogsm16 -p /sbin/ldconfig
Harald Welte5c5713e2020-08-13 11:06:36 +0200333%post -n libosmosim2 -p /sbin/ldconfig
334%postun -n libosmosim2 -p /sbin/ldconfig
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100335%post -n libosmovty9 -p /sbin/ldconfig
336%postun -n libosmovty9 -p /sbin/ldconfig
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200337%post -n libosmousb0 -p /sbin/ldconfig
338%postun -n libosmousb0 -p /sbin/ldconfig
339
340%files tools
341%defattr(-,root,root)
342%_bindir/osmo-*
343
344%files -n libosmocodec0
345%defattr(-,root,root)
346%_libdir/libosmocodec.so.0*
347
348%files -n libosmocodec-devel
349%defattr(-,root,root)
350%dir %_includedir/%name
351%dir %_includedir/%name/osmocom
352%_includedir/%name/osmocom/codec/
353%_libdir/libosmocodec.so
354%_libdir/pkgconfig/libosmocodec.pc
355
356%files -n libosmocoding0
357%defattr(-,root,root)
358%_libdir/libosmocoding.so.0*
359
360%files -n libosmocoding-devel
361%defattr(-,root,root)
362%dir %_includedir/%name
363%dir %_includedir/%name/osmocom
364%_includedir/%name/osmocom/coding/
365%_libdir/libosmocoding.so
366%_libdir/pkgconfig/libosmocoding.pc
367
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100368%files -n libosmocore17
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200369%defattr(-,root,root)
Harald Welte5c5713e2020-08-13 11:06:36 +0200370%_libdir/libosmocore.so.16*
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200371
372%files -n libosmocore-devel
373%defattr(-,root,root)
374%dir %_includedir/%name
375%dir %_includedir/%name/osmocom
376%_includedir/%name/osmocom/core/
377%_libdir/libosmocore.so
378%_libdir/pkgconfig/libosmocore.pc
379%_datadir/aclocal/osmo_ax_code_coverage.m4
380%_datadir/aclocal/osmo_ac_code_coverage.m4
381
382%files -n libosmoctrl0
383%defattr(-,root,root)
384%_libdir/libosmoctrl.so.0*
385
386%files -n libosmoctrl-devel
387%defattr(-,root,root)
388%dir %_includedir/%name
389%dir %_includedir/%name/osmocom
390%_includedir/%name/osmocom/ctrl/
391%_libdir/libosmoctrl.so
392%_libdir/pkgconfig/libosmoctrl.pc
393
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100394%files -n libosmogb12
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200395%defattr(-,root,root)
Harald Welte5c5713e2020-08-13 11:06:36 +0200396%_libdir/libosmogb.so.11*
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200397
398%files -n libosmogb-devel
399%defattr(-,root,root)
400%dir %_includedir/%name
401%dir %_includedir/%name/osmocom
402%_includedir/%name/osmocom/gprs/
403%_libdir/libosmogb.so
404%_libdir/pkgconfig/libosmogb.pc
405
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100406%files -n libosmogsm16
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200407%defattr(-,root,root)
Harald Welte5c5713e2020-08-13 11:06:36 +0200408%_libdir/libosmogsm.so.15*
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200409
410%files -n libosmogsm-devel
411%defattr(-,root,root)
412%dir %_includedir/%name
413%dir %_includedir/%name/osmocom
414%_includedir/%name/osmocom/gsm/
415%_includedir/%name/osmocom/crypt/
416%_libdir/libosmogsm.so
417%_libdir/pkgconfig/libosmogsm.pc
418
Harald Welte5c5713e2020-08-13 11:06:36 +0200419%files -n libosmosim2
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200420%defattr(-,root,root)
Harald Welte5c5713e2020-08-13 11:06:36 +0200421%_libdir/libosmosim.so.2*
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200422
423%files -n libosmosim-devel
424%defattr(-,root,root)
425%dir %_includedir/%name
426%dir %_includedir/%name/osmocom/
427%_includedir/%name/osmocom/sim/
428%_libdir/libosmosim.so
429%_libdir/pkgconfig/libosmosim.pc
430
Pau Espin Pedrolf286fdc2021-02-23 14:03:31 +0100431%files -n libosmovty9
Oliver Smithbfeeb1c2020-05-14 11:23:13 +0200432%defattr(-,root,root)
433%_libdir/libosmovty.so.4*
434
435%files -n libosmovty-devel
436%defattr(-,root,root)
437%dir %_includedir/%name
438%dir %_includedir/%name/osmocom
439%_includedir/%name/osmocom/vty/
440%_includedir/%name/osmo-release.mk
441%_libdir/libosmovty.so
442%_libdir/pkgconfig/libosmovty.pc
443
444%files -n libosmousb0
445%defattr(-,root,root)
446%_libdir/libosmousb.so.0*
447
448%files -n libosmousb-devel
449%defattr(-,root,root)
450%dir %_includedir/%name
451%dir %_includedir/%name/osmocom
452%_includedir/%name/osmocom/usb/
453%_libdir/libosmousb.so
454%_libdir/pkgconfig/libosmousb.pc
455
456%changelog