# Generated by rust2rpm %bcond_without check %global debug_package %{nil} %global crate devicemapper Name: rust-%{crate} Version: 0.15.0 Release: 1%{?dist} Summary: Library for using Linux device mapper # https://github.com/stratis-storage/devicemapper-rs/issues/248 License: MPLv2.0 URL: https://crates.io/crates/devicemapper Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate # Initial patched metadata # * Bump loopdev to 0.2, https://github.com/stratis-storage/devicemapper-rs/commit/5834af3b273043660e42ef3d03c97e4533a2c745 Patch0: devicemapper-0.15.0-fix-metadata.diff # Make it work with loopdev v0.2 Patch1: 0001-bump-loopdev-to-0.2.patch ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging # [dependencies] BuildRequires: (crate(bitflags) >= 1.0.0 with crate(bitflags) < 2.0.0) BuildRequires: (crate(env_logger) >= 0.4.0 with crate(env_logger) < 0.5.0) BuildRequires: (crate(error-chain) >= 0.11.0 with crate(error-chain) < 0.12.0) BuildRequires: (crate(libc) >= 0.2.31 with crate(libc) < 0.3.0) BuildRequires: (crate(log) >= 0.3.0 with crate(log) < 0.4.0) BuildRequires: (crate(macro-attr) >= 0.2.0 with crate(macro-attr) < 0.3.0) BuildRequires: (crate(newtype_derive) >= 0.1.0 with crate(newtype_derive) < 0.2.0) BuildRequires: (crate(nix) >= 0.9.0 with crate(nix) < 0.10.0) BuildRequires: (crate(serde) >= 1.0.0 with crate(serde) < 2.0.0) %if %{with check} # [dev-dependencies] BuildRequires: (crate(loopdev) >= 0.2.0 with crate(loopdev) < 0.3.0) BuildRequires: (crate(tempdir) >= 0.3.5 with crate(tempdir) < 0.4.0) %endif %description %{summary}. %package devel Summary: %{summary} BuildArch: noarch %description devel A library for using Linux device mapper. This package contains library source intended for building other packages which use %{crate} from crates.io. %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep %build %cargo_build %install %cargo_install %if %{with check} %check %cargo_test -- --skip sudo_ --skip loop_ %endif %files devel %{cargo_registry}/%{crate}-%{version}/ %exclude %{cargo_registry}/%{crate}-%{version}/Makefile %changelog * Wed Jan 03 2018 Igor Gnatenko - 0.15.0-1 - Initial package