Skip to content

Commit

Permalink
fix: katsu (#1966) (#1981)
Browse files Browse the repository at this point in the history
Package this properly

(cherry picked from commit 3424e20)

Co-authored-by: madomado <[email protected]>
  • Loading branch information
raboneko and madonuko authored Aug 21, 2024
1 parent b56caff commit 099d589
Showing 1 changed file with 46 additions and 17 deletions.
63 changes: 46 additions & 17 deletions anda/tools/buildsys/katsu/katsu.spec
Original file line number Diff line number Diff line change
@@ -1,12 +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 <[email protected]>

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

BuildRequires: anda-srpm-macros cargo-rpm-macros >= 26
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
Expand All @@ -17,21 +39,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 <[email protected]> - 0.7.1-2
- Rewrite spec with rust2rpm

0 comments on commit 099d589

Please sign in to comment.