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