%global pkgvers 1 %global scdate0 20221108 %global schash0 2bccf45b93770cd9e839c65276d1117123c77a34 %global branch0 master %global source0 https://github.com/litex-hub/pythondata-cpu-ibex.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: litex-pythondata-cpu-ibex Version: 2022.08 Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} Summary: Non-Python files needed for the cpu ibex License: BSD BuildArch: noarch URL: https://github.com/litex-hub/pythondata-cpu-ibex BuildRequires: git python3-devel python3-setuptools Requires: %{name}-python3 = %{version}-%{release} %description Non-Python files needed for the cpu ibex packaged into a Python module so they can be used with Python libraries and tools. %package python3 Summary: %{summary} Requires: litex-python3 Requires: riscv64-gcc-c++ Provides: pythondata-cpu-ibex %description python3 Non-Python files needed for the cpu ibex 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 %build sed -i 's|= 1b| = 0b|g' ./pythondata_cpu_ibex/system_verilog/vendor/google_riscv-dv/pygen/pygen_src/riscv_instr_pkg.py %{py3_build} %install %{py3_install} for f in `find %{buildroot} -name '*.py'`; do sed -i -e 's|#!/usr/bin/env python.*|#!/usr/bin/python3|' $f done %files python3 %doc README.md %license LICENSE %{python3_sitelib}/* %changelog * Thu Nov 18 2021 Cristian Balint - initial release