Blob Blame History Raw
# Generated by rust2rpm 25
%bcond_without check
%global debug_package %{nil}

%global crate object

Name:           rust-object
Version:        0.32.2
Release:        %autorelease
Summary:        Unified interface for reading and writing object file formats

License:        Apache-2.0 OR MIT
URL:            https://crates.io/crates/object
Source:         %{crates_source}
# Manually created patch for downstream crate metadata changes
# * bump ruzstd dependency from 0.4 to 0.5
# * disable unused WASM support
Patch:          object-fix-metadata.diff

BuildRequires:  cargo-rpm-macros >= 24

%global _description %{expand:
A unified interface for reading and writing object file formats.}

%description %{_description}

%package        devel
Summary:        %{summary}
BuildArch:      noarch

%description    devel %{_description}

This package contains library source intended for building other packages which
use the "%{crate}" crate.

%files          devel
%license %{crate_instdir}/LICENSE-APACHE
%license %{crate_instdir}/LICENSE-MIT
%doc %{crate_instdir}/CHANGELOG.md
%doc %{crate_instdir}/README.md
%{crate_instdir}/

%package     -n %{name}+default-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+default-devel %{_description}

This package contains library source intended for building other packages which
use the "default" feature of the "%{crate}" crate.

%files       -n %{name}+default-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+all-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+all-devel %{_description}

This package contains library source intended for building other packages which
use the "all" feature of the "%{crate}" crate.

%files       -n %{name}+all-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+archive-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+archive-devel %{_description}

This package contains library source intended for building other packages which
use the "archive" feature of the "%{crate}" crate.

%files       -n %{name}+archive-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+cargo-all-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+cargo-all-devel %{_description}

This package contains library source intended for building other packages which
use the "cargo-all" feature of the "%{crate}" crate.

%files       -n %{name}+cargo-all-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+coff-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+coff-devel %{_description}

This package contains library source intended for building other packages which
use the "coff" feature of the "%{crate}" crate.

%files       -n %{name}+coff-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+compression-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+compression-devel %{_description}

This package contains library source intended for building other packages which
use the "compression" feature of the "%{crate}" crate.

%files       -n %{name}+compression-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+doc-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+doc-devel %{_description}

This package contains library source intended for building other packages which
use the "doc" feature of the "%{crate}" crate.

%files       -n %{name}+doc-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+elf-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+elf-devel %{_description}

This package contains library source intended for building other packages which
use the "elf" feature of the "%{crate}" crate.

%files       -n %{name}+elf-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+macho-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+macho-devel %{_description}

This package contains library source intended for building other packages which
use the "macho" feature of the "%{crate}" crate.

%files       -n %{name}+macho-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+pe-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+pe-devel %{_description}

This package contains library source intended for building other packages which
use the "pe" feature of the "%{crate}" crate.

%files       -n %{name}+pe-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+read-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+read-devel %{_description}

This package contains library source intended for building other packages which
use the "read" feature of the "%{crate}" crate.

%files       -n %{name}+read-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+read_core-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+read_core-devel %{_description}

This package contains library source intended for building other packages which
use the "read_core" feature of the "%{crate}" crate.

%files       -n %{name}+read_core-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+std-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+std-devel %{_description}

This package contains library source intended for building other packages which
use the "std" feature of the "%{crate}" crate.

%files       -n %{name}+std-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+unaligned-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+unaligned-devel %{_description}

This package contains library source intended for building other packages which
use the "unaligned" feature of the "%{crate}" crate.

%files       -n %{name}+unaligned-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+unstable-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+unstable-devel %{_description}

This package contains library source intended for building other packages which
use the "unstable" feature of the "%{crate}" crate.

%files       -n %{name}+unstable-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+unstable-all-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+unstable-all-devel %{_description}

This package contains library source intended for building other packages which
use the "unstable-all" feature of the "%{crate}" crate.

%files       -n %{name}+unstable-all-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+write-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+write-devel %{_description}

This package contains library source intended for building other packages which
use the "write" feature of the "%{crate}" crate.

%files       -n %{name}+write-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+write_core-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+write_core-devel %{_description}

This package contains library source intended for building other packages which
use the "write_core" feature of the "%{crate}" crate.

%files       -n %{name}+write_core-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+write_std-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+write_std-devel %{_description}

This package contains library source intended for building other packages which
use the "write_std" feature of the "%{crate}" crate.

%files       -n %{name}+write_std-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+xcoff-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+xcoff-devel %{_description}

This package contains library source intended for building other packages which
use the "xcoff" feature of the "%{crate}" crate.

%files       -n %{name}+xcoff-devel
%ghost %{crate_instdir}/Cargo.toml

%prep
%autosetup -n %{crate}-%{version} -p1
%cargo_prep

%generate_buildrequires
%cargo_generate_buildrequires

%build
%cargo_build

%install
%cargo_install

%if %{with check}
%check
# * skip tests that require files which are not included in published crates
%cargo_test -- -- --exact --skip read::coff::coff_extended_relocations
%endif

%changelog
%autochangelog