# # spec file for package cargo-packaging # # Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: cargo-packaging Version: 1.2.0+7 Release: 1.3 Summary: Macros and tools to assist with cargo and rust packaging License: MPL-2.0 Group: Development/Languages/Rust URL: https://github.com/Firstyear/cargo-packaging Source0: %{name}-%{version}.tar.xz Source1: vendor.tar.xz Requires: cargo-auditable Requires: rust+cargo Requires: zstd BuildRequires: cargo BuildRequires: zstd Conflicts: rust-packaging %description A set of macros and tools to assist with cargo and rust packaging, written in a manner that follows upstream rust's best practices. %prep %autosetup -a1 %build cargo build --offline --release %install install -D -p -m 0644 -t %{buildroot}%{_fileattrsdir} %{_builddir}/%{name}-%{version}/rust.attr install -D -p -m 0644 -t %{buildroot}%{_rpmconfigdir}/macros.d %{_builddir}/%{name}-%{version}/macros.cargo install -D -p -m 0755 -t %{buildroot}%{_rpmconfigdir} %{_builddir}/%{name}-%{version}/target/release/rust-rpm-prov install -D -p -m 0755 -t %{buildroot}%{_sysconfdir}/zsh_completion.d %{_builddir}/%{name}-%{version}/target/release/build/completions/_rust-rpm-prov install -D -p -m 0755 -t %{buildroot}%{_sysconfdir}/bash_completion.d %{_builddir}/%{name}-%{version}/target/release/build/completions/rust-rpm-prov.bash %files %{_fileattrsdir}/rust.attr %{_rpmconfigdir}/macros.d/macros.cargo %{_rpmconfigdir}/rust-rpm-prov %dir %{_sysconfdir}/zsh_completion.d %dir %{_sysconfdir}/bash_completion.d %{_sysconfdir}/zsh_completion.d/* %{_sysconfdir}/bash_completion.d/* %changelog * Mon Jan 6 2025 william.brown@suse.com - Update to version 1.2.0+7: * Correct incremental build flags (#10) * Doc custom build flags (#9) * Fri Jul 19 2024 William Brown - Resolve build failure when backported to 15-SP3 * Fri Jul 19 2024 William Brown - Depend on provides of rust to allow older compiler version usage * Fri Apr 5 2024 William Brown - Remove cargo_config that is now part of vendor.tar * Thu Apr 4 2024 william.brown@suse.com - bsc#1222175 - prevent stripping debug info - Update to version 1.2.0+5: * Prevent stripping debuginfo in release by default (#7) * Mon Aug 14 2023 william.brown@suse.com - Update to version 1.2.0+4: * macros.cargo: Drop bashisms (#4) * Mon Jun 19 2023 william.brown@suse.com - Update to version 1.2.0+3: * rename variable for bitwarden * Tue Jun 13 2023 william.brown@suse.com - bsc#1212226 - add rust-packaging compat - Update to version 1.2.0+2: * Default flags * Add buildflags * Fri Mar 3 2023 William Brown - Update vendored dependencies - Add supporting sources for cargo metadata extraction * cargo-packaging-1.2.0+0.tar.xz * cargo_config * vendor.tar.xz * Sat Feb 18 2023 william.brown@suse.com - Update to version 1.2.0+0: * marcos.cargo: add path parameter in cargo_install (#3) * Thu Nov 3 2022 william.brown@suse.com - Update to version 1.1.0 * Improve support for bundle metadata in rpm provides * Mon May 23 2022 william.brown@suse.com - Update to version 1.0.0~git8.6919af0: * Disable incremental builds as they don't work with sccache and don't help in obs * Thu Apr 21 2022 William Brown - Add depends on zstd to allow zst compression in rust projects * Fri Mar 18 2022 william.brown@suse.com - Update to version 1.0.0~git7.63c3500: * Improve macros when libgit is a dependency * Wed Oct 6 2021 william.brown@suse.com - Update to version 1.0.0~git6.d878e38: * Remove incorrect macro definition * Tue Sep 28 2021 william.brown@suse.com - Update to version 1.0.0~git5.05b6425: * Add rust arches macro and update t1 arches * Wed Sep 22 2021 William Brown - Update spec based on reviewer feedback * Tue Sep 21 2021 William Brown - Initial commit of cargo-packaging