# Generated by rust2rpm %bcond_without check # Not interested in packaging lib %global __cargo_is_lib() false Name: stratisd Version: 0.1.4 Release: 1%{?dist} Summary: Daemon that manages block devices to create filesystems License: MPLv2.0 URL: https://github.com/stratis-storage/stratisd Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz Patch0001: 0001-deps-update-quickcheck-to-0.6.patch Patch0002: 0002-deps-update-rand-to-0.4.patch Patch0003: 0003-deps-update-byteorder-to-1.patch Patch0004: 0004-deps-update-env_logger-to-0.4.patch Patch0005: 0005-deps-update-clap-to-2.patch Patch0006: 0006-deps-update-loopdev-to-0.2.patch ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging # [dependencies] BuildRequires: (crate(byteorder) >= 1.0.0 with crate(byteorder) < 2.0.0) BuildRequires: (crate(chrono) >= 0.4.0 with crate(chrono) < 0.5.0) BuildRequires: (crate(clap) >= 2.0.0 with crate(clap) < 3.0.0) BuildRequires: (crate(crc) >= 1.0.0 with crate(crc) < 2.0.0) BuildRequires: (crate(dbus) >= 0.6.1 with crate(dbus) < 0.7.0) BuildRequires: (crate(devicemapper) >= 0.15.0 with crate(devicemapper) < 0.16.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.0 with crate(libc) < 0.3.0) BuildRequires: (crate(libudev) >= 0.2.0 with crate(libudev) < 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(mnt) >= 0.3.1 with crate(mnt) < 0.4.0) BuildRequires: (crate(nix) >= 0.9.0 with crate(nix) < 0.10.0) BuildRequires: (crate(rand) >= 0.4.0 with crate(rand) < 0.5.0) BuildRequires: (crate(serde) >= 1.0.0 with crate(serde) < 2.0.0) BuildRequires: (crate(serde_derive) >= 1.0.0 with crate(serde_derive) < 2.0.0) BuildRequires: (crate(serde_json) >= 1.0.0 with crate(serde_json) < 2.0.0) BuildRequires: (crate(tempdir) >= 0.3.5 with crate(tempdir) < 0.4.0) BuildRequires: (crate(term) >= 0.4.0 with crate(term) < 0.5.0) BuildRequires: ((crate(uuid) >= 0.5.0 with crate(uuid) < 0.6.0) with crate(uuid/serde) with crate(uuid/v4)) %if %{with check} # [dev-dependencies] BuildRequires: (crate(loopdev) >= 0.2.0 with crate(loopdev) < 0.3.0) BuildRequires: (crate(quickcheck) >= 0.6.0 with crate(quickcheck) < 0.7.0) %endif %description %{summary}. %prep %autosetup -p1 %cargo_prep # XXX: propose this hack to %%cargo_prep rm -vf Cargo.lock # Not interested in clippy sed -i -e "/^clippy/d" Cargo.toml %build %cargo_build %install %cargo_install %{__install} -Dpm0644 -t %{buildroot}%{_sysconfdir}/dbus-1/system.d stratisd.conf %if %{with check} %check %cargo_test -- --skip real_ --skip loop_ --skip travis_ %endif %files %license LICENSE %doc README.md %{_bindir}/stratisd %config %{_sysconfdir}/dbus-1/system.d/stratisd.conf %changelog * Sun Jan 07 2018 Igor Gnatenko - 0.1.4-1 - Initial package