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.
rust-brotli/rust-brotli.spec

225 lines
6.8 KiB

# Generated by rust2rpm 12
# https://github.com/dropbox/rust-brotli/issues/42
%if 0%{?__isa_bits} == 32
%bcond_with check
%else
%bcond_without check
%endif
%global debug_package %{nil}
# The binary is useless and conflicts with original brotli
%global __cargo_is_bin() false
%global crate brotli
Name: rust-%{crate}
Version: 3.3.0
Release: 4%{?dist}
Summary: Brotli compressor and decompressor avoiding the rust stdlib
# Upstream license specification: BSD-3-Clause/MIT
# * https://github.com/dropbox/rust-brotli/issues/41
License: BSD
URL: https://crates.io/crates/brotli
Source: %{crates_source}
# Initial patched metadata
# * Exclude unneeded files, https://github.com/dropbox/rust-brotli/pull/43
# * Exclude simd feature (broken dependencies)
# * Bump sha2 dependency from 0.8 to 0.9
Patch0: brotli-fix-metadata.diff
ExclusiveArch: %{rust_arches}
%if %{__cargo_skip_build}
BuildArch: noarch
%endif
BuildRequires: rust-packaging
%global _description %{expand:
Brotli compressor and 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. All included code is safe.}
%description %{_description}
%package devel
Summary: %{summary}
BuildArch: noarch
%description devel %{_description}
This package contains library source intended for building other packages
which use "%{crate}" crate.
%files devel
%license LICENSE
%doc README.md
%{cargo_registry}/%{crate}-%{version_no_tilde}/
%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 "default" feature of "%{crate}" crate.
%files -n %{name}+default-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/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 "alloc-stdlib" feature of "%{crate}" crate.
%files -n %{name}+alloc-stdlib-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%package -n %{name}+benchmark-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+benchmark-devel %{_description}
This package contains library source intended for building other packages
which use "benchmark" feature of "%{crate}" crate.
%files -n %{name}+benchmark-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/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 "disable-timer" feature of "%{crate}" crate.
%files -n %{name}+disable-timer-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%package -n %{name}+external-literal-probability-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+external-literal-probability-devel %{_description}
This package contains library source intended for building other packages
which use "external-literal-probability" feature of "%{crate}" crate.
%files -n %{name}+external-literal-probability-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/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 "pass-through-ffi-panics" feature of "%{crate}" crate.
%files -n %{name}+pass-through-ffi-panics-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/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 "seccomp" feature of "%{crate}" crate.
%files -n %{name}+seccomp-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%package -n %{name}+sha2-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+sha2-devel %{_description}
This package contains library source intended for building other packages
which use "sha2" feature of "%{crate}" crate.
%files -n %{name}+sha2-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/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 "std" feature of "%{crate}" crate.
%files -n %{name}+std-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%package -n %{name}+validation-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+validation-devel %{_description}
This package contains library source intended for building other packages
which use "validation" feature of "%{crate}" crate.
%files -n %{name}+validation-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%package -n %{name}+vector_scratch_space-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+vector_scratch_space-devel %{_description}
This package contains library source intended for building other packages
which use "vector_scratch_space" feature of "%{crate}" crate.
%files -n %{name}+vector_scratch_space-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
# https://github.com/dropbox/rust-brotli/pull/40
find -type f -name '*.rs' -executable -exec chmod -x '{}' +
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
%build
%cargo_build
%install
%cargo_install
%if %{with check}
%check
%cargo_test
%endif
%changelog
* Tue Nov 24 2020 Fabio Valentini <decathorpe@gmail.com> - 3.3.0-4
- Fix FTI issues for some features.
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Sat Dec 14 17:51:22 CET 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 3.3.0-1
- Initial package