diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0b7d75d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/rgb-0.8.13.crate diff --git a/rust-rgb.spec b/rust-rgb.spec new file mode 100644 index 0000000..3ac75cb --- /dev/null +++ b/rust-rgb.spec @@ -0,0 +1,87 @@ +# Generated by rust2rpm +%bcond_without check +%global debug_package %{nil} + +%global crate rgb + +Name: rust-%{crate} +Version: 0.8.13 +Release: 1%{?dist} +Summary: Struct RGB for sharing pixels between crates + +# No licence file +# https://github.com/kornelski/rust-rgb/pull/22 +License: MIT +URL: https://crates.io/crates/rgb +Source: %{crates_source} + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging +%if %{with check} +BuildRequires: (crate(serde_json/default) >= 1.0.0 with crate(serde_json/default) < 2.0.0) +%endif + +%global _description \ +Operating on pixels as weakly-typed vectors of u8 is error-prone and\ +inconvenient. It's better to use vectors of pixel structs. However, Rust is so\ +strongly typed that your RGB pixel struct is not compatible with my RGB pixel\ +struct. So let's all use mine. + +%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 +%doc README.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}+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 + +%prep +%autosetup -n %{crate}-%{version_no_tilde} -p1 +%cargo_prep + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +* Tue Apr 30 18:49:07 EEST 2019 Artem Polishchuk - 0.8.13-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..e087ba6 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (rgb-0.8.13.crate) = 4fcc60786299b471ae2ff998cf723c3c6d37782c4269b8374611aa804159dcd9c79ce62f4d6dd342cb00f40e67ccf4631b81b8719aeaa2cef4b4a1b7a78c880e