%global pkgvers 0 %global scdate0 20240107 %global schash0 b606dded8508b3f0e2deb2a663ceda8467f2566d %global branch0 master %global source0 https://github.com/Maratyszcza/Opcodes.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: opcodes Version: 0 Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} Summary: Database of CPU Opcodes BuildArch: noarch License: BSD URL: https://github.com/Maratyszcza/Opcodes BuildRequires: python3-devel python3-setuptools git %description Database of CPU Opcodes %package python3 Summary: Python bindings for %{name} %description python3 Python bindings 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 CFLAGS="${RPM_OPT_FLAGS}" %{__python3} setup.py build %install rm -rf %{buildroot} %{__python3} setup.py install -O1 --skip-build --root %{buildroot} %files python3 %license LICENSE %doc MANIFEST.in README.md %{python3_sitelib}/* %changelog * Tue Jul 11 2017 Cristian Balint - github update releases