%global pkgvers 0 %global scdate0 20230326 %global schash0 8bd6bad750b2b0d90800c632cf18e8ee93ad72d7 %global branch0 master %global source0 https://github.com/KarypisLab/GKlib.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: gklib Version: 5.1.1 Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} Summary: Various helper routines and frameworks License: Apache URL: https://github.com/KarypisLab/GKlib BuildRequires: gcc cmake git pcre-devel %global __cmake_in_source_build 1 %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 sed -i '/-march=native/d' GKlibSystem.cmake sed -i 's|-Werror||g' GKlibSystem.cmake %ifnarch x86_64 sed -i '/("test")/d' CMakeLists.txt %endif mkdir build pushd build %cmake .. -Wno-dev \ -DCMAKE_SKIP_RPATH=ON \ -DCMAKE_VERBOSE_MAKEFILE=OFF \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_SHARED_LINKER_FLAGS='-lpcreposix' \ -DOPENMP=ON \ -DPCRE=ON make %{?_smp_mflags} popd %install rm -rf %{buildroot} pushd build make install DESTDIR=%{buildroot} popd # fix libdir path mkdir -p %{buildroot}%{_libdir} mv -f %{buildroot}/usr/lib/* %{buildroot}%{_libdir}/ %files %license LICENSE.txt %doc README.md %ifarch x86_64 %{_bindir}/* %endif %{_libdir}/lib*.so %files devel %{_includedir}/* %{_datadir}/* %changelog * Fri Dec 03 2021 Balint Cristian - github update releases