%global pkgvers 4 %global scdate0 20221019 %global schash0 04a02101d1f7f03a2d33716192fb478e1e8605af %global branch0 master %global source0 https://github.com/chipsalliance/python-fpga-interchange.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: python-fpga-interchange Version: 0.0.20 Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} Summary: Python FPGA interchange files BuildArch: noarch License: ISC URL: https://github.com/chipsalliance/python-fpga-interchange BuildRequires: git python3-devel python3-setuptools %description Python FPGA interchange files %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 %py3_build %install %py3_install mkdir -p %{buildroot}%{_datadir}/%{name} cp -R test_data %{buildroot}%{_datadir}/%{name}/ sed -i 's|[<=>].*||g' %{buildroot}%{python3_sitelib}/*.egg-info/{requires.txt,PKG-INFO} %files %license LICENSE %{_bindir}/* %{_datadir}/* %{python3_sitelib}/* %changelog * Fri Jul 02 2021 Cristian Balint - upstream github releases