diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bcad433 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/gstreamer-0.13.0.crate diff --git a/gstreamer-fix-metadata.diff b/gstreamer-fix-metadata.diff new file mode 100644 index 0000000..1fcf5d1 --- /dev/null +++ b/gstreamer-fix-metadata.diff @@ -0,0 +1,15 @@ +--- gstreamer-0.13.0/Cargo.toml 1970-01-01T00:00:00+00:00 ++++ gstreamer-0.13.0/Cargo.toml 2019-05-05T13:46:48.938476+00:00 +@@ -72,10 +72,10 @@ + version = "1.0" + optional = true + [dev-dependencies.ron] +-version = "0.4" ++version = "0.5" + + [dev-dependencies.serde-pickle] +-version = "0.4" ++version = "0.5" + + [dev-dependencies.serde_json] + version = "1.0" diff --git a/rust-gstreamer.spec b/rust-gstreamer.spec new file mode 100644 index 0000000..c5ec2de --- /dev/null +++ b/rust-gstreamer.spec @@ -0,0 +1,256 @@ +# Generated by rust2rpm-9-1.fc31 +%bcond_with check +%global debug_package %{nil} + +%global crate gstreamer + +Name: rust-%{crate} +Version: 0.13.0 +Release: 1%{?dist} +Summary: Rust bindings for GStreamer + +# Upstream license specification: MIT/Apache-2.0 +License: MIT or ASL 2.0 +URL: https://crates.io/crates/gstreamer +Source: %{crates_source} +# Initial patched metadata +# * Update ron and serde-pickle to 0.5, https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/commit/044e3985a3a40abaa509f4b97b55cae72bab6eff +Patch0: gstreamer-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging +BuildRequires: (crate(bitflags/default) >= 1.0.0 with crate(bitflags/default) < 2.0.0) +BuildRequires: (crate(cfg-if/default) >= 0.1.0 with crate(cfg-if/default) < 0.2.0) +BuildRequires: (crate(glib-sys/default) >= 0.8.0 with crate(glib-sys/default) < 0.9.0) +BuildRequires: (crate(glib/default) >= 0.7.0 with crate(glib/default) < 0.8.0) +BuildRequires: (crate(gobject-sys/default) >= 0.8.0 with crate(gobject-sys/default) < 0.9.0) +BuildRequires: (crate(gstreamer-sys/default) >= 0.7.0 with crate(gstreamer-sys/default) < 0.8.0) +BuildRequires: (crate(gstreamer-sys/v1_8) >= 0.7.0 with crate(gstreamer-sys/v1_8) < 0.8.0) +BuildRequires: (crate(lazy_static/default) >= 1.0.0 with crate(lazy_static/default) < 2.0.0) +BuildRequires: (crate(libc/default) >= 0.2.0 with crate(libc/default) < 0.3.0) +BuildRequires: (crate(muldiv/default) >= 0.2.0 with crate(muldiv/default) < 0.3.0) +BuildRequires: (crate(num-rational) >= 0.2.0 with crate(num-rational) < 0.3.0) +%if %{with check} +BuildRequires: (crate(ron/default) >= 0.5.0 with crate(ron/default) < 0.6.0) +BuildRequires: (crate(serde-pickle/default) >= 0.5.0 with crate(serde-pickle/default) < 0.6.0) +BuildRequires: (crate(serde_json/default) >= 1.0.0 with crate(serde_json/default) < 2.0.0) +%endif + +%global _description \ +Rust bindings for GStreamer. + +%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-MIT LICENSE-APACHE +%doc README.md CHANGELOG.md +%{cargo_registry}/%{crate}-%{version}/ + +%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}/Cargo.toml + +%package -n %{name}+dox-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+dox-devel %{_description} + +This package contains library source intended for building other packages +which use "dox" feature of "%{crate}" crate. + +%files -n %{name}+dox-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+embed-lgpl-docs-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+embed-lgpl-docs-devel %{_description} + +This package contains library source intended for building other packages +which use "embed-lgpl-docs" feature of "%{crate}" crate. + +%files -n %{name}+embed-lgpl-docs-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+futures-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+futures-devel %{_description} + +This package contains library source intended for building other packages +which use "futures" feature of "%{crate}" crate. + +%files -n %{name}+futures-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+futures-core-preview-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+futures-core-preview-devel %{_description} + +This package contains library source intended for building other packages +which use "futures-core-preview" feature of "%{crate}" crate. + +%files -n %{name}+futures-core-preview-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+purge-lgpl-docs-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+purge-lgpl-docs-devel %{_description} + +This package contains library source intended for building other packages +which use "purge-lgpl-docs" feature of "%{crate}" crate. + +%files -n %{name}+purge-lgpl-docs-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+rustdoc-stripper-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+rustdoc-stripper-devel %{_description} + +This package contains library source intended for building other packages +which use "rustdoc-stripper" feature of "%{crate}" crate. + +%files -n %{name}+rustdoc-stripper-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+ser_de-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+ser_de-devel %{_description} + +This package contains library source intended for building other packages +which use "ser_de" feature of "%{crate}" crate. + +%files -n %{name}+ser_de-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+serde-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+serde-devel %{_description} + +This package contains library source intended for building other packages +which use "serde" feature of "%{crate}" crate. + +%files -n %{name}+serde-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+serde_bytes-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+serde_bytes-devel %{_description} + +This package contains library source intended for building other packages +which use "serde_bytes" feature of "%{crate}" crate. + +%files -n %{name}+serde_bytes-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+serde_derive-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+serde_derive-devel %{_description} + +This package contains library source intended for building other packages +which use "serde_derive" feature of "%{crate}" crate. + +%files -n %{name}+serde_derive-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+subclassing-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+subclassing-devel %{_description} + +This package contains library source intended for building other packages +which use "subclassing" feature of "%{crate}" crate. + +%files -n %{name}+subclassing-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+v1_10-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+v1_10-devel %{_description} + +This package contains library source intended for building other packages +which use "v1_10" feature of "%{crate}" crate. + +%files -n %{name}+v1_10-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+v1_12-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+v1_12-devel %{_description} + +This package contains library source intended for building other packages +which use "v1_12" feature of "%{crate}" crate. + +%files -n %{name}+v1_12-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+v1_14-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+v1_14-devel %{_description} + +This package contains library source intended for building other packages +which use "v1_14" feature of "%{crate}" crate. + +%files -n %{name}+v1_14-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version_no_tilde} -p1 +%cargo_prep + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +* Sun May 05 15:46:49 CEST 2019 Igor Gnatenko - 0.13.0-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..82451cc --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (gstreamer-0.13.0.crate) = 017d58d6ab22c893b75f13cd5a639f5946942f9d7673f09e75d93a5dbd70de68d73c2a68078b54cedb86bda242ab7c0a522fd5648fb0b24dfe20c61544cf1eb4 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..7ab2e0a --- /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-gstreamer