From 33aab29b3ca7d69e83c4a5906812678a4dc0beee Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Sat, 27 Sep 2025 23:03:58 -0700 Subject: [PATCH] add: fx2 (#6541) (#6545) --- anda/langs/python/fx2/anda.hcl | 6 ++++ anda/langs/python/fx2/fx2.spec | 60 +++++++++++++++++++++++++++++++ anda/langs/python/fx2/update.rhai | 1 + 3 files changed, 67 insertions(+) create mode 100644 anda/langs/python/fx2/anda.hcl create mode 100644 anda/langs/python/fx2/fx2.spec create mode 100644 anda/langs/python/fx2/update.rhai diff --git a/anda/langs/python/fx2/anda.hcl b/anda/langs/python/fx2/anda.hcl new file mode 100644 index 0000000000..b119dd1efa --- /dev/null +++ b/anda/langs/python/fx2/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "fx2.spec" + } +} diff --git a/anda/langs/python/fx2/fx2.spec b/anda/langs/python/fx2/fx2.spec new file mode 100644 index 0000000000..c38b4c8385 --- /dev/null +++ b/anda/langs/python/fx2/fx2.spec @@ -0,0 +1,60 @@ +%global pypi_name fx2 +%global _desc Chip support package for Cypress EZ-USB FX2 series microcontrollers. + +Name: python-%{pypi_name} +Version: 0.13 +Release: 1%?dist +Summary: Chip support package for Cypress EZ-USB FX2 series microcontrollers +License: 0BSD +URL: https://github.com/whitequark/libfx2 +Source0: %url/archive/refs/tags/v%version.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3-pip +BuildRequires: python3-pdm-backend +BuildRequires: python3-setuptools +BuildRequires: python3-setuptools_scm + +Requires: python3dist(libusb1) + +Provides: fx2 +Provides: python3-fx2 +Provides: libfx2 +Provides: python3-libfx2 + +Packager: Owen Zimmerman + +%description +%_desc + +%package -n python3-%{pypi_name} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} +%_desc + +%prep +%autosetup -n libfx2-%{version} + +%build +export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} +pushd software +%pyproject_wheel +popd + +%install +%pyproject_install +%pyproject_save_files fx2 + +%files -n python3-%{pypi_name} -f %{pyproject_files} +%doc README.md +%license LICENSE-0BSD.txt +%{_bindir}/fx2tool +%ghost %python3_sitelib/__pycache__/*.cpython-*.pyc +%ghost %python3_sitelib/%{name}/subcommands/__pycache__/*.cpython-*.pyc + +%changelog +* Sun Sep 28 2025 Owen Zimmerman +- Initial commit diff --git a/anda/langs/python/fx2/update.rhai b/anda/langs/python/fx2/update.rhai new file mode 100644 index 0000000000..1453f575a3 --- /dev/null +++ b/anda/langs/python/fx2/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("whitequark/libfx2"));