%global commit fd159bf8c37a2a0b7ba328766f3c96d9aa075f27 %global gittag 1.2.0 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: safestringlib Version: 1.2.020240520^%{shortcommit} Release: %autorelease Summary: Routines for safe string operations License: MIT URL: https://github.com/intel/safestringlib Source0: https://github.com/intel/safestringlib/archive/%{commit}.zip #fix the cmake file Patch0: https://github.com/intel/safestringlib/pull/76.patch BuildRequires: cmake BuildRequires: gcc # ninja is used cause it is faster than make BuildRequires: ninja-build %description This library includes routines for safe string operations (like strcpy) and memory routines (like memcpy) that are recommended for Linux/Android operating systems, and will also work for Windows. This library is especially useful for cross-platform situations where one library for these routines is preferred. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} %description devel The %{name}-devel package contains header files for developing %prep %autosetup -n %{name}-%{commit} -p1 %build %cmake -G Ninja -DBUILD_UNITTESTS=ON %cmake_build %install %cmake_install mv /usr/lib/libsafestring_shared.so* /usr/lib64/ %check %ctest %files %{_libdir}/libsafestring_shared.so.1.2.0 %doc README.md %license LICENSE LICENSE©ING.txt %files devel %{_libdir}/libsafestring_shared.so %{_includedir}/*.h %{_datadir}/safestring/cmake/ %changelog %autochangelog