%global pkgvers 0 %global scdate0 20240527 %global schash0 21fcfff7b40f0aa3d77b53d1bd82db876e0bb896 %global branch0 master %global source0 https://github.com/Maratyszcza/FP16.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: fp16 Version: 0 Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} Summary: Half-precision floating point conversion Epoch: 1 License: BSD URL: https://github.com/Maratyszcza/FP16 BuildRequires: git cmake gcc-c++ python3-devel psimd-devel %global debug_package %{nil} %global __cmake_in_source_build 1 %description Header-only library for conversion to/from half-precision floating point formats. %package devel Summary: Development files %description devel This package contains the 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 # external psimd sed -i '/TARGET psimd/,/ENDIF/d' CMakeLists.txt # any cmake sed -i 's|${CMAKE_VERSION} VERSION_LESS "3.0"|1|' CMakeLists.txt # shared library sed -i 's|fp16 STATIC|fp16 SHARED|' CMakeLists.txt mkdir build pushd build %cmake .. -Wno-dev \ -DCMAKE_SKIP_RPATH=ON \ -DCMAKE_VERBOSE_MAKEFILE=OFF \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DPSIMD_SOURCE_DIR=%{_includedir} \ -DFP16_BUILD_TESTS=OFF \ -DFP16_BUILD_BENCHMARKS=OFF make %{?_smp_mflags} popd %install pushd build make install DESTDIR=%{buildroot} popd %files devel %license LICENSE %{_includedir}/* %changelog * Fri Sep 25 2020 Cristian Balint - github update releses