# # spec file for package libosmocore # # Copyright (c) 2013 SUSE LINUX Products 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. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: libosmocore Summary: Open Source Mobile Communications Core Library License: GPL-2.0 and GPL-2.0+ and LGPL-3.0+ and AGPL-3.0+ Group: Development/Libraries/C and C++ Version: 0.6.0 Release: 0 Url: http://bb.osmocom.org/trac/wiki/libosmocore #Git-Clone: git://git.osmocom.org/libosmocore # Source created from tag "0.6.0" (commit 533f63f15aa584eec73044802e0a8bc798a313fe) Source: %name-%version.tar.xz Patch1: osmo-version.diff Patch2: osmo-talloc.diff Patch3: osmo-talloc2.diff Patch4: 0001-osmo-arfcn-Return-something-from-the-method.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf BuildRequires: automake >= 1.6 BuildRequires: gcc-c++ BuildRequires: libtalloc-devel BuildRequires: libtool BuildRequires: pkgconfig BuildRequires: xz %description libosmocore is a library 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 we develop in the sphere of Free Software / Open Source 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 Group: Prodc %description tools This package contains GSM utilities from libosmocore. %package -n libosmocodec0 Summary: Library for Osmocom codec-related utilities License: GPL-2.0+ Group: System/Libraries %description -n libosmocodec0 %package -n libosmocodec-devel Summary: Development files for the Osmocom codec library License: GPL-2.0+ Group: Development/Libraries/C and C++ Requires: libosmocodec0 = %version %description -n libosmocodec-devel This subpackage contains libraries and header files for developing applications that want to make use of libosmocodec. %package -n libosmocore4 Summary: Osmocom core library License: GPL-2.0 Group: System/Libraries # crc16.c has GPL2-only, the rest (*.c) is GPL-2.0+ # talloc.c (LGPL-3.0+) is not part of libosmocore.so %description -n libosmocore4 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 License: GPL-2.0 Group: Development/Libraries/C and C++ # crc16.h has GPL2-only, the rest (*.h) is GPL-2.0+ Requires: libosmocore4 = %version Requires: libtalloc-devel %description -n libosmocore-devel This subpackage contains libraries and header files for developing applications that want to make use of libosmocore. %package -n libosmogb2 Summary: Osmocom GPRS Gb Interface (NS/BSSGP) library License: AGPL-3.0+ Group: System/Libraries %description -n libosmogb2 %package -n libosmogb-devel Summary: Development files for the Osmocom GPRS Gb interface library License: AGPL-3.0+ Group: Development/Libraries/C and C++ Requires: libosmocore-devel = %version Requires: libosmogb2 = %version Requires: libosmogsm-devel = %version %description -n libosmogb-devel This subpackage contains libraries and header files for developing applications that want to make use of libosmogb. %package -n libosmogsm3 Summary: Osmocom GSM core library License: GPL-2.0+ and AGPL-3.0+ Group: System/Libraries %description -n libosmogsm3 %package -n libosmogsm-devel Summary: Development files for the Osmocom GSM core library License: GPL-2.0+ and AGPL-3.0+ Group: Development/Libraries/C and C++ Requires: libosmocore-devel = %version Requires: libosmogsm3 = %version %description -n libosmogsm-devel This subpackage contains libraries and header files for developing applications that want to make use of libosmogsm. %package -n libosmovty0 Summary: Osmocom VTY interface library License: GPL-2.0+ Group: System/Libraries %description -n libosmovty0 %package -n libosmovty-devel Summary: Development files for the Osmocom VTY interface library License: GPL-2.0+ Group: Development/Libraries/C and C++ Requires: libosmocore-devel = %version Requires: libosmovty0 = %version %description -n libosmovty-devel This subpackage contains libraries and header files for developing applications that want to make use of libosmovty. %define use_system_talloc 1 %prep %setup -qn %name %patch -P 1 -P 2 -P 3 -P 4 -p1 %build %if 0%{?use_system_talloc} echo "#include " >include/osmocom/core/talloc.h %endif autoreconf -fiv %configure --enable-shared --disable-static \ %{?use_system_talloc:--disable-talloc} make %{?_smp_mflags} %install b="%buildroot" make %{?_smp_mflags} install DESTDIR="$b" find "$b/%_libdir" -type f -name "*.la" -delete %check #make %{?_smp_mflags} check %post -n libosmocodec0 -p /sbin/ldconfig %postun -n libosmocodec0 -p /sbin/ldconfig %post -n libosmocore4 -p /sbin/ldconfig %postun -n libosmocore4 -p /sbin/ldconfig %post -n libosmogb2 -p /sbin/ldconfig %postun -n libosmogb2 -p /sbin/ldconfig %post -n libosmogsm3 -p /sbin/ldconfig %postun -n libosmogsm3 -p /sbin/ldconfig %post -n libosmovty0 -p /sbin/ldconfig %postun -n libosmovty0 -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/osmocom %_includedir/osmocom/codec/ %_libdir/libosmocodec.so %_libdir/pkgconfig/libosmocodec.pc %files -n libosmocore4 %defattr(-,root,root) %_libdir/libosmocore.so.4* %files -n libosmocore-devel %defattr(-,root,root) %dir %_includedir/osmocom %_includedir/osmocom/core/ %_libdir/libosmocore.so %_libdir/pkgconfig/libosmocore.pc %files -n libosmogb2 %defattr(-,root,root) %_libdir/libosmogb.so.2* %files -n libosmogb-devel %defattr(-,root,root) %dir %_includedir/osmocom %_includedir/osmocom/gprs/ %_libdir/libosmogb.so %_libdir/pkgconfig/libosmogb.pc %files -n libosmogsm3 %defattr(-,root,root) %_libdir/libosmogsm.so.3* %files -n libosmogsm-devel %defattr(-,root,root) %dir %_includedir/osmocom %_includedir/osmocom/gsm/ %_includedir/osmocom/crypt/ %_libdir/libosmogsm.so %_libdir/pkgconfig/libosmogsm.pc %files -n libosmovty0 %defattr(-,root,root) %_libdir/libosmovty.so.0* %files -n libosmovty-devel %defattr(-,root,root) %dir %_includedir/osmocom %_includedir/osmocom/vty/ %_libdir/libosmovty.so %_libdir/pkgconfig/libosmovty.pc %changelog