From 736d942daf0e07607a1c9ed30116ad3deec43781 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sun, 17 Feb 2019 18:40:15 +0100 Subject: [PATCH] Adapt to new packaging Signed-off-by: Igor Gnatenko --- rust-yubibomb.spec | 72 +++++++++++-------- ...etadata.diff => yubibomb-fix-metadata.diff | 2 +- 2 files changed, 43 insertions(+), 31 deletions(-) rename yubibomb-0.2.0-fix-metadata.diff => yubibomb-fix-metadata.diff (72%) diff --git a/rust-yubibomb.spec b/rust-yubibomb.spec index 4225a4b..c798ed9 100644 --- a/rust-yubibomb.spec +++ b/rust-yubibomb.spec @@ -5,53 +5,72 @@ Name: rust-%{crate} Version: 0.2.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Rust command line tool that prints out a 6-digit random number +# Upstream license specification: GPL-3.0 License: GPLv3+ URL: https://crates.io/crates/yubibomb -Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +Source: %{crates_source} # Initial patched metadata # * Bump regex to 1, https://gitlab.com/bowlofeggs/yubibomb/commit/301cb10cd056cd33c4736b87aaad333f77c6c252 -Patch0: yubibomb-0.2.0-fix-metadata.diff +Patch0: yubibomb-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] -BuildRequires: (crate(rand) >= 0.4.0 with crate(rand) < 0.5.0) +BuildRequires: (crate(rand/default) >= 0.4.0 with crate(rand/default) < 0.5.0) %if %{with check} -# [dev-dependencies] -BuildRequires: (crate(regex) >= 1.0.0 with crate(regex) < 2.0.0) +BuildRequires: (crate(regex/default) >= 1.0.0 with crate(regex/default) < 2.0.0) %endif -%description -%{summary}. +%global _description \ +Don't you love when you accidentally tap your Yubikey when you have your IRC\ +client in focus and you send 987947 into Freenode? Want to be able to have that\ +experience without having to reach all the way over to your laptop's USB port?\ +Now you can! + +%description %{_description} %package -n %{crate} Summary: %{summary} %description -n %{crate} -Don't you love when you accidentally tap your Yubikey when you have your IRC -client in focus and you send 987947 into Freenode? Want to be able to have that -experience without having to reach all the way over to your laptop's USB port? -Now you can! +%{summary}. + +%files -n %{crate} +%license LICENSE +%doc README.md +%{_bindir}/yubibomb %package devel Summary: %{summary} BuildArch: noarch -%description devel -Don't you love when you accidentally tap your Yubikey when you have your IRC -client in focus and you send 987947 into Freenode? Want to be able to have that -experience without having to reach all the way over to your laptop's USB port? -Now you can! +%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 +%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 %prep -%autosetup -n %{crate}-%{version} -p1 +%autosetup -n %{crate}-%{version_no_tilde} -p1 %cargo_prep %build @@ -65,17 +84,10 @@ which use %{crate} from crates.io. %cargo_test %endif -%files -n %{crate} -%license LICENSE -%doc README.md -%{_bindir}/yubibomb - -%files devel -%license LICENSE -%doc README.md -%{cargo_registry}/%{crate}-%{version}/ - %changelog +* Sun Feb 17 2019 Igor Gnatenko - 0.2.0-5 +- Adapt to new packaging + * Sat Feb 02 2019 Fedora Release Engineering - 0.2.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/yubibomb-0.2.0-fix-metadata.diff b/yubibomb-fix-metadata.diff similarity index 72% rename from yubibomb-0.2.0-fix-metadata.diff rename to yubibomb-fix-metadata.diff index eafe7e8..960ff94 100644 --- a/yubibomb-0.2.0-fix-metadata.diff +++ b/yubibomb-fix-metadata.diff @@ -1,5 +1,5 @@ --- yubibomb-0.2.0/Cargo.toml 1970-01-01T01:00:00+01:00 -+++ yubibomb-0.2.0/Cargo.toml 2018-06-14T09:15:13.966819+02:00 ++++ yubibomb-0.2.0/Cargo.toml 2019-02-17T18:38:59.421864+01:00 @@ -24,4 +24,4 @@ [dependencies.rand] version = "0.4"