## START: Set by rpmautospec ## (rpmautospec version 0.3.0) %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 4; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %bcond_without check # https://pagure.io/koji/issue/659 %global debug_package %{nil} Name: rust-packaging Version: 23 Release: %autorelease Summary: RPM macros for building Rust packages License: MIT URL: https://pagure.io/fedora-rust/rust2rpm Source: %{url}/archive/v%{version}/rust2rpm-v%{version}.tar.gz # https://pagure.io/fedora-rust/rust2rpm/pull-request/221 Patch: 0001-Adjust-build-flags-to-allow-the-new-implementation-u.patch # patches for backporting upstream bug fixes Patch: https://pagure.io/fedora-rust/rust2rpm/c/09a496c.patch Patch: https://pagure.io/fedora-rust/rust2rpm/c/1869f5a.patch Patch: https://pagure.io/fedora-rust/rust2rpm/c/6a5931b.patch Patch: https://pagure.io/fedora-rust/rust2rpm/c/3dec94d.patch Patch: https://pagure.io/fedora-rust/rust2rpm/c/d9aa58b.patch # backported upstream patch for force-frame-pointers support # c.f. https://fedoraproject.org/wiki/Changes/fno-omit-frame-pointer Patch: c2176f2.patch # patches for backporting upstream bug fixes Patch: https://pagure.io/fedora-rust/rust2rpm/c/b5c64f5.patch ExclusiveArch: %{rust_arches} BuildRequires: python3-devel %if %{with check} BuildRequires: cargo %endif Requires: python3-rust2rpm-core = %{?epoch:%{epoch}:}%{version}-%{release} Requires: rust-srpm-macros = %{version} Requires: rust Requires: cargo >= 1.41 # gawk is needed for stripping dev-deps in macro Requires: gawk %description The package provides RPM macros for building Rust projects. Note that rust-srpm-macros is a seperate arch-independent package that is also required to build Rust packages. %package -n python3-rust2rpm Summary: Generate RPM spec files for Rust packages Requires: cargo Requires: python3-rust2rpm-core = %{?epoch:%{epoch}:}%{version}-%{release} Provides: rust2rpm = %{version}-%{release} %description -n python3-rust2rpm rust2rpm is a tool that automates the generation of RPM spec files for Rust crates. %package -n python3-rust2rpm-core Summary: Generate RPM spec files for Rust packages (core functionality) Requires: cargo Provides: cargo-inspector = %{version}-%{release} %description -n python3-rust2rpm-core rust2rpm is a tool that automates the generation of RPM spec files for Rust crates. This package contains the core functionality which doesn't depend on any third-party python packages. %prep %autosetup -n rust2rpm-v%{version} -p1 %generate_buildrequires %pyproject_buildrequires -t %build %pyproject_wheel %install %pyproject_install install -D -p -m 0644 -t %{buildroot}%{_rpmmacrodir} data/macros.rust data/macros.cargo install -D -p -m 0644 -t %{buildroot}%{_fileattrsdir} data/cargo.attr %if %{with check} %check %tox %endif %files %{_rpmmacrodir}/macros.rust %{_rpmmacrodir}/macros.cargo %{_fileattrsdir}/cargo.attr %files -n python3-rust2rpm %{_bindir}/rust2rpm %{python3_sitelib}/rust2rpm-*.dist-info/ %{python3_sitelib}/rust2rpm/ %exclude %{python3_sitelib}/rust2rpm/core/ %files -n python3-rust2rpm-core %license LICENSE %doc README.md NEWS %{_bindir}/cargo-inspector %{python3_sitelib}/rust2rpm/core/ %changelog * Thu Jan 05 2023 Fabio Valentini 23-4 - Backport upstream patches for various bugs in rust2rpm v23 * Thu Jan 05 2023 Fabio Valentini 23-3 - Backport upstream patch for force-frame-pointers support * Wed Nov 23 2022 Fabio Valentini 23-2 - Backport upstream patches for various bugs in rust2rpm v23 * Fri Oct 28 2022 Fabio Valentini 23-1 - Update to version 23; Fixes RHBZ#2138138 * Wed Oct 05 2022 Fabio Valentini 22-4 - Include upstream patch to correctly recognize "wasm64" target * Mon Aug 08 2022 Zbigniew Jędrzejewski-Szmek 22-3 - Adjust build flags to allow the new implementation using --package- metadata * Tue Jul 26 2022 Fabio Valentini 22-2 - Fix generation of specs when there's only an auto-generated patch * Mon Jul 25 2022 Fabio Valentini 22-1 - Update to version 22; Fixes RHBZ#2110233 * Sat Jul 23 2022 Fedora Release Engineering 21-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Fri Jul 01 2022 Fabio Valentini 21-5 - Adapt %%cargo_prep macro to fix builds with Rust 1.62+ * Mon Jun 13 2022 Python Maint 21-4 - Rebuilt for Python 3.11 * Sat Mar 19 2022 Zbigniew Jędrzejewski-Szmek 21-3 - Backport patch to fix rpmautospec detection * Tue Feb 22 2022 Zbigniew Jędrzejewski-Szmek 21-2 - Add patches to allow debuginfo level to be set easily again * Sun Feb 20 2022 Zbigniew Jędrzejewski-Szmek 21-1 - Version 21 * Tue Feb 15 2022 Zbigniew Jędrzejewski-Szmek 20-3 - Include linker flags for package note in %%build_rustflags * Fri Jan 21 2022 Fedora Release Engineering 20-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Mon Nov 29 2021 Zbigniew Jędrzejewski-Szmek 20-1 - Version 20 * Mon Nov 22 2021 Zbigniew Jędrzejewski-Szmek 19-2 - Rebuild in a side tag * Mon Nov 22 2021 Zbigniew Jędrzejewski-Szmek 19-1 - Version 19 * Fri Jul 23 2021 Fedora Release Engineering - 18-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Mon Jul 12 2021 Fabio Valentini - 18-1 - Update to version 18. * Wed Jun 02 2021 Python Maint - 17-4 - Rebuilt for Python 3.10 * Wed Jan 27 2021 Fedora Release Engineering - 17-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Mon Dec 28 2020 Igor Raits - 17-2 - Band-aid clap pre-release version * Sat Dec 26 2020 Igor Raits - 17-1 - Update to 17 * Wed Jul 29 2020 Fedora Release Engineering - 15-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue May 26 2020 Miro Hrončok - 15-2 - Rebuilt for Python 3.9 * Fri May 22 2020 Igor Raits - 15-1 - Update to 15 * Sat May 02 2020 Igor Raits - 14-1 - Update to 14 * Mon Feb 03 2020 Josh Stone - 13-3 - Use 'cargo install --no-track' with cargo 1.41 * Thu Jan 30 2020 Fedora Release Engineering - 13-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Fri Dec 20 2019 Igor Gnatenko - 13-1 - Update to 13 * Fri Dec 13 2019 Igor Gnatenko - 12-2 - Fixup generation of files with no-tilde * Fri Dec 13 2019 Igor Gnatenko - 12-1 - Update to 12 * Wed Dec 04 2019 Igor Gnatenko - 11-1 - Update to 11 * Sat Sep 07 2019 Igor Gnatenko - 10-6 - Depend on setuptools in runtime * Mon Aug 19 2019 Miro Hrončok - 10-5 - Rebuilt for Python 3.8 * Sun Aug 18 2019 Igor Gnatenko - 10-4 - Ignore Cargo.lock * Fri Jul 26 2019 Fedora Release Engineering - 10-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Mon Jun 24 2019 Igor Gnatenko - 10-2 - Do not use awk's inplace feature * Sun Jun 16 2019 Igor Gnatenko - 10-1 - Update to 10 * Sat Jun 08 2019 Igor Gnatenko - 9-3 - Update patches * Sat Jun 08 2019 Igor Gnatenko - 9-2 - Backport patches from upstream * Sun May 05 09:18:19 CEST 2019 Igor Gnatenko - 9-1 - Update to 9 * Tue Apr 23 21:18:12 CEST 2019 Igor Gnatenko - 8-1 - Update to 8 * Tue Apr 23 16:17:30 CEST 2019 Igor Gnatenko - 7-1 - Update to 7 * Sun Mar 10 2019 Igor Gnatenko - 6-28 - Install $PWD/Cargo.toml into $REG_DIR/Cargo.toml * Sun Mar 10 2019 Igor Gnatenko - 6-27 - Restore Cargo.toml.deps into $PWD/Cargo.toml * Sun Mar 10 2019 Igor Gnatenko - 6-26 - Strip out target dependencies too * Sun Mar 10 2019 Igor Gnatenko - 6-25 - Do not error on removing files which do not exist * Sun Mar 10 2019 Igor Gnatenko - 6-24 - Escape `\n` properly in macro file * Sun Mar 10 2019 Igor Gnatenko - 6-23 - Do not pull optional deps into BRs and trivial fixes * Sat Feb 02 2019 Fedora Release Engineering - 6-22 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Sat Jan 26 2019 Igor Gnatenko - 6-21 - Use %%version_no_tilde * Sat Jan 26 2019 Igor Gnatenko - 6-20 - Trivial fixes for pre-release versions * Sat Jan 26 2019 Igor Gnatenko - 6-19 - Add support for pre-release versions * Fri Dec 07 2018 Igor Gnatenko - 6-18 - Set CARGO_HOME * Sat Nov 03 2018 Igor Gnatenko - 6-17 - Update patchset * Sat Nov 03 2018 Igor Gnatenko - 6-16 - Make package archful * Fri Nov 02 2018 Igor Gnatenko - 6-15 - Support .rust2rpm.conf * Wed Oct 31 2018 Igor Gnatenko - 6-14 - Fix syntax error * Tue Oct 30 2018 Igor Gnatenko - 6-13 - Support multiple dependencies with same name * Sat Oct 27 2018 Igor Gnatenko - 6-12 - Fix requirements with space * Fri Oct 26 2018 Igor Gnatenko - 6-11 - Trivial fixes to last patchset * Fri Oct 26 2018 Igor Gnatenko - 6-10 - Split features into subpackages * Sun Sep 02 2018 Igor Gnatenko - 6-1 - Update to 6 * Sat Jul 14 2018 Fedora Release Engineering - 5-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Mon Jul 02 2018 Miro Hrončok - 5-10 - Rebuilt for Python 3.7 * Mon Jul 02 2018 Igor Gnatenko - 5-9 - Rebuilt for Python 3.7 * Fri Jun 22 2018 Igor Gnatenko - 5-8 - Various improvements for %%cargo_* macros * Tue Jun 19 2018 Miro Hrončok - 5-7 - Rebuilt for Python 3.7 * Wed Feb 21 2018 Igor Gnatenko - 5-6 - Pass %%__cargo_common_opts to %%cargo_install * Tue Feb 20 2018 Igor Gnatenko - 5-5 - Explicitly require rust/cargo * Fri Feb 09 2018 Fedora Release Engineering - 5-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Tue Jan 09 2018 Igor Gnatenko - 5-3 - Fix syntax error * Tue Jan 09 2018 Igor Gnatenko - 5-2 - Remove Cargo.lock * Mon Jan 08 2018 Igor Gnatenko - 5-1 - Update to 5 * Sat Nov 04 2017 Igor Gnatenko - 4-7 - Add Obsoletes for rust-rpm-macros * Sat Nov 04 2017 Igor Gnatenko - 4-6 - Use cp instead of install * Sat Oct 21 2017 Igor Gnatenko - 4-5 - Generate runtime dependencyon cargo for devel subpackages * Thu Jul 27 2017 Fedora Release Engineering - 4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Jul 08 2017 Igor Gnatenko - 4-2 - Include license * Sat Jul 08 2017 Igor Gnatenko - 4-1 - Update to 4 * Fri Jun 23 2017 Igor Gnatenko - 3-5 - Explicitly set rustdoc path * Wed Jun 21 2017 Igor Gnatenko - 3-4 - Mageia doesn't have C.UTF-8 lang * Wed Jun 21 2017 Igor Gnatenko - 3-3 - Switch cargo_registry to /usr/share/cargo/registry * Wed Jun 14 2017 Igor Gnatenko - 3-2 - Set C.UTF-8 for cargo inspector where python doesn't do locale coercing * Tue Jun 13 2017 Igor Gnatenko - 3-1 - Initial package