%global pkgvers 0 %global scdate0 20261116 %global schash0 a4aeab508ee27ae102ce9b5fcc268615d07eb400 %global branch0 master %global source0 https://github.com/KarypisLab/GKlib.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: gklib Version: %(curl -s https://raw.githubusercontent.com/KarypisLab/GKlib/%{schash0}/CMakeLists.txt | sed -n 's/\r$//; /project(/,/)/{/VERSION/s/.*VERSION[[:space:]]*\([0-9.]*\).*/\1/p}') Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} Summary: Various helper routines and frameworks License: Apache URL: https://github.com/KarypisLab/GKlib BuildRequires: gcc cmake git pcre2-devel %description A library of various helper routines and frameworks used by many of the lab's software. %package devel Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} %description devel This package contains 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 %ifnarch x86_64 sed -i '/("test")/d' CMakeLists.txt %endif %cmake .. -Wno-dev -G "Unix Makefiles" \ -DCMAKE_SKIP_RPATH=ON \ -DCMAKE_VERBOSE_MAKEFILE=OFF \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ %ifnarch x86_64 -DNO_X86=ON \ %endif -DSHARED=ON \ -DOPENMP=ON \ -DPCRE=ON %cmake_build %install %cmake_install # fix libdir path mkdir -p %{buildroot}%{_libdir} mv -f %{buildroot}/usr/lib/* %{buildroot}%{_libdir}/ || true %files %license LICENSE.txt %doc README.md %{_bindir}/* %{_libdir}/lib*.so.* %files devel %{_includedir}/* %{_datadir}/* %{_libdir}/cmake/* %{_libdir}/lib*.so %changelog * Fri Dec 03 2021 Balint Cristian - github update releases