diff --git a/anda/tools/ls-iommu/anda.hcl b/anda/tools/ls-iommu/anda.hcl new file mode 100644 index 0000000000..e7b7e2d8c4 --- /dev/null +++ b/anda/tools/ls-iommu/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "ls-iommu.spec" + } +} diff --git a/anda/tools/ls-iommu/ls-iommu.spec b/anda/tools/ls-iommu/ls-iommu.spec new file mode 100644 index 0000000000..4fed043fcc --- /dev/null +++ b/anda/tools/ls-iommu/ls-iommu.spec @@ -0,0 +1,40 @@ +%global goipath github.com/HikariKnight/ls-iommu +Version: 2.3.0 + +%gometa -f + +Name: ls-iommu +Release: 1%?dist +Summary: A tool to list devices in iommu groups, useful for setting up VFIO + +License: MIT +URL: https://github.com/HikariKnight/ls-iommu +Source0: %url/archive/refs/tags/%version.tar.gz + +Packager: Owen Zimmerman + +BuildRequires: golang gcc go-rpm-macros + +%description +%{summary}. + +%gopkg + +%prep +%goprep + +%build +%define gomodulesmode GO111MODULE=on +%gobuild -ldflags="-X github.com/HikariKnight/ls-iommu/internal/version.Version=%version" -o ls-iommu ./cmd + +%install +install -Dm 0755 ls-iommu %{buildroot}%{_bindir}/ls-iommu + +%files +%license LICENSE +%doc README.md +%{_bindir}/ls-iommu + +%changelog +* Sun Dec 21 2025 Owen Zimmerman +- Initial commit diff --git a/anda/tools/ls-iommu/update.rhai b/anda/tools/ls-iommu/update.rhai new file mode 100644 index 0000000000..1ed5e69bce --- /dev/null +++ b/anda/tools/ls-iommu/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("HikariKnight/ls-iommu"));