%global pkgvers 0 %global scdate0 20230403 %global schash0 e0f1b88b8efcb24ffa0ec55eabb78fbe61e58ae7 %global branch0 master %global source0 https://github.com/KarypisLab/METIS.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: metis Version: 5.2.1 Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} Summary: Set of serial programs for partitioning graphs License: Apache URL: https://github.com/KarypisLab/METIS Patch0: %{name}-libmetis.patch BuildRequires: cmake gcc git pcre-devel gklib-devel %global __cmake_in_source_build 1 %description METIS is a set of serial programs for partitioning graphs, partitioning finite element meshes, and producing fill reducing orderings for sparse matrices. %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 %patch0 -p0 %build sed -i 's|-Werror||g' conf/gkbuild.cmake sed -i '/-march=native/d' conf/gkbuild.cmake sed -i '/gk_GetProcVmPeak/d' programs/??metis.c sed -i '/add_library(metis/a target_link_libraries(metis GKlib)' libmetis/CMakeLists.txt export CFLAGS="%{optflags} -g" make config shared=1 openmp=1 cc=gcc prefix=/usr %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 %doc README.md %{_bindir}/* %{_libdir}/lib*.so.* %files devel %{_includedir}/* %{_datadir}/* %{_libdir}/lib*.so %changelog * Fri Dec 03 2021 Balint Cristian - github update releases