Adapt to new packaging

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

@ -6,7 +6,7 @@
Name: rust-%{crate}
Version: 3.0.4
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Library for managing temporary files and directories
# Upstream license specification: MIT/Apache-2.0
@ -16,29 +16,47 @@ Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{
# Initial patched metadata
# * No Windows
# * No Redox
Patch0: tempfile-3.0.3-fix-metadata.diff
# * Exclude CI files, https://github.com/Stebalien/tempfile/pull/72
Patch0: tempfile-fix-metadata.diff
ExclusiveArch: %{rust_arches}
BuildRequires: rust-packaging
# [dependencies]
BuildRequires: (crate(cfg-if) >= 0.1.0 with crate(cfg-if) < 0.2.0)
BuildRequires: (crate(libc) >= 0.2.27 with crate(libc) < 0.3.0)
BuildRequires: (crate(rand) >= 0.5.0 with crate(rand) < 0.6.0)
BuildRequires: (crate(remove_dir_all) >= 0.5.0 with crate(remove_dir_all) < 0.6.0)
BuildRequires: (crate(cfg-if/default) >= 0.1.0 with crate(cfg-if/default) < 0.2.0)
BuildRequires: (crate(libc/default) >= 0.2.27 with crate(libc/default) < 0.3.0)
BuildRequires: (crate(rand/default) >= 0.5.0 with crate(rand/default) < 0.6.0)
BuildRequires: (crate(remove_dir_all/default) >= 0.5.0 with crate(remove_dir_all/default) < 0.6.0)
%description
%{summary}.
%global _description \
A library for managing temporary files and directories.
%description %{_description}
%package devel
Summary: %{summary}
BuildArch: noarch
%description devel
A library for managing temporary files and directories.
%description devel %{_description}
This package contains library source intended for building other packages
which use %{crate} from crates.io.
which use "%{crate}" crate.
%files devel
%license LICENSE-MIT LICENSE-APACHE
%doc README.md NEWS
%{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
%prep
%autosetup -n %{crate}-%{version} -p1
@ -55,13 +73,10 @@ which use %{crate} from crates.io.
%cargo_test
%endif
%files devel
%license LICENSE-MIT LICENSE-APACHE
%doc README.md NEWS
%{cargo_registry}/%{crate}-%{version}/
%exclude %{cargo_registry}/%{crate}-%{version}/appveyor.yml
%changelog
* Sat Oct 27 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 3.0.4-2
- Adapt to new packaging
* Thu Sep 20 2018 Josh Stone <jistone@redhat.com> - 3.0.4-1
- Update to 3.0.4

@ -1,13 +0,0 @@
--- tempfile-3.0.3/Cargo.toml 1970-01-01T01:00:00+01:00
+++ tempfile-3.0.3/Cargo.toml 2018-07-18T08:31:08.773813+02:00
@@ -25,10 +25,5 @@
[dependencies.remove_dir_all]
version = "0.5"
-[target."cfg(target_os = \"redox\")".dependencies.redox_syscall]
-version = "0.1"
[target."cfg(unix)".dependencies.libc]
version = "0.2.27"
-[target."cfg(windows)".dependencies.winapi]
-version = "0.3"
-features = ["fileapi", "winbase", "handleapi"]

@ -0,0 +1,21 @@
--- tempfile-3.0.4/Cargo.toml 1970-01-01T01:00:00+01:00
+++ tempfile-3.0.4/Cargo.toml 2018-10-27T02:22:15.427394+02:00
@@ -20,6 +20,7 @@
keywords = ["tempfile", "tmpfile", "filesystem"]
license = "MIT/Apache-2.0"
repository = "https://github.com/Stebalien/tempfile"
+exclude = ["/.travis.yml", "/appveyor.yml"]
[dependencies.cfg-if]
version = "0.1"
@@ -28,10 +29,5 @@
[dependencies.remove_dir_all]
version = "0.5"
-[target."cfg(target_os = \"redox\")".dependencies.redox_syscall]
-version = "0.1"
[target."cfg(unix)".dependencies.libc]
version = "0.2.27"
-[target."cfg(windows)".dependencies.winapi]
-version = "0.3"
-features = ["fileapi", "winbase", "handleapi"]
Loading…
Cancel
Save