%global pkgvers 1 %global scdate0 20221106 %global schash0 a5e11229885a87083ec54034f8d693ba52ea2718 %global branch0 master %global source0 https://github.com/litex-hub/pythondata-software-picolibc.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: litex-pythondata-software-picolibc Version: 2023.04 Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} Summary: Python module containing data files for picolibc software License: BSD BuildArch: noarch URL: https://github.com/litex-hub/pythondata-software-compiler_rt BuildRequires: git python3-devel python3-setuptools python3-setuptools_scm python3-wheel Requires: %{name}-python3 = %{version}-%{release} %description Non-Python files needed for the software picolibc 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-picolibc %description python3 Non-Python files needed for the software picolibc 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 # fixes %if 0%{?rhel} == 8 sed -i '/graft/d' MANIFEST.in sed -i '/software_picolibc\/data/d' setup.py rm -rf pythondata_software_picolibc/data %else mkdir -p pythondata_software_picolibc/data %endif %build %{py3_build} %install %{py3_install} %if 0%{?rhel} == 8 git submodule update --init --depth 1 pythondata_software_picolibc/data mv -f pythondata_software_picolibc/data %{buildroot}%{python3_sitelib}/pythondata_software_picolibc/ %endif %files python3 %doc README.md %license LICENSE %{python3_sitelib}/* %changelog * Tue Apr 18 2023 Cristian Balint - initial release