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