428 lines
13 KiB
RPMSpec
428 lines
13 KiB
RPMSpec
# Generated by rust2rpm 28
|
||
%bcond check 1
|
||
%global debug_package %{nil}
|
||
|
||
%global crate zip
|
||
|
||
Name: rust-zip2
|
||
Version: 2.4.2
|
||
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 dependency for the getrandom
|
||
# feature, and 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.
|
||
# * patch out the nt-time features; rust-nt-time not yet packaged
|
||
# * allow bzip2 0.6; see
|
||
# https://github.com/zip-rs/zip2/commit/c8278990c40ddfbeb4a23877c1221792535d21b3,
|
||
# released upstream in 4.3.0
|
||
# * Update constant_time_eq from 0.3 to 0.4. 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-2.1.4-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-devel
|
||
Summary: %{summary}
|
||
BuildArch: noarch
|
||
|
||
%description -n %{name}+aes-devel %{_description}
|
||
|
||
This package contains library source intended for building other packages which
|
||
use the "aes" feature of the "%{crate}" crate.
|
||
|
||
%files -n %{name}+aes-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}+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}+constant_time_eq-devel
|
||
Summary: %{summary}
|
||
BuildArch: noarch
|
||
|
||
%description -n %{name}+constant_time_eq-devel %{_description}
|
||
|
||
This package contains library source intended for building other packages which
|
||
use the "constant_time_eq" feature of the "%{crate}" crate.
|
||
|
||
%files -n %{name}+constant_time_eq-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-miniz-devel
|
||
Summary: %{summary}
|
||
BuildArch: noarch
|
||
|
||
%description -n %{name}+deflate-miniz-devel %{_description}
|
||
|
||
This package contains library source intended for building other packages which
|
||
use the "deflate-miniz" feature of the "%{crate}" crate.
|
||
|
||
%files -n %{name}+deflate-miniz-devel
|
||
%ghost %{crate_instdir}/Cargo.toml
|
||
|
||
%package -n %{name}+deflate-zlib-devel
|
||
Summary: %{summary}
|
||
BuildArch: noarch
|
||
|
||
%description -n %{name}+deflate-zlib-devel %{_description}
|
||
|
||
This package contains library source intended for building other packages which
|
||
use the "deflate-zlib" feature of the "%{crate}" crate.
|
||
|
||
%files -n %{name}+deflate-zlib-devel
|
||
%ghost %{crate_instdir}/Cargo.toml
|
||
|
||
%package -n %{name}+deflate-zlib-ng-devel
|
||
Summary: %{summary}
|
||
BuildArch: noarch
|
||
|
||
%description -n %{name}+deflate-zlib-ng-devel %{_description}
|
||
|
||
This package contains library source intended for building other packages which
|
||
use the "deflate-zlib-ng" feature of the "%{crate}" crate.
|
||
|
||
%files -n %{name}+deflate-zlib-ng-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}+flate2-devel
|
||
Summary: %{summary}
|
||
BuildArch: noarch
|
||
|
||
%description -n %{name}+flate2-devel %{_description}
|
||
|
||
This package contains library source intended for building other packages which
|
||
use the "flate2" feature of the "%{crate}" crate.
|
||
|
||
%files -n %{name}+flate2-devel
|
||
%ghost %{crate_instdir}/Cargo.toml
|
||
|
||
%package -n %{name}+getrandom-devel
|
||
Summary: %{summary}
|
||
BuildArch: noarch
|
||
|
||
%description -n %{name}+getrandom-devel %{_description}
|
||
|
||
This package contains library source intended for building other packages which
|
||
use the "getrandom" feature of the "%{crate}" crate.
|
||
|
||
%files -n %{name}+getrandom-devel
|
||
%ghost %{crate_instdir}/Cargo.toml
|
||
|
||
%package -n %{name}+hmac-devel
|
||
Summary: %{summary}
|
||
BuildArch: noarch
|
||
|
||
%description -n %{name}+hmac-devel %{_description}
|
||
|
||
This package contains library source intended for building other packages which
|
||
use the "hmac" feature of the "%{crate}" crate.
|
||
|
||
%files -n %{name}+hmac-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}+lzma-rs-devel
|
||
Summary: %{summary}
|
||
BuildArch: noarch
|
||
|
||
%description -n %{name}+lzma-rs-devel %{_description}
|
||
|
||
This package contains library source intended for building other packages which
|
||
use the "lzma-rs" feature of the "%{crate}" crate.
|
||
|
||
%files -n %{name}+lzma-rs-devel
|
||
%ghost %{crate_instdir}/Cargo.toml
|
||
|
||
%package -n %{name}+pbkdf2-devel
|
||
Summary: %{summary}
|
||
BuildArch: noarch
|
||
|
||
%description -n %{name}+pbkdf2-devel %{_description}
|
||
|
||
This package contains library source intended for building other packages which
|
||
use the "pbkdf2" feature of the "%{crate}" crate.
|
||
|
||
%files -n %{name}+pbkdf2-devel
|
||
%ghost %{crate_instdir}/Cargo.toml
|
||
|
||
%package -n %{name}+sha1-devel
|
||
Summary: %{summary}
|
||
BuildArch: noarch
|
||
|
||
%description -n %{name}+sha1-devel %{_description}
|
||
|
||
This package contains library source intended for building other packages which
|
||
use the "sha1" feature of the "%{crate}" crate.
|
||
|
||
%files -n %{name}+sha1-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}+zeroize-devel
|
||
Summary: %{summary}
|
||
BuildArch: noarch
|
||
|
||
%description -n %{name}+zeroize-devel %{_description}
|
||
|
||
This package contains library source intended for building other packages which
|
||
use the "zeroize" feature of the "%{crate}" crate.
|
||
|
||
%files -n %{name}+zeroize-devel
|
||
%ghost %{crate_instdir}/Cargo.toml
|
||
|
||
%package -n %{name}+zopfli-devel
|
||
Summary: %{summary}
|
||
BuildArch: noarch
|
||
|
||
%description -n %{name}+zopfli-devel %{_description}
|
||
|
||
This package contains library source intended for building other packages which
|
||
use the "zopfli" feature of the "%{crate}" crate.
|
||
|
||
%files -n %{name}+zopfli-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/'
|
||
cp -vp '%{SOURCE11}' tests/data/
|
||
%cargo_test -a
|
||
%endif
|
||
|
||
%changelog
|
||
%autochangelog
|