blob: 1ea7a8e19356ce200bf6c5869a4c2d131a5a35b8 [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
15# Please submit bugfixes or comments via http://bugs.opensuse.org/
16#
17
18
19%define version_unconverted 1.3.0.94
20
21Name: libosmocore
22Version: 1.3.0.94
23Release: 0
24Summary: The Open Source Mobile Communications Core Library
25License: GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND AGPL-3.0-or-later
26Group: Productivity/Telephony/Utilities
27Url: https://osmocom.org/projects/libosmocore/wiki/Libosmocore
28Source: %name-%version.tar.xz
29BuildRequires: automake >= 1.6
30BuildRequires: libtool >= 2
31BuildRequires: lksctp-tools-devel
32BuildRequires: pkg-config >= 0.20
33BuildRequires: python2
34BuildRequires: xz
35BuildRequires: pkgconfig(gnutls) >= 2.12.0
36BuildRequires: pkgconfig(libpcsclite)
37BuildRequires: pkgconfig(libusb-1.0)
38BuildRequires: pkgconfig(talloc) >= 2.0.1
39
40%description
41libosmocore is a package with various utility functions that were
42originally developed as part of the OpenBSC project, but which are of
43a more generic nature and thus useful to (at least) other programs
44that Osmocom develops w.r.t. mobile communications.
45
46There is no clear scope of it. It simply houses all code shared
47between OsmocomBB and OpenBSC to avoid code duplication.
48
49%package tools
50Summary: GSM utilities from the osmocore project
51License: GPL-2.0-only AND GPL-2.0-or-later AND LGPL-3.0-or-later AND AGPL-3.0-or-later
52Group: Productivity/Telephony/Utilities
53Provides: %name-utils = %version-%release
54
55%description tools
56libosmocore is a package with various utility functions that were
57originally developed as part of the OpenBSC project.
58
59This package contains a program for frequency calculation for GSM
60called "osmo-arfcn", and a program called "osmo-auc-gen" that is used
61for testing GSM authentication.
62
63%package -n libosmocodec0
64Summary: GSM 06.10, 06.20, 06.60, 06.90 codec library
65License: GPL-2.0-or-later
66Group: System/Libraries
67
68%description -n libosmocodec0
69The libosmocodec library contains an implementation of multiple
70GSM codecs:
71
72* GSM 06.10 Full Rate (FR) codec
73* GSM 06.20 Half Rate (HR) codec
74* GSM 06.60 Enhanced Full Range (EFR) codec
75* GSM 06.90 Adaptive Multi-Rate (AMR) codec
76
77%package -n libosmocodec-devel
78Summary: Development files for the Osmocom GSM codec library
79License: GPL-2.0-or-later
80Group: Development/Libraries/C and C++
81Requires: libosmocodec0 = %version
82
83%description -n libosmocodec-devel
84The libosmocodec library contains an implementation of multiple
85GSM codecs.
86
87This subpackage contains libraries and header files for developing
88applications that want to make use of libosmocodec.
89
90%package -n libosmocoding0
91Summary: GSM/GPRS/EDGE transcoding routines library
92License: GPL-2.0-or-later
93Group: System/Libraries
94
95%description -n libosmocoding0
96libosmocoding is a library which provides GSM, GPRS and EDGE
97transcoding routines.
98
99The following data types are currently supported: xCCH, PDTCH (CS 1-4
100and MCS 1-9), TCH/FR, TCH/HR, TCH/AFS, RCH/AHS, RACH and SCH.
101
102%package -n libosmocoding-devel
103Summary: Development files for the Osmocom transcoding library
104License: GPL-2.0-or-later
105Group: Development/Libraries/C and C++
106Requires: libosmocodec-devel = %version
107Requires: libosmocoding0 = %version
108Requires: libosmocore-devel = %version
109Requires: libosmogsm-devel = %version
110
111%description -n libosmocoding-devel
112libosmocoding is a library which provides GSM, GPRS and EDGE
113transcoding routines.
114
115This subpackage contains libraries and header files for developing
116applications that want to make use of libosmocoding.
117
118%package -n libosmocore12
119Summary: Osmocom core library
120# crc16.c has GPL2-only clauses, the rest (*.c) is GPL-2.0+
121License: GPL-2.0-only AND GPL-2.0-or-later
122Group: System/Libraries
123
124%description -n libosmocore12
125libosmocore is a library with various utility functions shared
126between OpenBSC and OsmocomBB.
127
128%package -n libosmocore-devel
129Summary: Development files for the Osmocom core library
130# crc16.h has GPL2-only clauses, the rest (*.h) is GPL-2.0+
131License: GPL-2.0-only AND GPL-2.0-or-later
132Group: Development/Libraries/C and C++
133Requires: libosmocore12 = %version
134Requires: libtalloc-devel
135
136%description -n libosmocore-devel
137libosmocore is a library with various utility functions shared
138between OpenBSC and OsmocomBB.
139
140This subpackage contains libraries and header files for developing
141applications that want to make use of libosmocore.
142
143%package -n libosmoctrl0
144Summary: Osmocom SNMP-like control interface library
145License: GPL-2.0-or-later
146Group: System/Libraries
147
148%description -n libosmoctrl0
149libosmocore is a package with various utility functions that were
150originally developed as part of the OpenBSC project.
151
152libosmoctrl is an SNMP-like control interface. In contrast to the VTY
153interface, the control interface is meant to be used by programs.
154
155%package -n libosmoctrl-devel
156Summary: Osmocom control interface library
157License: GPL-2.0-or-later
158Group: Development/Libraries/C and C++
159Requires: libosmocore-devel = %version
160Requires: libosmoctrl0 = %version
161Requires: libosmogsm-devel = %version
162
163%description -n libosmoctrl-devel
164libosmoctrl is an SNMP-like control interface. In contrast to the VTY
165interface, the control interface is meant to be used by programs.
166
167This subpackage contains libraries and header files for developing
168applications that want to make use of libosmoctrl.
169
170%package -n libosmogb9
171Summary: Osmocom GPRS Gb Interface (NS/BSSGP) library
172License: AGPL-3.0-or-later
173Group: System/Libraries
174
175%description -n libosmogb9
176libosmocore is a package with various utility functions that were
177originally developed as part of the OpenBSC project.
178
179The libosmogb library contains a GPRS BSSGP protocol implementation.
180
181%package -n libosmogb-devel
182Summary: Development files for the Osmocom GPRS Gb interface library
183License: AGPL-3.0-or-later
184Group: Development/Libraries/C and C++
185Requires: libosmocore-devel = %version
186Requires: libosmogb9 = %version
187Requires: libosmovty-devel = %version
188
189%description -n libosmogb-devel
190The libosmogb library contains a GPRS BSSGP protocol implementation.
191
192This subpackage contains libraries and header files for developing
193applications that want to make use of libosmogb.
194
195%package -n libosmogsm13
196Summary: Osmocom GSM utility library
197License: GPL-2.0-or-later AND AGPL-3.0-or-later
198Group: System/Libraries
199
200%description -n libosmogsm13
201libosmocore is a package with various utility functions that were
202originally developed as part of the OpenBSC project.
203
204The libosmogsm library in particular is a collection of common code
205used in various GSM related sub-projects inside the Osmocom family of
206projects. It includes A5/1 and A5/2 ciphers, COMP128v1, a LAPDm
207implementation, a GSM TLV parser, SMS utility routines as well as
208protocol definitions for a series of protocols.
209
210%package -n libosmogsm-devel
211Summary: Development files for the Osmocom GSM utility library
212License: GPL-2.0-or-later AND AGPL-3.0-or-later
213Group: Development/Libraries/C and C++
214Requires: libosmocore-devel = %version
215Requires: libosmogsm13 = %version
216
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
227%package -n libosmosim0
228Summary: Osmocom SIM card related utility library
229License: GPL-2.0-or-later
230Group: System/Libraries
231
232%description -n libosmosim0
233libosmocore is a package with various utility functions that were
234originally developed as part of the OpenBSC project.
235
236The libosmosim library in particular contains routines for SIM card
237access.
238
239%package -n libosmosim-devel
240Summary: Development files for the Osmocom SIM card utility library
241License: GPL-2.0-or-later
242Group: Development/Libraries/C and C++
243Requires: libosmocore-devel = %version
244Requires: libosmosim0 = %version
245
246%description -n libosmosim-devel
247The libosmosim library in particular contains routines for SIM card
248access.
249
250This subpackage contains libraries and header files for developing
251applications that want to make use of libosmosim.
252
253%package -n libosmovty4
254Summary: Osmocom VTY interface library
255License: GPL-2.0-or-later
256Group: System/Libraries
257
258%description -n libosmovty4
259libosmocore is a package with various utility functions that were
260originally developed as part of the OpenBSC project.
261
262The libosmovty library implements the interactive command-line on the
263VTY (Virtual TTY), as well as configuration file parsing.
264
265%package -n libosmovty-devel
266Summary: Development files for the Osmocom VTY interface library
267License: GPL-2.0-or-later
268Group: Development/Libraries/C and C++
269Requires: libosmocore-devel = %version
270Requires: libosmovty4 = %version
271
272%description -n libosmovty-devel
273The libosmovty library implements the interactive command-line on the
274VTY (Virtual TTY), as well as configuration file parsing.
275
276This subpackage contains libraries and header files for developing
277applications that want to make use of libosmovty.
278
279%package -n libosmousb0
280Summary: Osmocom USB library
281License: GPL-2.0-or-later
282Group: System/Libraries
283
284%description -n libosmousb0
285libosmocore is a package with various utility functions that were
286originally developed as part of the OpenBSC project.
287
288The libosmosub library in particular contains routines for USB device
289access via libusb-1.0, integrated into the libosmocore select event loop.
290
291%package -n libosmousb-devel
292Summary: Development files for the Osmocom USB library
293License: GPL-2.0-or-later
294Group: Development/Libraries/C and C++
295Requires: libosmocore-devel = %version
296Requires: libosmousb0 = %version
297Requires: libusb-1_0-devel
298
299%description -n libosmousb-devel
300The libosmosub library in particular contains routines for USB device
301access via libusb-1.0, integrated into the libosmocore select event loop.
302
303This subpackage contains libraries and header files for developing
304applications that want to make use of libosmousb.
305
306
307%prep
308%setup -q
309
310%build
311echo "%version" >.tarball-version
312autoreconf -fiv
313%configure --enable-shared --disable-static \
314 --includedir="%_includedir/%name"
315make %{?_smp_mflags} V=1
316
317%install
318b="%buildroot"
319make %{?_smp_mflags} install DESTDIR="$b"
320find "$b/%_libdir" -type f -name "*.la" -delete
321
322%check
323make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
324
325%post -n libosmocodec0 -p /sbin/ldconfig
326%postun -n libosmocodec0 -p /sbin/ldconfig
327%post -n libosmocoding0 -p /sbin/ldconfig
328%postun -n libosmocoding0 -p /sbin/ldconfig
329%post -n libosmocore12 -p /sbin/ldconfig
330%postun -n libosmocore12 -p /sbin/ldconfig
331%post -n libosmoctrl0 -p /sbin/ldconfig
332%postun -n libosmoctrl0 -p /sbin/ldconfig
333%post -n libosmogb9 -p /sbin/ldconfig
334%postun -n libosmogb9 -p /sbin/ldconfig
335%post -n libosmogsm13 -p /sbin/ldconfig
336%postun -n libosmogsm13 -p /sbin/ldconfig
337%post -n libosmosim0 -p /sbin/ldconfig
338%postun -n libosmosim0 -p /sbin/ldconfig
339%post -n libosmovty4 -p /sbin/ldconfig
340%postun -n libosmovty4 -p /sbin/ldconfig
341%post -n libosmousb0 -p /sbin/ldconfig
342%postun -n libosmousb0 -p /sbin/ldconfig
343
344%files tools
345%defattr(-,root,root)
346%_bindir/osmo-*
347
348%files -n libosmocodec0
349%defattr(-,root,root)
350%_libdir/libosmocodec.so.0*
351
352%files -n libosmocodec-devel
353%defattr(-,root,root)
354%dir %_includedir/%name
355%dir %_includedir/%name/osmocom
356%_includedir/%name/osmocom/codec/
357%_libdir/libosmocodec.so
358%_libdir/pkgconfig/libosmocodec.pc
359
360%files -n libosmocoding0
361%defattr(-,root,root)
362%_libdir/libosmocoding.so.0*
363
364%files -n libosmocoding-devel
365%defattr(-,root,root)
366%dir %_includedir/%name
367%dir %_includedir/%name/osmocom
368%_includedir/%name/osmocom/coding/
369%_libdir/libosmocoding.so
370%_libdir/pkgconfig/libosmocoding.pc
371
372%files -n libosmocore12
373%defattr(-,root,root)
374%_libdir/libosmocore.so.12*
375
376%files -n libosmocore-devel
377%defattr(-,root,root)
378%dir %_includedir/%name
379%dir %_includedir/%name/osmocom
380%_includedir/%name/osmocom/core/
381%_libdir/libosmocore.so
382%_libdir/pkgconfig/libosmocore.pc
383%_datadir/aclocal/osmo_ax_code_coverage.m4
384%_datadir/aclocal/osmo_ac_code_coverage.m4
385
386%files -n libosmoctrl0
387%defattr(-,root,root)
388%_libdir/libosmoctrl.so.0*
389
390%files -n libosmoctrl-devel
391%defattr(-,root,root)
392%dir %_includedir/%name
393%dir %_includedir/%name/osmocom
394%_includedir/%name/osmocom/ctrl/
395%_libdir/libosmoctrl.so
396%_libdir/pkgconfig/libosmoctrl.pc
397
398%files -n libosmogb9
399%defattr(-,root,root)
400%_libdir/libosmogb.so.9*
401
402%files -n libosmogb-devel
403%defattr(-,root,root)
404%dir %_includedir/%name
405%dir %_includedir/%name/osmocom
406%_includedir/%name/osmocom/gprs/
407%_libdir/libosmogb.so
408%_libdir/pkgconfig/libosmogb.pc
409
410%files -n libosmogsm13
411%defattr(-,root,root)
412%_libdir/libosmogsm.so.13*
413
414%files -n libosmogsm-devel
415%defattr(-,root,root)
416%dir %_includedir/%name
417%dir %_includedir/%name/osmocom
418%_includedir/%name/osmocom/gsm/
419%_includedir/%name/osmocom/crypt/
420%_libdir/libosmogsm.so
421%_libdir/pkgconfig/libosmogsm.pc
422
423%files -n libosmosim0
424%defattr(-,root,root)
425%_libdir/libosmosim.so.0*
426
427%files -n libosmosim-devel
428%defattr(-,root,root)
429%dir %_includedir/%name
430%dir %_includedir/%name/osmocom/
431%_includedir/%name/osmocom/sim/
432%_libdir/libosmosim.so
433%_libdir/pkgconfig/libosmosim.pc
434
435%files -n libosmovty4
436%defattr(-,root,root)
437%_libdir/libosmovty.so.4*
438
439%files -n libosmovty-devel
440%defattr(-,root,root)
441%dir %_includedir/%name
442%dir %_includedir/%name/osmocom
443%_includedir/%name/osmocom/vty/
444%_includedir/%name/osmo-release.mk
445%_libdir/libosmovty.so
446%_libdir/pkgconfig/libosmovty.pc
447
448%files -n libosmousb0
449%defattr(-,root,root)
450%_libdir/libosmousb.so.0*
451
452%files -n libosmousb-devel
453%defattr(-,root,root)
454%dir %_includedir/%name
455%dir %_includedir/%name/osmocom
456%_includedir/%name/osmocom/usb/
457%_libdir/libosmousb.so
458%_libdir/pkgconfig/libosmousb.pc
459
460%changelog