Adapt to new packaging

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
epel9
Igor Gnatenko 6 years ago
parent a5d9744335
commit b4916eac7d
No known key found for this signature in database
GPG Key ID: 695714BD1BBC5F4C

@ -0,0 +1,10 @@
--- libc-0.2.43/Cargo.toml 1970-01-01T01:00:00+01:00
+++ libc-0.2.43/Cargo.toml 2018-10-26T22:48:53.137031+02:00
@@ -20,6 +20,7 @@
readme = "README.md"
license = "MIT/Apache-2.0"
repository = "https://github.com/rust-lang/libc"
+exclude = ["/ci/*", "/.travis.yml", "/appveyor.yml"]
[features]
align = []

@ -7,32 +7,78 @@
Name: rust-%{crate}
Version: 0.2.43
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Library for types and bindings to native C functions
# Upstream license specification: MIT/Apache-2.0
License: MIT or ASL 2.0
URL: https://crates.io/crates/libc
Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate
# Initial patched metadata
# * Exclude CI files, https://github.com/rust-lang/libc/pull/1107
Patch0: libc-fix-metadata.diff
ExclusiveArch: %{rust_arches}
BuildRequires: rust-packaging
BuildRequires: glibc-devel
%description
%{summary}.
%global _description \
A library for types and bindings to native C functions often found in libc or\
other common platform libraries.
%description %{_description}
%package devel
Summary: %{summary}
Requires: glibc-devel
BuildArch: noarch
%description devel
A library for types and bindings to native C functions often found in libc or
other common platform libraries.
%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
%{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 %{crate} from crates.io.
which use "default" feature of "%{crate}" crate.
%files -n %{name}+default-devel
%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml
%package -n %{name}+align-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+align-devel %{_description}
This package contains library source intended for building other packages
which use "align" feature of "%{crate}" crate.
%files -n %{name}+align-devel
%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml
%package -n %{name}+use_std-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+use_std-devel %{_description}
This package contains library source intended for building other packages
which use "use_std" feature of "%{crate}" crate.
%files -n %{name}+use_std-devel
%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version} -p1
@ -49,13 +95,10 @@ which use %{crate} from crates.io.
%cargo_test
%endif
%files devel
%license LICENSE-MIT LICENSE-APACHE
%doc README.md
%{cargo_registry}/%{crate}-%{version}/
%exclude %{cargo_registry}/%{crate}-%{version}/{appveyor.yml,ci}
%changelog
* Fri Oct 26 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.2.43-3
- Adapt to new packaging
* Sun Oct 07 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.2.43-2
- Run tests in infrastructure

Loading…
Cancel
Save