%global pkgvers 4 %global scdate0 20201104 %global schash0 fcb03245613ccf3079cc833a701f13d0beaae09d %global branch0 master %global source0 https://github.com/litex-hub/pythondata-software-compiler_rt.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: litex-pythondata-software-compiler_rt Version: 2022.08 Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} Summary: Non-Python files needed for the software compiler_rt License: BSD BuildArch: noarch URL: https://github.com/litex-hub/pythondata-software-compiler_rt Patch0: pythondata-software-compiler_rt.patch BuildRequires: git python3-devel python3-setuptools Requires: %{name}-python3 = %{version}-%{release} %description Non-Python files needed for the software compiler_rt packaged into a Python module so they can be used with Python libraries and tools. %package python3 Summary: %{summary} Requires: litex-python3 Provides: pythondata-software-compiler_rt %description python3 Non-Python files needed for the software compiler_rt packaged into a Python module so they can be used with Python libraries and tools. %prep %setup -T -c -n %{name} find %{_builddir} -name SPECPARTS -exec rm -rf {} + git clone --depth 1 -n -b %{branch0} %{source0} . git fetch --depth 1 origin %{schash0} git reset --hard %{schash0} git log --format=fuller %patch0 -p1 %build %{py3_build} %install %{py3_install} find %{buildroot} -name '*.py' -exec sed -i 's|#!/usr/bin/python.*|#!/usr/bin/python3|g' {} + find %{buildroot} -name '*.py' -exec sed -i 's|#!/usr/bin/env python.*|#!/usr/bin/python3|g' {} + sed -i 's|#!/usr/bin/env python.*|#!/usr/bin/python3|g' \ %{buildroot}%{python3_sitelib}/pythondata_software_compiler_rt/data/make/filter-inputs %files python3 %doc README.md %license LICENSE %{python3_sitelib}/* %changelog * Thu Nov 18 2021 Cristian Balint - initial release