File libosmocore.spec of Package libosmocore (Revision b16042785ee5e3c36bc2c4f52c8b404d)

Currently displaying revision b16042785ee5e3c36bc2c4f52c8b404d , Show latest

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