From e98f4b759f6c89e044095ee51dbfdd7fb1870f45 Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Wed, 20 Jul 2022 17:22:12 +0200
Subject: [PATCH] Update to version 4.0.1; Fixes RHBZ#2004756

---
 .gitignore            |  1 +
 rust-directories.spec | 28 +++++++++++++---------------
 sources               |  2 +-
 3 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/.gitignore b/.gitignore
index 23ae019..279e9ca 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@
 /directories-2.0.2.crate
 /directories-3.0.1.crate
 /directories-3.0.2.crate
+/directories-4.0.1.crate
diff --git a/rust-directories.spec b/rust-directories.spec
index 029f144..ed4befe 100644
--- a/rust-directories.spec
+++ b/rust-directories.spec
@@ -1,13 +1,13 @@
-# Generated by rust2rpm 17
+# Generated by rust2rpm 21
 %bcond_without check
 %global debug_package %{nil}
 
 %global crate directories
 
 Name:           rust-%{crate}
-Version:        3.0.2
+Version:        4.0.1
 Release:        %autorelease
-Summary:        Library that provides platform-specific standard locations of directories
+Summary:        Platform-specific standard locations of directories
 
 # Upstream license specification: MIT OR Apache-2.0
 License:        MIT or ASL 2.0
@@ -15,11 +15,8 @@ URL:            https://crates.io/crates/directories
 Source:         %{crates_source}
 
 ExclusiveArch:  %{rust_arches}
-%if %{__cargo_skip_build}
-BuildArch:      noarch
-%endif
 
-BuildRequires:  rust-packaging
+BuildRequires:  rust-packaging >= 21
 
 %global _description %{expand:
 Tiny mid-level library that provides platform-specific standard locations of
@@ -36,13 +33,14 @@ BuildArch:      noarch
 
 %description    devel %{_description}
 
-This package contains library source intended for building other packages
-which use "%{crate}" crate.
+This package contains library source intended for building other packages which
+use the "%{crate}" crate.
 
 %files          devel
-%license LICENSE-MIT LICENSE-APACHE
-%doc README.md
-%{cargo_registry}/%{crate}-%{version_no_tilde}/
+%license %{crate_instdir}/LICENSE-APACHE
+%license %{crate_instdir}/LICENSE-MIT
+%doc %{crate_instdir}/README.md
+%{crate_instdir}/
 
 %package     -n %{name}+default-devel
 Summary:        %{summary}
@@ -50,11 +48,11 @@ 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.
+This package contains library source intended for building other packages which
+use the "default" feature of the "%{crate}" crate.
 
 %files       -n %{name}+default-devel
-%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+%ghost %{crate_instdir}/Cargo.toml
 
 %prep
 %autosetup -n %{crate}-%{version_no_tilde} -p1
diff --git a/sources b/sources
index 48bc9e2..c8d8c68 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (directories-3.0.2.crate) = 9bccbb99a832d092dbce0ce5ae98c2e1eb58febf0fbbf410152bb0d62324141957ed04284c71809a692fc2d2ba0e9b41854d892e68269893850ea3645a9549f8
+SHA512 (directories-4.0.1.crate) = babe4e23759b2e01a284a14aa1b45ba9d705ad7257246fe8c1ee6a071f48192c58a30b7d09c222268be83f7ebb59c0cc91e8b1342c1f9f0a96ec079fd264f8d5