%global pkgvers 0 %global scdate0 20240507 %global schash0 fb8cd65221e7b1c9dbb2df9f234235e7fe9dfe51 %global branch0 master %global source0 https://gerrit.osmocom.org/libosmocore.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: libosmocore Version: 1.9.2 Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} Summary: Utility functions for Osmocom related projects License: GPLv2 URL: https://osmocom.org/projects/libosmocore/wiki/Libosmocore BuildRequires: git make gcc autoconf automake libtool doxygen python3 BuildRequires: pkgconf-pkg-config libmnl-devel gnutls-devel libusbx-devel BuildRequires: libtalloc-devel pcsc-lite-devel lksctp-tools-devel liburing-devel %undefine _hardened_build %undefine _annotated_build %global __cmake_in_source_build 1 %description A collection of common code used in various sub-projects inside the Osmocom family of projects. %package devel Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} %description devel Development files for %{name}. %package doc Summary: Documentation files for %{name} Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc Documentation files for %{name}. %prep %setup -T -c -n %{name} git clone --depth 1 -n -b %{branch0} %{source0} . git fetch --depth 1 origin %{schash0} git reset --hard %{schash0} git log --format=fuller %build %global optflags %(echo %optflags | sed 's|-Wp,-D_GLIBCXX_ASSERTIONS||g') autoreconf -fi %configure --enable-shared \ --disable-static \ --enable-manual # Fix unused direct shlib dependency sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool make %{?_smp_mflags} VERBOSE=0 %install make install DESTDIR=%{buildroot} find %{buildroot} -name '*.la' -exec rm -f {} \; sed -i -e 's|UNKNOWN|%{version}|g' %{buildroot}/%{_libdir}/pkgconfig/*.pc rm -rf %{buildroot}/%{_datadir}/aclocal %check make check || true %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %doc README.md %license COPYING %{_bindir}/* %{_libdir}/*.so.* %files devel %{_includedir}/osmocom/* %{_includedir}/osmo-release.mk %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc %files doc %doc %{_docdir}/%{name} %changelog * Sun Aug 26 2018 Cristian Balint - github update releases