## START: Set by rpmautospec ## (rpmautospec version 0.7.2) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global date 20240929 %global commit 917bc5c50193c45c579783e641f1ac70ea35ef45 # The python version is manually extracted from `pip show glasgow` in a venv %global pythonversion 0.1.dev2208+g917bc5c %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: glasgow Version: 0^%{date}git%{shortcommit} Release: %autorelease Summary: Scots Army Knife for electronics License: 0BSD OR Apache-2.0 URL: https://github.com/GlasgowEmbedded/%{name} Source: https://github.com/GlasgowEmbedded/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz %global common_description %{expand: The Glasgow software is a set of building blocks designed to eliminate incidental complexity. Each interface is packaged into a self-contained applet that can be used directly from the command line, or reused as a part of a more complex system. Using Glasgow does not require any programming knowledge, although it becomes much more powerful if you know a bit of Python.} BuildRequires: python3-devel # For udev dir BuildRequires: systemd-rpm-macros # Test requirements BuildRequires: python3dist(aiohttp) Requires: python3-%{name} = %{version}-%{release} # For the udev dir ownership Requires: systemd-udev # native toolchain # FIXME: default to native toolchain # NOTE: native toolchain should be only recommended ? # NOTE: reload/trigger udev on install ? Requires: yosys Requires: yosys-devel Requires: nextpnr Requires: icestorm BuildArch: noarch %description %{common_description} %package -n python3-%{name} Summary: %{summary} %description -n python3-%{name} %{common_description} %prep %autosetup -n %{name}-%{commit}/software mv ../LICENSE-0BSD.txt ../LICENSE-Apache-2.0.txt ../README.md . %generate_buildrequires export PDM_BUILD_SCM_VERSION="%{pythonversion}" %pyproject_buildrequires -t %build export PDM_BUILD_SCM_VERSION="%{pythonversion}" %pyproject_wheel %check %{py3_test_envvars} %{python3} -m unittest %install %pyproject_install %pyproject_save_files %{name} install -D -m 0644 ../config/70-glasgow.rules %{buildroot}/%{_udevrulesdir}/70-glasgow.rules %files -f %{pyproject_files} -n python3-%{name} %license LICENSE-0BSD.txt LICENSE-Apache-2.0.txt %files %doc README.md %{_bindir}/glasgow %{_udevrulesdir}/70-glasgow.rules %changelog ## START: Generated by rpmautospec * Sun Sep 29 2024 Antoine Damhet - 0^20240929git917bc5c-1 - glasgow: update to 0.1.dev2208+g917bc5c * Thu Aug 15 2024 Antoine Damhet - 0^20240815git97f8db8-2 - python3-fx2: bump release for rebuild * Thu Aug 15 2024 Antoine Damhet - 0^20240815git97f8db8-1 - glasgow: update to 0.1.dev2177+g97f8db8 * Thu Aug 15 2024 Antoine Damhet - 0^20240713gitc8fa37e-4 - python3-amaranth: upgrade to 0.5.1 * Thu Aug 15 2024 Antoine Damhet - 0^20240713gitc8fa37e-3 - deps/pyvcd: bump release for rebuild * Wed Aug 14 2024 Antoine Damhet - 0^20240713gitc8fa37e-2 - deps/libusb: fix rawhide support * Sat Jul 13 2024 Antoine Damhet - 0^20240713gitc8fa37e-1 - glasgow: update to `0.1.dev2096+gc8fa37e` * Sat Jul 13 2024 Antoine Damhet - 0^20240520git3365f4f-6 - python3-amaranth: upgrade to 0.5 * Sat Jul 13 2024 Antoine Damhet - 0^20240520git3365f4f-5 - deps: package python3-jschon (for amaranth update) * Mon May 20 2024 Antoine Damhet - 0^20240520git3365f4f-4 - glasgow: mirror the python version from upstream * Mon May 20 2024 Antoine Damhet - 0^20240520git3365f4f-3 - python-libusb1: drop the cython buildrequires * Mon May 20 2024 Antoine Damhet - 0^20240520git3365f4f-2 - glasgow: use factorize version field * Mon May 20 2024 Antoine Damhet - 0^20240520git3365f4f-1 - Initial glasgow package ## END: Generated by rpmautospec