|
|
04e7ad2 |
%bcond_without check
|
|
|
16b2880 |
# https://pagure.io/koji/issue/659
|
|
|
16b2880 |
%global debug_package %{nil}
|
|
Igor Gnatenko |
4e5904b |
|
|
Igor Gnatenko |
4e5904b |
Name: rust-packaging
|
|
|
86a1e00 |
Version: 21
|
|
|
98eade4 |
Release: %autorelease
|
|
|
86a1e00 |
Summary: RPM macros for building Rust packages
|
|
Igor Gnatenko |
4e5904b |
|
|
Igor Gnatenko |
4e5904b |
License: MIT
|
|
Igor Gnatenko |
4e5904b |
URL: https://pagure.io/fedora-rust/rust2rpm
|
|
|
d936b97 |
Source: https://pagure.io/fedora-rust/rust2rpm/archive/v%{version}/rust2rpm-v%{version}.tar.gz
|
|
|
b042dac |
|
|
|
74f2cd9 |
Patch: 0001-Add-comment-about-unused-macro.patch
|
|
|
74f2cd9 |
Patch: 0002-Allow-easy-overriding-of-the-opt-level-debuginfo-cod.patch
|
|
|
8a2ef2e |
Patch: 0003-Fix-autodetection-of-rpmautospec.patch
|
|
|
8a2ef2e |
Patch: 0004-Print-information-about-written-files.patch
|
|
|
b3ae0d3 |
Patch: 0005-macros.cargo-vacuum-up-Cargo.toml.orig-in-addition-t.patch
|
|
|
74f2cd9 |
|
|
|
16b2880 |
ExclusiveArch: %{rust_arches}
|
|
Igor Gnatenko |
4e5904b |
|
|
|
700f417 |
# gawk is needed for stripping dev-deps in macro
|
|
|
700f417 |
Requires: gawk
|
|
Igor Gnatenko |
4e5904b |
Requires: rust-srpm-macros = %{version}
|
|
|
210d2aa |
Requires: rust
|
|
|
ea408f2 |
Requires: cargo >= 1.41
|
|
Igor Gnatenko |
4e5904b |
|
|
|
478f2c2 |
Recommends: python3-rust2rpm
|
|
|
478f2c2 |
|
|
Igor Gnatenko |
4e5904b |
%description
|
|
|
86a1e00 |
The package provides RPM macros for building Rust projects.
|
|
|
86a1e00 |
|
|
|
86a1e00 |
Note that rust-srpm-macros is a seperate arch-independent package that
|
|
|
86a1e00 |
is also required to build Rust packages.
|
|
Igor Gnatenko |
4e5904b |
|
|
Igor Gnatenko |
4e5904b |
%package -n python3-rust2rpm
|
|
|
86a1e00 |
Summary: Generate RPM spec files for Rust packages
|
|
Igor Gnatenko |
4e5904b |
BuildRequires: python3-devel
|
|
Igor Gnatenko |
4e5904b |
%if %{with check}
|
|
Igor Gnatenko |
4e5904b |
BuildRequires: python3-pytest
|
|
Igor Gnatenko |
4e5904b |
BuildRequires: cargo
|
|
Igor Gnatenko |
4e5904b |
%endif
|
|
Igor Gnatenko |
4e5904b |
Requires: cargo
|
|
Igor Gnatenko |
4e5904b |
Provides: rust2rpm = %{version}-%{release}
|
|
|
478f2c2 |
Requires: (rust-packaging = %{?epoch:%{epoch}:}%{version}-%{release} if rust-packaging)
|
|
Igor Gnatenko |
4e5904b |
|
|
Igor Gnatenko |
4e5904b |
%description -n python3-rust2rpm
|
|
Igor Gnatenko |
4e5904b |
%{summary}.
|
|
Igor Gnatenko |
4e5904b |
|
|
Igor Gnatenko |
4e5904b |
%prep
|
|
|
3f2f8da |
%autosetup -n rust2rpm-v%{version} -p1
|
|
Igor Gnatenko |
4e5904b |
|
|
|
478f2c2 |
%generate_buildrequires
|
|
|
478f2c2 |
%pyproject_buildrequires
|
|
|
478f2c2 |
|
|
Igor Gnatenko |
4e5904b |
%build
|
|
|
478f2c2 |
%pyproject_wheel
|
|
Igor Gnatenko |
4e5904b |
|
|
Igor Gnatenko |
4e5904b |
%install
|
|
|
478f2c2 |
%pyproject_install
|
|
|
478f2c2 |
%pyproject_save_files rust2rpm
|
|
|
1f1f778 |
install -D -p -m 0644 -t %{buildroot}%{_rpmmacrodir} data/macros.rust data/macros.cargo
|
|
|
1f1f778 |
install -D -p -m 0644 -t %{buildroot}%{_fileattrsdir} data/cargo.attr
|
|
Igor Gnatenko |
4e5904b |
|
|
Igor Gnatenko |
4e5904b |
%if %{with check}
|
|
Igor Gnatenko |
4e5904b |
%check
|
|
|
478f2c2 |
%pytest -vv test.py
|
|
Igor Gnatenko |
4e5904b |
%endif
|
|
Igor Gnatenko |
4e5904b |
|
|
Igor Gnatenko |
4e5904b |
%files
|
|
|
86b1326 |
%license LICENSE
|
|
|
1f1f778 |
%{_rpmmacrodir}/macros.rust
|
|
|
1f1f778 |
%{_rpmmacrodir}/macros.cargo
|
|
|
1f1f778 |
%{_fileattrsdir}/cargo.attr
|
|
|
478f2c2 |
# the following Python files are co-owned with the full-blown python3-rust2rpm package
|
|
|
478f2c2 |
# they are needed for cargo.attr
|
|
|
478f2c2 |
%{_bindir}/cargo-inspector
|
|
|
478f2c2 |
%dir %{python3_sitelib}/rust2rpm
|
|
|
478f2c2 |
%pycached %{python3_sitelib}/rust2rpm/__init__.py
|
|
|
478f2c2 |
%pycached %{python3_sitelib}/rust2rpm/inspector.py
|
|
|
478f2c2 |
%pycached %{python3_sitelib}/rust2rpm/licensing.py
|
|
|
478f2c2 |
%pycached %{python3_sitelib}/rust2rpm/metadata.py
|
|
|
478f2c2 |
%{python3_sitelib}/rust2rpm/spdx_to_fedora.csv
|
|
Igor Gnatenko |
4e5904b |
|
|
|
478f2c2 |
|
|
|
478f2c2 |
%files -n python3-rust2rpm -f %{pyproject_files}
|
|
|
4c2e295 |
%doc NEWS
|
|
Igor Gnatenko |
4e5904b |
%{_bindir}/rust2rpm
|
|
Igor Gnatenko |
4e5904b |
%{_bindir}/cargo-inspector
|
|
|
478f2c2 |
|
|
Igor Gnatenko |
4e5904b |
|
|
Igor Gnatenko |
4e5904b |
%changelog
|
|
|
98eade4 |
%autochangelog
|