aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libosmocore.spec.in
blob: 93e5e16855a40c20c762175aa0cc41a4bafa66b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
#
# spec file for package libosmocore
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

Name:           libosmocore
Version:        @VERSION@
Release:        0
Summary:        The Open Source Mobile Communications Core Library
License:        GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND AGPL-3.0-or-later
Group:          Productivity/Telephony/Utilities
Url:            https://osmocom.org/projects/libosmocore/wiki/Libosmocore
Source:         %name-%version.tar.xz
BuildRequires:  automake >= 1.6
BuildRequires:  libtool >= 2
BuildRequires:  lksctp-tools-devel
BuildRequires:  pkg-config >= 0.20
BuildRequires:  python3
BuildRequires:  xz
BuildRequires:  pkgconfig(gnutls) >= 2.12.0
BuildRequires:  pkgconfig(libpcsclite)
BuildRequires:  pkgconfig(libusb-1.0)
BuildRequires:  pkgconfig(talloc) >= 2.0.1
BuildRequires:  pkgconfig(libmnl)
BuildRequires:  pkgconfig(libsystemd)

%description
libosmocore is a package with various utility functions that were
originally developed as part of the OpenBSC project, but which are of
a more generic nature and thus useful to (at least) other programs
that Osmocom develops w.r.t. mobile communications.

There is no clear scope of it. It simply houses all code shared
between OsmocomBB and OpenBSC to avoid code duplication.

%package tools
Summary:        GSM utilities from the osmocore project
License:        GPL-2.0-only AND GPL-2.0-or-later AND LGPL-3.0-or-later AND AGPL-3.0-or-later
Group:          Productivity/Telephony/Utilities
Provides:       %name-utils = %version-%release

%description tools
libosmocore is a package with various utility functions that were
originally developed as part of the OpenBSC project.

This package contains a program for frequency calculation for GSM
called "osmo-arfcn", and a program called "osmo-auc-gen" that is used
for testing GSM authentication.

%package -n libosmocodec0
Summary:        GSM 06.10, 06.20, 06.60, 06.90 codec library
License:        GPL-2.0-or-later
Group:          System/Libraries

%description -n libosmocodec0
The libosmocodec library contains an implementation of multiple
GSM codecs:

* GSM 06.10 Full Rate (FR) codec
* GSM 06.20 Half Rate (HR) codec
* GSM 06.60 Enhanced Full Range (EFR) codec
* GSM 06.90 Adaptive Multi-Rate (AMR) codec

%package -n libosmocodec-devel
Summary:        Development files for the Osmocom GSM codec library
License:        GPL-2.0-or-later
Group:          Development/Libraries/C and C++
Requires:       libosmocodec0 = %version

%description -n libosmocodec-devel
The libosmocodec library contains an implementation of multiple
GSM codecs.

This subpackage contains libraries and header files for developing
applications that want to make use of libosmocodec.

%package -n libosmocoding0
Summary:        GSM/GPRS/EDGE transcoding routines library
License:        GPL-2.0-or-later
Group:          System/Libraries

%description -n libosmocoding0
libosmocoding is a library which provides GSM, GPRS and EDGE
transcoding routines.

The following data types are currently supported: xCCH, PDTCH (CS 1-4
and MCS 1-9), TCH/FR, TCH/HR, TCH/AFS, RCH/AHS, RACH and SCH.

%package -n libosmocoding-devel
Summary:        Development files for the Osmocom transcoding library
License:        GPL-2.0-or-later
Group:          Development/Libraries/C and C++
Requires:       libosmocodec-devel = %version
Requires:       libosmocoding0 = %version
Requires:       libosmocore-devel = %version
Requires:       libosmogsm-devel = %version

%description -n libosmocoding-devel
libosmocoding is a library which provides GSM, GPRS and EDGE
transcoding routines.

This subpackage contains libraries and header files for developing
applications that want to make use of libosmocoding.

%package -n libosmocore16
Summary:        Osmocom core library
# crc16.c has GPL2-only clauses, the rest (*.c) is GPL-2.0+
License:        GPL-2.0-only AND GPL-2.0-or-later
Group:          System/Libraries

%description -n libosmocore16
libosmocore is a library with various utility functions shared
between OpenBSC and OsmocomBB.

%package -n libosmocore-devel
Summary:        Development files for the Osmocom core library
# crc16.h has GPL2-only clauses, the rest (*.h) is GPL-2.0+
License:        GPL-2.0-only AND GPL-2.0-or-later
Group:          Development/Libraries/C and C++
Requires:       libosmocore16 = %version
Requires:       libtalloc-devel

%description -n libosmocore-devel
libosmocore is a library with various utility functions shared
between OpenBSC and OsmocomBB.

This subpackage contains libraries and header files for developing
applications that want to make use of libosmocore.

%package -n libosmoctrl0
Summary:        Osmocom SNMP-like control interface library
License:        GPL-2.0-or-later
Group:          System/Libraries

%description -n libosmoctrl0
libosmocore is a package with various utility functions that were
originally developed as part of the OpenBSC project.

libosmoctrl is an SNMP-like control interface. In contrast to the VTY
interface, the control interface is meant to be used by programs.

%package -n libosmoctrl-devel
Summary:        Osmocom control interface library
License:        GPL-2.0-or-later
Group:          Development/Libraries/C and C++
Requires:       libosmocore-devel = %version
Requires:       libosmoctrl0 = %version
Requires:       libosmogsm-devel = %version

%description -n libosmoctrl-devel
libosmoctrl is an SNMP-like control interface. In contrast to the VTY
interface, the control interface is meant to be used by programs.

This subpackage contains libraries and header files for developing
applications that want to make use of libosmoctrl.

%package -n libosmogb11
Summary:        Osmocom GPRS Gb Interface (NS/BSSGP) library
License:        AGPL-3.0-or-later
Group:          System/Libraries

%description -n libosmogb11
libosmocore is a package with various utility functions that were
originally developed as part of the OpenBSC project.

The libosmogb library contains a GPRS BSSGP protocol implementation.

%package -n libosmogb-devel
Summary:        Development files for the Osmocom GPRS Gb interface library
License:        AGPL-3.0-or-later
Group:          Development/Libraries/C and C++
Requires:       libosmocore-devel = %version
Requires:       libosmogb11 = %version
Requires:       libosmovty-devel = %version

%description -n libosmogb-devel
The libosmogb library contains a GPRS BSSGP protocol implementation.

This subpackage contains libraries and header files for developing
applications that want to make use of libosmogb.

%package -n libosmogsm15
Summary:        Osmocom GSM utility library
License:        GPL-2.0-or-later AND AGPL-3.0-or-later
Group:          System/Libraries

%description -n libosmogsm15
libosmocore is a package with various utility functions that were
originally developed as part of the OpenBSC project.

The libosmogsm library in particular is a collection of common code
used in various GSM related sub-projects inside the Osmocom family of
projects. It includes A5/1 and A5/2 ciphers, COMP128v1, a LAPDm
implementation, a GSM TLV parser, SMS utility routines as well as
protocol definitions for a series of protocols.

%package -n libosmogsm-devel
Summary:        Development files for the Osmocom GSM utility library
License:        GPL-2.0-or-later AND AGPL-3.0-or-later
Group:          Development/Libraries/C and C++
Requires:       libosmocore-devel = %version
Requires:       libosmogsm15 = %version

%description -n libosmogsm-devel
The libosmogsm library in particular is a collection of common code
used in various GSM related sub-projects inside the Osmocom family of
projects. It includes A5/1 and A5/2 ciphers, COMP128v1, a LAPDm
implementation, a GSM TLV parser, SMS utility routines as well as
protocol definitions for a series of protocols.

This subpackage contains libraries and header files for developing
applications that want to make use of libosmogsm.

%package -n libosmosim2
Summary:        Osmocom SIM card related utility library
License:        GPL-2.0-or-later
Group:          System/Libraries

%description -n libosmosim2
libosmocore is a package with various utility functions that were
originally developed as part of the OpenBSC project.

The libosmosim library in particular contains routines for SIM card
access.

%package -n libosmosim-devel
Summary:        Development files for the Osmocom SIM card utility library
License:        GPL-2.0-or-later
Group:          Development/Libraries/C and C++
Requires:       libosmocore-devel = %version
Requires:       libosmosim2 = %version

%description -n libosmosim-devel
The libosmosim library in particular contains routines for SIM card
access.

This subpackage contains libraries and header files for developing
applications that want to make use of libosmosim.

%package -n libosmovty4
Summary:        Osmocom VTY interface library
License:        GPL-2.0-or-later
Group:          System/Libraries

%description -n libosmovty4
libosmocore is a package with various utility functions that were
originally developed as part of the OpenBSC project.

The libosmovty library implements the interactive command-line on the
VTY (Virtual TTY), as well as configuration file parsing.

%package -n libosmovty-devel
Summary:        Development files for the Osmocom VTY interface library
License:        GPL-2.0-or-later
Group:          Development/Libraries/C and C++
Requires:       libosmocore-devel = %version
Requires:       libosmovty4 = %version

%description -n libosmovty-devel
The libosmovty library implements the interactive command-line on the
VTY (Virtual TTY), as well as configuration file parsing.

This subpackage contains libraries and header files for developing
applications that want to make use of libosmovty.

%package -n libosmousb0
Summary:        Osmocom USB library
License:        GPL-2.0-or-later
Group:          System/Libraries

%description -n libosmousb0
libosmocore is a package with various utility functions that were
originally developed as part of the OpenBSC project.

The libosmosub library in particular contains routines for USB device
access via libusb-1.0, integrated into the libosmocore select event loop.

%package -n libosmousb-devel
Summary:        Development files for the Osmocom USB library
License:        GPL-2.0-or-later
Group:          Development/Libraries/C and C++
Requires:       libosmocore-devel = %version
Requires:       libosmousb0 = %version
Requires:       pkgconfig(libusb-1.0)

%description -n libosmousb-devel
The libosmosub library in particular contains routines for USB device
access via libusb-1.0, integrated into the libosmocore select event loop.

This subpackage contains libraries and header files for developing
applications that want to make use of libosmousb.


%prep
%setup -q

%build
echo "%version" >.tarball-version
autoreconf -fiv
%configure --enable-shared --disable-static --enable-systemd-logging \
	--includedir="%_includedir/%name"
make %{?_smp_mflags} V=1

%install
b="%buildroot"
make %{?_smp_mflags} install DESTDIR="$b"
find "$b/%_libdir" -type f -name "*.la" -delete

%check
make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)

%post   -n libosmocodec0 -p /sbin/ldconfig
%postun -n libosmocodec0 -p /sbin/ldconfig
%post   -n libosmocoding0 -p /sbin/ldconfig
%postun -n libosmocoding0 -p /sbin/ldconfig
%post   -n libosmocore16 -p /sbin/ldconfig
%postun -n libosmocore16 -p /sbin/ldconfig
%post   -n libosmoctrl0 -p /sbin/ldconfig
%postun -n libosmoctrl0 -p /sbin/ldconfig
%post   -n libosmogb11 -p /sbin/ldconfig
%postun -n libosmogb11 -p /sbin/ldconfig
%post   -n libosmogsm15 -p /sbin/ldconfig
%postun -n libosmogsm15 -p /sbin/ldconfig
%post   -n libosmosim2 -p /sbin/ldconfig
%postun -n libosmosim2 -p /sbin/ldconfig
%post   -n libosmovty4 -p /sbin/ldconfig
%postun -n libosmovty4 -p /sbin/ldconfig
%post   -n libosmousb0 -p /sbin/ldconfig
%postun -n libosmousb0 -p /sbin/ldconfig

%files tools
%defattr(-,root,root)
%_bindir/osmo-*

%files -n libosmocodec0
%defattr(-,root,root)
%_libdir/libosmocodec.so.0*

%files -n libosmocodec-devel
%defattr(-,root,root)
%dir %_includedir/%name
%dir %_includedir/%name/osmocom
%_includedir/%name/osmocom/codec/
%_libdir/libosmocodec.so
%_libdir/pkgconfig/libosmocodec.pc

%files -n libosmocoding0
%defattr(-,root,root)
%_libdir/libosmocoding.so.0*

%files -n libosmocoding-devel
%defattr(-,root,root)
%dir %_includedir/%name
%dir %_includedir/%name/osmocom
%_includedir/%name/osmocom/coding/
%_libdir/libosmocoding.so
%_libdir/pkgconfig/libosmocoding.pc

%files -n libosmocore16
%defattr(-,root,root)
%_libdir/libosmocore.so.16*

%files -n libosmocore-devel
%defattr(-,root,root)
%dir %_includedir/%name
%dir %_includedir/%name/osmocom
%_includedir/%name/osmocom/core/
%_libdir/libosmocore.so
%_libdir/pkgconfig/libosmocore.pc
%_datadir/aclocal/osmo_ax_code_coverage.m4
%_datadir/aclocal/osmo_ac_code_coverage.m4

%files -n libosmoctrl0
%defattr(-,root,root)
%_libdir/libosmoctrl.so.0*

%files -n libosmoctrl-devel
%defattr(-,root,root)
%dir %_includedir/%name
%dir %_includedir/%name/osmocom
%_includedir/%name/osmocom/ctrl/
%_libdir/libosmoctrl.so
%_libdir/pkgconfig/libosmoctrl.pc

%files -n libosmogb11
%defattr(-,root,root)
%_libdir/libosmogb.so.11*

%files -n libosmogb-devel
%defattr(-,root,root)
%dir %_includedir/%name
%dir %_includedir/%name/osmocom
%_includedir/%name/osmocom/gprs/
%_libdir/libosmogb.so
%_libdir/pkgconfig/libosmogb.pc

%files -n libosmogsm15
%defattr(-,root,root)
%_libdir/libosmogsm.so.15*

%files -n libosmogsm-devel
%defattr(-,root,root)
%dir %_includedir/%name
%dir %_includedir/%name/osmocom
%_includedir/%name/osmocom/gsm/
%_includedir/%name/osmocom/crypt/
%_libdir/libosmogsm.so
%_libdir/pkgconfig/libosmogsm.pc

%files -n libosmosim2
%defattr(-,root,root)
%_libdir/libosmosim.so.2*

%files -n libosmosim-devel
%defattr(-,root,root)
%dir %_includedir/%name
%dir %_includedir/%name/osmocom/
%_includedir/%name/osmocom/sim/
%_libdir/libosmosim.so
%_libdir/pkgconfig/libosmosim.pc

%files -n libosmovty4
%defattr(-,root,root)
%_libdir/libosmovty.so.4*

%files -n libosmovty-devel
%defattr(-,root,root)
%dir %_includedir/%name
%dir %_includedir/%name/osmocom
%_includedir/%name/osmocom/vty/
%_includedir/%name/osmo-release.mk
%_libdir/libosmovty.so
%_libdir/pkgconfig/libosmovty.pc

%files -n libosmousb0
%defattr(-,root,root)
%_libdir/libosmousb.so.0*

%files -n libosmousb-devel
%defattr(-,root,root)
%dir %_includedir/%name
%dir %_includedir/%name/osmocom
%_includedir/%name/osmocom/usb/
%_libdir/libosmousb.so
%_libdir/pkgconfig/libosmousb.pc

%changelog