From 5ebf13fb0ffb2f258ad7e23a01cf20f860311083 Mon Sep 17 00:00:00 2001 From: madonuko Date: Mon, 19 Aug 2024 21:24:05 +0800 Subject: [PATCH] fix: katsu Package this properly --- anda/tools/buildsys/katsu/katsu.spec | 66 +++++++++++++++++++--------- 1 file changed, 46 insertions(+), 20 deletions(-) diff --git a/anda/tools/buildsys/katsu/katsu.spec b/anda/tools/buildsys/katsu/katsu.spec index 7592078b48..d6fd93a5ee 100644 --- a/anda/tools/buildsys/katsu/katsu.spec +++ b/anda/tools/buildsys/katsu/katsu.spec @@ -1,15 +1,34 @@ -%define debug_package %nil - -Name: katsu -Version: 0.7.1 -Release: 1%?dist -Summary: The vicious image builder -License: MIT -URL: https://github.com/FyraLabs/katsu +# Generated by rust2rpm 26 +%bcond_without check +%bcond_without mold + +# prevent library files from being installed +%global cargo_install_lib 0 + +Name: katsu +Version: 0.7.1 +Release: 2%?dist +Summary: Vicious image builder +Packager: madonuko + +SourceLicense: MIT +# 0BSD OR MIT OR Apache-2.0 +# Apache-2.0 +# Apache-2.0 OR BSL-1.0 +# Apache-2.0 OR MIT +# Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT +# BSD-3-Clause +# MIT +# MIT OR Apache-2.0 +# MIT OR Zlib OR Apache-2.0 +# Unlicense OR MIT +License: (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-3-Clause AND MIT AND (MIT OR Zlib OR Apache-2.0) AND (Unlicense OR MIT) +# LICENSE.dependencies contains a full license breakdown + +URL: https://github.com/FyraLabs/katsu Source0: %url/archive/refs/tags/v%version.tar.gz -Requires: xorriso dracut limine grub2 systemd-devel squashfs-tools parted gdisk -Requires: dracut-live dracut-config-generic dracut-config-rescue grub2-tools-extra dracut-squash -BuildRequires: cargo rust-packaging pkgconfig(libudev) clang-devel + +BuildRequires: cargo-rpm-macros >= 26 %description Katsu is a tool for building bootable images from RPM based systems. @@ -17,21 +36,28 @@ It is an alternative to Lennart Poettering's mkosi tool, designed to be robust, fast, and easy to use while still providing many output formats. %prep -%autosetup +%autosetup -p1 +%cargo_prep_online %build -%(echo "%{cargo_build}" | sed "s@--profile rpm@--profile release@g" | sed "s@-j @@") +#cargo_build +%{cargo_license_summary_online} +%{cargo_license_online} > LICENSE.dependencies %install -export CARGO_INSTALL_ROOT=%buildroot%_prefix -cargo install --path . -rm %buildroot%_prefix/.crates.toml %buildroot%_prefix/.crates2.json +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif %files -%doc README.md %license LICENSE -%_bindir/katsu - +%license LICENSE.dependencies +%doc README.md +%{_bindir}/katsu %changelog -%autochangelog +* Mon Aug 19 2024 madonuko - 0.7.1-2 +- Rewrite spec with rust2rpm