diff --git a/.gitignore b/.gitignore index e69de29..ad1679f 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/zram-generator-0.1.1.crate diff --git a/rust-zram-generator.spec b/rust-zram-generator.spec index 8a72e86..b445c2c 100644 --- a/rust-zram-generator.spec +++ b/rust-zram-generator.spec @@ -5,39 +5,45 @@ Name: rust-%{crate} Version: 0.1.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Systemd unit generator for zram devices License: MIT -URL: https://github.com/systemd/zram-generator -Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +URL: https://crates.io/crates/zram-generator +Source: %{crates_source} +# Initial patched metadata +# * Update dependencies, https://github.com/systemd/zram-generator/commit/6f2b69c4a38b6da92fc4509b7d055423b8440238 +Patch0: zram-generator-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] -BuildRequires: (crate(failure) >= 0.1.0 with crate(failure) < 0.2.0) -BuildRequires: (crate(failure_derive) >= 0.1.0 with crate(failure_derive) < 0.2.0) -BuildRequires: (crate(rust-ini) >= 0.12.0 with crate(rust-ini) < 1.0.0) +BuildRequires: (crate(failure/default) >= 0.1.2 with crate(failure/default) < 0.2.0) +BuildRequires: (crate(failure_derive/default) >= 0.1.0 with crate(failure_derive/default) < 0.2.0) +BuildRequires: (crate(rust-ini/default) >= 0.12.0 with crate(rust-ini/default) < 0.13.0) -BuildRequires: systemd - -Patch0: bump-versions.diff - -%description -This is a systemd unit generator that creates a unit file to create a -zram device. To activate, copy -/usr/share/doc/rust-zram-generator/zram-generator.conf.example to +%global _description \ +This is a systemd unit generator that creates a unit file to create a\ +zram device. To activate, copy\ +/usr/share/doc/rust-zram-generator/zram-generator.conf.example to\ /etc/systemd/zram-generator.conf and possibly edit to adjust the limits. +%description %{_description} + %package -n %{crate} Summary: %{summary} %description -n %{crate} %{summary}. +%files -n %{crate} +%license LICENSE +%doc zram-generator.conf.example +%doc README.md TODO +%{_systemdgeneratordir}/zram-generator + %prep -%autosetup -n %{crate}-%{version} -p1 +%autosetup -n %{crate}-%{version_no_tilde} -p1 %cargo_prep %build @@ -54,13 +60,10 @@ mv -v %{buildroot}%{_bindir}/zram-generator %{buildroot}%{_systemdgeneratordir}/ %cargo_test %endif -%files -n %{crate} -%license LICENSE -%doc zram-generator.conf.example -%doc README.md TODO -%{_systemdgeneratordir}/zram-generator - %changelog +* Sat Mar 09 2019 Igor Gnatenko - 0.1.1-3 +- Adapt to new packaging + * Fri Mar 1 2019 Zbigniew Jędrzejewski-Szmek - 0.1.1-2 - Add crude patch to fix build (#1676154) diff --git a/sources b/sources index e69de29..77c79e1 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +SHA512 (zram-generator-0.1.1.crate) = b48638b4821fe914a2aa910fbabd060ea4f14a71a2db4010bbd3d3c9e50a64350f4a6e37223b035bdc45983fc10426693ebacda8979b9297ec3e7817ff78ac57 diff --git a/zram-generator-0.1.1.crate b/zram-generator-0.1.1.crate deleted file mode 100644 index 81ceec2..0000000 Binary files a/zram-generator-0.1.1.crate and /dev/null differ diff --git a/bump-versions.diff b/zram-generator-fix-metadata.diff similarity index 64% rename from bump-versions.diff rename to zram-generator-fix-metadata.diff index ed2e781..ef3ebf0 100644 --- a/bump-versions.diff +++ b/zram-generator-fix-metadata.diff @@ -1,5 +1,5 @@ ---- zram-generator-0.1.1/Cargo.toml~ 1970-01-01 01:00:00.000000000 +0100 -+++ zram-generator-0.1.1/Cargo.toml 2019-03-01 16:48:14.223492246 +0100 +--- zram-generator-0.1.1/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ zram-generator-0.1.1/Cargo.toml 2019-03-09T14:58:31.909576+01:00 @@ -18,10 +18,10 @@ homepage = "https://github.com/systemd/zram-generator" license = "MIT"