%global pkgvers 0 %global scdate0 20230912 %global schash0 7965ac7a2edeac9ffc32106c18ca1868054adc8f %global branch0 master %global source0 git://git.osmocom.org/libasn1c.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: libasn1c Version: 0.9.36 Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} License: GPLv2 Summary: Runtime library of Lev Walkin's asn1c URL: https://github.com/osmocom/libasn1c BuildRequires: git make gcc autoconf automake libtool BuildRequires: pkgconf-pkg-config libtalloc-devel %undefine _hardened_build %undefine _annotated_build %global __cmake_in_source_build 1 %description Runtime library of Lev Walkin's asn1c %package devel Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} %description devel Development 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 # 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 %check make check || true %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %license COPYING %{_libdir}/*.so.* %files devel %{_includedir}/* %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc %changelog * Tue Aug 25 2020 Cristian Balint - github update releases