File libosmocore.spec of Package libosmocore (Revision 215)

Currently displaying revision 215 , Show latest

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