## START: Set by rpmautospec ## (rpmautospec version 0.8.1) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Generated by rust2rpm 27 %bcond check 1 %global debug_package %{nil} # At the default debug level 2, compiling the crate for testing in %%check # takes an hour and a half or much more; at level 1, it takes seconds to # minutes. %global rustflags_debuginfo 1 # prevent executables from being installed %global cargo_install_bin 0 %global crate brotli-decompressor Name: rust-brotli-decompressor Version: 5.0.0 Release: %autorelease Summary: Brotli decompressor with no_std support License: BSD-3-Clause AND MIT URL: https://crates.io/crates/brotli-decompressor Source: %{crates_source} # Manually created patch for downstream crate metadata changes # * Adjust license from BSD-3-Clause/MIT to BSD-3-Clause AND MIT; see # https://github.com/dropbox/rust-brotli-decompressor/issues/9, # https://github.com/dropbox/rust-brotli-decompressor/pull/32, and Patch10.See # also the similar PR https://github.com/dropbox/rust-brotli/pull/218, which # was merged. Patch: brotli-decompressor-fix-metadata.diff # * Adjust license to reflect a MIT-only source, and add a MIT license file # (https://github.com/dropbox/rust-brotli-decompressor/pull/32), without the # changes to Cargo.toml (which are applied manually to the normalized # Cargo.toml in the crate). Patch10: brotli-decompressor-4.0.1-license-accuracy.patch BuildRequires: cargo-rpm-macros >= 26 %global _description %{expand: A brotli decompressor that with an interface avoiding the rust stdlib. This makes it suitable for embedded devices and kernels. It is designed with a pluggable allocator so that the standard lib's allocator may be employed. The default build also includes a stdlib allocator and stream interface. Disable this with --features=no-stdlib. Alternatively, --features=unsafe turns off array bounds checks and memory initialization but provides a safe interface for the caller. Without adding the --features=unsafe argument, all included code is safe. For compression in addition to this library, download https://github.com/dropbox/rust-brotli.} %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.BSD-3-Clause %license %{crate_instdir}/LICENSE.MIT %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}+alloc-stdlib-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+alloc-stdlib-devel %{_description} This package contains library source intended for building other packages which use the "alloc-stdlib" feature of the "%{crate}" crate. %files -n %{name}+alloc-stdlib-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+disable-timer-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+disable-timer-devel %{_description} This package contains library source intended for building other packages which use the "disable-timer" feature of the "%{crate}" crate. %files -n %{name}+disable-timer-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+ffi-api-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+ffi-api-devel %{_description} This package contains library source intended for building other packages which use the "ffi-api" feature of the "%{crate}" crate. %files -n %{name}+ffi-api-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+pass-through-ffi-panics-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+pass-through-ffi-panics-devel %{_description} This package contains library source intended for building other packages which use the "pass-through-ffi-panics" feature of the "%{crate}" crate. %files -n %{name}+pass-through-ffi-panics-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+seccomp-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+seccomp-devel %{_description} This package contains library source intended for building other packages which use the "seccomp" feature of the "%{crate}" crate. %files -n %{name}+seccomp-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}+unsafe-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+unsafe-devel %{_description} This package contains library source intended for building other packages which use the "unsafe" feature of the "%{crate}" crate. %files -n %{name}+unsafe-devel %ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 # Remove executable flag from .rs files # https://github.com/dropbox/rust-brotli-decompressor/pull/33 find src -type f -executable -exec chmod -x '{}' '+' # Integration tests require a test data corpus that (1) exists only in git, not # in the released crates, so would require a separate source archive, and more # seriously, (2) contains content under various and unspecified licenses. rm src/bin/integration_tests.rs sed -r -i 's@^mod integration_tests@// &@' src/bin/brotli-decompressor.rs # This test also requires the data corpus. sed -r -i 's@.*test_alice@// Always false:\n#[cfg(any())]\n&@' src/bin/tests.rs %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %install %cargo_install %if %{with check} %check %cargo_test %endif %changelog ## START: Generated by rpmautospec * Wed Sep 03 2025 Benjamin A. Beasley - 5.0.0-1 - Update to version 5.0.0; Fixes RHBZ#2360907 * Fri Jul 25 2025 Fedora Release Engineering - 4.0.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild * Thu May 01 2025 Fabio Valentini - 4.0.3-1 - Update to version 4.0.3 * Sun Jan 26 2025 Fabio Valentini - 4.0.2-1 - Update to version 4.0.2; Fixes RHBZ#2339090 * Sun Jan 19 2025 Fedora Release Engineering - 4.0.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild * Tue Sep 24 2024 Benjamin A. Beasley - 4.0.1-1 - Update to 4.0.1 (close RHBZ#2272915) - Reduce the debuginfo level as a workaround for very slow test compilation. * Fri Jul 19 2024 Fedora Release Engineering - 2.5.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Fri Jan 26 2024 Fedora Release Engineering - 2.5.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sun Jan 14 2024 Fabio Valentini - 2.5.1-1 - Update to version 2.5.1; Fixes RHBZ#2241464 * Fri Jul 21 2023 Fedora Release Engineering - 2.3.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Sun Jan 29 2023 Fabio Valentini - 2.3.4-1 - Update to version 2.3.4; Fixes RHBZ#2161121 * Fri Jan 20 2023 Fedora Release Engineering - 2.3.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Sat Jul 23 2022 Fedora Release Engineering - 2.3.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Fri Jan 21 2022 Fedora Release Engineering - 2.3.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Sat Jul 31 2021 Fabio Valentini - 2.3.2-1 - Update to version 2.3.2; Fixes RHBZ#1988657 * Fri Jul 23 2021 Fedora Release Engineering - 2.3.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Wed Jan 27 2021 Fedora Release Engineering - 2.3.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Wed Jul 29 2020 Fedora Release Engineering - 2.3.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Fri May 29 2020 Josh Stone - 2.3.1-1 - Update to 2.3.1 * Thu Jan 30 2020 Fedora Release Engineering - 2.3.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Sat Dec 14 17:46:40 CET 2019 Igor Gnatenko - 2.3.0-1 - Initial package ## END: Generated by rpmautospec