351 lines
11 KiB
RPMSpec
351 lines
11 KiB
RPMSpec
# Generated by rust2rpm 28
|
||
%bcond check 1
|
||
%global debug_package %{nil}
|
||
|
||
%global crate zip
|
||
|
||
Name: rust-zip
|
||
Version: 7.0.0
|
||
Release: %autorelease
|
||
Summary: Library to support the reading and writing of zip files
|
||
|
||
License: MIT
|
||
URL: https://crates.io/crates/zip
|
||
Source: %{crates_source}
|
||
# * A copy of the GitHub source archive for zip-rs/zip2, with everything but the
|
||
# test/data/ subdirectory removed, and additionally, from which test files
|
||
# with known license issues have been removed. Fortunately, no removed test
|
||
# files are required for any of the tests that are present in the published
|
||
# crates.
|
||
Source10: zip2-%{version}-filtered.tar.gz
|
||
# * Script used to generate Source11: ./get_test_data.sh %%{version}
|
||
Source11: get_test_data.sh
|
||
# Automatically generated patch to strip dependencies and normalize metadata
|
||
Patch: zip-fix-metadata-auto.diff
|
||
# Manually created patch for downstream crate metadata changes
|
||
# * Drop unused benchmark-only / example-only dev-dependencies
|
||
# * Remove the wasm_js feature from the getrandom dev-dependency. Our
|
||
# rust-getrandom does not provide this feature; see also “Unconditional use of
|
||
# getrandom’s wasm_js feature is counter to upstream guidance,”
|
||
# https://github.com/zip-rs/zip2/issues/336. Upstream fixed the issue for the
|
||
# dependency since 4.3.0, but not yet for the dev-dependency.
|
||
# * Patch out the nt-time features; rust-nt-time not yet packaged
|
||
# * Patch out ppmd support, even though it is in the default features. While the
|
||
# README.md for the ppmd-rust crate says “The code in this crate is in the
|
||
# public domain as the original code by their authors,” Cargo.toml lists the
|
||
# license as CC0-1.0, which is not precisely equivalent to the public-domain
|
||
# declaration in the README and is not-allowed for code in Fedora.
|
||
# * Patch out the deflate-flate2-zlib-ng-compat feature, which requires
|
||
# flate2/zlib-ng-compat, not packaged.
|
||
# * Unpin generic-array; see https://github.com/zip-rs/zip2/pull/458 for the
|
||
# upstream rationale, but we cannot use an old version and are not so
|
||
# concerned about deprecation warnings anyway.
|
||
# * Update constant_time_eq from 0.3.1 to 0.4.2. Downstream-only for MSRV
|
||
# reasons.
|
||
Patch: zip-fix-metadata.diff
|
||
# * Downstream-only: patch out tests that would need omitted test files to
|
||
# compile
|
||
Patch10: zip-6.0.0-omitted-test-files.patch
|
||
|
||
BuildRequires: cargo-rpm-macros >= 24
|
||
|
||
%global _description %{expand:
|
||
Library to support the reading and writing of zip files.}
|
||
|
||
%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
|
||
%doc %{crate_instdir}/CHANGELOG.md
|
||
%doc %{crate_instdir}/CODE_OF_CONDUCT.md
|
||
%doc %{crate_instdir}/CONTRIBUTING.md
|
||
%doc %{crate_instdir}/README.md
|
||
%doc %{crate_instdir}/SECURITY.md
|
||
%{crate_instdir}/
|
||
%exclude %{crate_instdir}/cliff.toml
|
||
%exclude %{crate_instdir}/pull_request_template.md
|
||
%exclude %{crate_instdir}/release-plz.toml
|
||
|
||
%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-features-devel
|
||
Summary: %{summary}
|
||
BuildArch: noarch
|
||
|
||
%description -n %{name}+_all-features-devel %{_description}
|
||
|
||
This package contains library source intended for building other packages which
|
||
use the "_all-features" feature of the "%{crate}" crate.
|
||
|
||
%files -n %{name}+_all-features-devel
|
||
%ghost %{crate_instdir}/Cargo.toml
|
||
|
||
%package -n %{name}+_deflate-any-devel
|
||
Summary: %{summary}
|
||
BuildArch: noarch
|
||
|
||
%description -n %{name}+_deflate-any-devel %{_description}
|
||
|
||
This package contains library source intended for building other packages which
|
||
use the "_deflate-any" feature of the "%{crate}" crate.
|
||
|
||
%files -n %{name}+_deflate-any-devel
|
||
%ghost %{crate_instdir}/Cargo.toml
|
||
|
||
%package -n %{name}+aes-crypto-devel
|
||
Summary: %{summary}
|
||
BuildArch: noarch
|
||
|
||
%description -n %{name}+aes-crypto-devel %{_description}
|
||
|
||
This package contains library source intended for building other packages which
|
||
use the "aes-crypto" feature of the "%{crate}" crate.
|
||
|
||
%files -n %{name}+aes-crypto-devel
|
||
%ghost %{crate_instdir}/Cargo.toml
|
||
|
||
%package -n %{name}+bitstream-io-devel
|
||
Summary: %{summary}
|
||
BuildArch: noarch
|
||
|
||
%description -n %{name}+bitstream-io-devel %{_description}
|
||
|
||
This package contains library source intended for building other packages which
|
||
use the "bitstream-io" feature of the "%{crate}" crate.
|
||
|
||
%files -n %{name}+bitstream-io-devel
|
||
%ghost %{crate_instdir}/Cargo.toml
|
||
|
||
%package -n %{name}+bzip2-devel
|
||
Summary: %{summary}
|
||
BuildArch: noarch
|
||
|
||
%description -n %{name}+bzip2-devel %{_description}
|
||
|
||
This package contains library source intended for building other packages which
|
||
use the "bzip2" feature of the "%{crate}" crate.
|
||
|
||
%files -n %{name}+bzip2-devel
|
||
%ghost %{crate_instdir}/Cargo.toml
|
||
|
||
%package -n %{name}+chrono-devel
|
||
Summary: %{summary}
|
||
BuildArch: noarch
|
||
|
||
%description -n %{name}+chrono-devel %{_description}
|
||
|
||
This package contains library source intended for building other packages which
|
||
use the "chrono" feature of the "%{crate}" crate.
|
||
|
||
%files -n %{name}+chrono-devel
|
||
%ghost %{crate_instdir}/Cargo.toml
|
||
|
||
%package -n %{name}+deflate-devel
|
||
Summary: %{summary}
|
||
BuildArch: noarch
|
||
|
||
%description -n %{name}+deflate-devel %{_description}
|
||
|
||
This package contains library source intended for building other packages which
|
||
use the "deflate" feature of the "%{crate}" crate.
|
||
|
||
%files -n %{name}+deflate-devel
|
||
%ghost %{crate_instdir}/Cargo.toml
|
||
|
||
%package -n %{name}+deflate-flate2-devel
|
||
Summary: %{summary}
|
||
BuildArch: noarch
|
||
|
||
%description -n %{name}+deflate-flate2-devel %{_description}
|
||
|
||
This package contains library source intended for building other packages which
|
||
use the "deflate-flate2" feature of the "%{crate}" crate.
|
||
|
||
%files -n %{name}+deflate-flate2-devel
|
||
%ghost %{crate_instdir}/Cargo.toml
|
||
|
||
%package -n %{name}+deflate-flate2-zlib-devel
|
||
Summary: %{summary}
|
||
BuildArch: noarch
|
||
|
||
%description -n %{name}+deflate-flate2-zlib-devel %{_description}
|
||
|
||
This package contains library source intended for building other packages which
|
||
use the "deflate-flate2-zlib" feature of the "%{crate}" crate.
|
||
|
||
%files -n %{name}+deflate-flate2-zlib-devel
|
||
%ghost %{crate_instdir}/Cargo.toml
|
||
|
||
%package -n %{name}+deflate-flate2-zlib-ng-devel
|
||
Summary: %{summary}
|
||
BuildArch: noarch
|
||
|
||
%description -n %{name}+deflate-flate2-zlib-ng-devel %{_description}
|
||
|
||
This package contains library source intended for building other packages which
|
||
use the "deflate-flate2-zlib-ng" feature of the "%{crate}" crate.
|
||
|
||
%files -n %{name}+deflate-flate2-zlib-ng-devel
|
||
%ghost %{crate_instdir}/Cargo.toml
|
||
|
||
%package -n %{name}+deflate-flate2-zlib-rs-devel
|
||
Summary: %{summary}
|
||
BuildArch: noarch
|
||
|
||
%description -n %{name}+deflate-flate2-zlib-rs-devel %{_description}
|
||
|
||
This package contains library source intended for building other packages which
|
||
use the "deflate-flate2-zlib-rs" feature of the "%{crate}" crate.
|
||
|
||
%files -n %{name}+deflate-flate2-zlib-rs-devel
|
||
%ghost %{crate_instdir}/Cargo.toml
|
||
|
||
%package -n %{name}+deflate-zopfli-devel
|
||
Summary: %{summary}
|
||
BuildArch: noarch
|
||
|
||
%description -n %{name}+deflate-zopfli-devel %{_description}
|
||
|
||
This package contains library source intended for building other packages which
|
||
use the "deflate-zopfli" feature of the "%{crate}" crate.
|
||
|
||
%files -n %{name}+deflate-zopfli-devel
|
||
%ghost %{crate_instdir}/Cargo.toml
|
||
|
||
%package -n %{name}+deflate64-devel
|
||
Summary: %{summary}
|
||
BuildArch: noarch
|
||
|
||
%description -n %{name}+deflate64-devel %{_description}
|
||
|
||
This package contains library source intended for building other packages which
|
||
use the "deflate64" feature of the "%{crate}" crate.
|
||
|
||
%files -n %{name}+deflate64-devel
|
||
%ghost %{crate_instdir}/Cargo.toml
|
||
|
||
%package -n %{name}+jiff-02-devel
|
||
Summary: %{summary}
|
||
BuildArch: noarch
|
||
|
||
%description -n %{name}+jiff-02-devel %{_description}
|
||
|
||
This package contains library source intended for building other packages which
|
||
use the "jiff-02" feature of the "%{crate}" crate.
|
||
|
||
%files -n %{name}+jiff-02-devel
|
||
%ghost %{crate_instdir}/Cargo.toml
|
||
|
||
%package -n %{name}+legacy-zip-devel
|
||
Summary: %{summary}
|
||
BuildArch: noarch
|
||
|
||
%description -n %{name}+legacy-zip-devel %{_description}
|
||
|
||
This package contains library source intended for building other packages which
|
||
use the "legacy-zip" feature of the "%{crate}" crate.
|
||
|
||
%files -n %{name}+legacy-zip-devel
|
||
%ghost %{crate_instdir}/Cargo.toml
|
||
|
||
%package -n %{name}+lzma-devel
|
||
Summary: %{summary}
|
||
BuildArch: noarch
|
||
|
||
%description -n %{name}+lzma-devel %{_description}
|
||
|
||
This package contains library source intended for building other packages which
|
||
use the "lzma" feature of the "%{crate}" crate.
|
||
|
||
%files -n %{name}+lzma-devel
|
||
%ghost %{crate_instdir}/Cargo.toml
|
||
|
||
%package -n %{name}+time-devel
|
||
Summary: %{summary}
|
||
BuildArch: noarch
|
||
|
||
%description -n %{name}+time-devel %{_description}
|
||
|
||
This package contains library source intended for building other packages which
|
||
use the "time" feature of the "%{crate}" crate.
|
||
|
||
%files -n %{name}+time-devel
|
||
%ghost %{crate_instdir}/Cargo.toml
|
||
|
||
%package -n %{name}+unreserved-devel
|
||
Summary: %{summary}
|
||
BuildArch: noarch
|
||
|
||
%description -n %{name}+unreserved-devel %{_description}
|
||
|
||
This package contains library source intended for building other packages which
|
||
use the "unreserved" feature of the "%{crate}" crate.
|
||
|
||
%files -n %{name}+unreserved-devel
|
||
%ghost %{crate_instdir}/Cargo.toml
|
||
|
||
%package -n %{name}+xz-devel
|
||
Summary: %{summary}
|
||
BuildArch: noarch
|
||
|
||
%description -n %{name}+xz-devel %{_description}
|
||
|
||
This package contains library source intended for building other packages which
|
||
use the "xz" feature of the "%{crate}" crate.
|
||
|
||
%files -n %{name}+xz-devel
|
||
%ghost %{crate_instdir}/Cargo.toml
|
||
|
||
%package -n %{name}+zstd-devel
|
||
Summary: %{summary}
|
||
BuildArch: noarch
|
||
|
||
%description -n %{name}+zstd-devel %{_description}
|
||
|
||
This package contains library source intended for building other packages which
|
||
use the "zstd" feature of the "%{crate}" crate.
|
||
|
||
%files -n %{name}+zstd-devel
|
||
%ghost %{crate_instdir}/Cargo.toml
|
||
|
||
%prep
|
||
%autosetup -n %{crate}-%{version} -p1
|
||
%cargo_prep
|
||
|
||
%generate_buildrequires
|
||
%cargo_generate_buildrequires -a
|
||
|
||
%build
|
||
%cargo_build -a
|
||
|
||
%install
|
||
%cargo_install -a
|
||
|
||
%if %{with check}
|
||
%check
|
||
# Extract test data (only) from the GitHub archive
|
||
tar -xzvf '%{SOURCE10}' --strip-components=1 'zip2-%{version}/tests/data/'
|
||
%cargo_test -a
|
||
%endif
|
||
|
||
%changelog
|
||
%autochangelog
|