diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5437a31 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/brotli-3.3.0.crate diff --git a/rust-brotli.spec b/rust-brotli.spec new file mode 100644 index 0000000..83d3f0a --- /dev/null +++ b/rust-brotli.spec @@ -0,0 +1,229 @@ +# Generated by rust2rpm 12 +%bcond_without check +%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: 1%{?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} + +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}+packed_simd-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+packed_simd-devel %{_description} + +This package contains library source intended for building other packages +which use "packed_simd" feature of "%{crate}" crate. + +%files -n %{name}+packed_simd-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}+simd-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+simd-devel %{_description} + +This package contains library source intended for building other packages +which use "simd" feature of "%{crate}" crate. + +%files -n %{name}+simd-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 +* Sat Dec 14 17:51:22 CET 2019 Igor Gnatenko - 3.3.0-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..14ea9db --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (brotli-3.3.0.crate) = 58da8c12a314ce5687697805065fe83c991b1e4468af16ebe2b8bc6848611b17065210f2da3e9774d40cedbd526b35727bf5876e82367ada07174fe62a00452c diff --git a/tests/.fmf/version b/tests/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/tests/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/tests/provision.fmf b/tests/provision.fmf new file mode 100644 index 0000000..503a97c --- /dev/null +++ b/tests/provision.fmf @@ -0,0 +1,5 @@ +--- +standard-inventory-qcow2: + qemu: + # `cargo test` usually eats more than 1G. + m: 4G diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..9358a74 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,13 @@ +--- +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + repositories: + - repo: "https://src.fedoraproject.org/tests/rust.git" + dest: rust + tests: + - rust/cargo-test + environment: + pkg: rust-brotli