You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
85 lines
2.1 KiB
85 lines
2.1 KiB
%bcond_without check
|
|
|
|
Name: rust-packaging
|
|
Version: 25.0
|
|
Release: %autorelease
|
|
Summary: RPM macros and generators for building Rust packages
|
|
License: MIT
|
|
|
|
URL: https://pagure.io/fedora-rust/rust-packaging
|
|
Source: %{url}/archive/%{version}/rust-packaging-%{version}.tar.gz
|
|
|
|
BuildArch: noarch
|
|
|
|
%if %{with check}
|
|
BuildRequires: python3-pytest
|
|
%endif
|
|
|
|
%description
|
|
%{summary}.
|
|
|
|
%package -n rust-srpm-macros-epel
|
|
Summary: RPM macros for building Rust projects
|
|
# Require rust-srpm-macros from RHEL
|
|
Requires: rust-srpm-macros
|
|
|
|
%description -n rust-srpm-macros-epel
|
|
RPM macros for building source packages for Rust projects.
|
|
|
|
%package -n cargo-rpm-macros
|
|
Summary: RPM macros for building projects with cargo
|
|
|
|
# obsolete + provide rust-packaging (removed in Fedora 38)
|
|
Obsoletes: rust-packaging < 24
|
|
Provides: rust-packaging = %{version}-%{release}
|
|
|
|
Requires: cargo2rpm >= 0.1.8
|
|
|
|
Requires: cargo
|
|
Requires: gawk
|
|
Requires: grep
|
|
|
|
Requires: rust-srpm-macros-epel = %{version}-%{release}
|
|
|
|
%description -n cargo-rpm-macros
|
|
RPM macros for building projects with cargo.
|
|
|
|
%prep
|
|
%autosetup -p1
|
|
|
|
%build
|
|
# nothing to do
|
|
|
|
%install
|
|
install -D -p -m 0644 -t %{buildroot}/%{_rpmmacrodir} macros.d/macros.cargo
|
|
install -D -p -m 0644 -t %{buildroot}/%{_rpmmacrodir} macros.d/macros.rust
|
|
|
|
# We don't install these on RHEL 9, as they conflict with the regular
|
|
# rust-srpm-macros.
|
|
# If we need to override these, they can be installed as
|
|
# macros.zzz-rust-srpm-epel.
|
|
%dnl install -D -p -m 0644 -t %{buildroot}/%{_rpmmacrodir} macros.d/macros.rust-srpm
|
|
|
|
install -D -p -m 0644 -t %{buildroot}/%{_fileattrsdir} fileattrs/cargo.attr
|
|
install -D -p -m 0644 -t %{buildroot}/%{_fileattrsdir} fileattrs/cargo_vendor.attr
|
|
|
|
%if %{with check}
|
|
%check
|
|
export MACRO_DIR=%{buildroot}%{_rpmmacrodir}
|
|
pytest -vv
|
|
%endif
|
|
|
|
%files -n rust-srpm-macros-epel
|
|
%license LICENSE
|
|
%{_rpmmacrodir}/macros.rust
|
|
%dnl %{_rpmmacrodir}/macros.rust-srpm
|
|
|
|
%files -n cargo-rpm-macros
|
|
%license LICENSE
|
|
%{_rpmmacrodir}/macros.cargo
|
|
%{_fileattrsdir}/cargo.attr
|
|
%{_fileattrsdir}/cargo_vendor.attr
|
|
|
|
%changelog
|
|
%autochangelog
|