%global pkgvers 0 %global scdate0 20241117 %global schash0 590cba1d6c00dffba7abb5f399680ac50e252adf %global branch0 main %global source0 https://github.com/amaranth-lang/amaranth.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: amaranth Summary: Amaranth HDL Version: 0.6.0 Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} BuildArch: noarch License: BSD URL: https://amaranth-lang.org BuildRequires: git python3-devel python3-setuptools python3-setuptools_scm python3-wheel Requires: pyvcd-python3 python3-jinja2 %global _python_dist_allow_version_zero 1 %description The Amaranth project provides an open-source toolchain for developing hardware based on synchronous digital logic using the Python programming language. %package python3 Summary: %{summary} Provides: amaranth %description python3 The Amaranth project provides an open-source toolchain for developing hardware based on synchronous digital logic using the Python programming language. %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 echo "import setuptools; setuptools.setup(packages=['amaranth'],name='%{name}',version='%{version}')" > setup.py %{__python3} setup.py build %install %{__python3} setup.py install --root %{buildroot} --install-lib=%{python3_sitelib} echo '' > %{buildroot}%{python3_sitelib}/*.egg-info/requires.txt || true %files python3 %doc README.md %doc examples %if 0%{?fedora} > 36 %{_bindir}/* %endif %license LICENSE.txt %{python3_sitelib}/* %changelog * Sun Dec 05 2021 Cristian Balint github release