# Define the full and short commit hashes for easy updating %global commit eb126aaadff4359614fe676f782f47b79c0877a7 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: fastnoise Version: 1.1.2 Release: 1%{?dist} Summary: FastNoise, a comprehensive noise generation library (git snapshot) License: MIT URL: https://github.com/Auburn/FastNoise # This URL points to the source code tarball for the v1.1.2 tag Source0: https://github.com/say-paul/FastNoiseLite/archive/refs/tags/v%{version}.tar.gz#/fastnoise-%{version}.tar.gz BuildRequires: cmake BuildRequires: gcc-c++ %description A comprehensive noise generation library that supports various noise types. This package is built from git commit %{shortcommit}. %prep # The setup directory also uses the %{version} macro %setup -q -n FastNoiseLite-%{version} %build cd FastNoiseLite %cmake . %cmake_build %install %cmake_install %files %{_libdir}/libFastNoiseLite.so %{_includedir}/FastNoise.h