Blob Blame History Raw
# Generated by rust2rpm
%bcond_without check
%global debug_package %{nil}

%global crate fuse

Name:           rust-%{crate}
Version:        0.3.1
Release:        1%{?dist}
Summary:        Rust library for filesystems in userspace (FUSE)

License:        MIT
URL:            https://crates.io/crates/fuse
Source0:        https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate
# Initial patched metadata
# * Bump env_logger to 0.5, https://github.com/zargony/rust-fuse/commit/e320b6eff05455ef553041e7944d963f94009e44
Patch0:         fuse-0.3.1-fix-metadata.diff
Patch0001:      0001-upgrade-the-env_logger-dependency.patch

ExclusiveArch:  %{rust_arches}

BuildRequires:  rust-packaging
# [dependencies]
BuildRequires:  (crate(libc) >= 0.2.0 with crate(libc) < 0.3.0)
BuildRequires:  (crate(log) >= 0.3.0 with crate(log) < 0.4.0)
BuildRequires:  (crate(thread-scoped) >= 1.0.0 with crate(thread-scoped) < 2.0.0)
BuildRequires:  (crate(time) >= 0.1.0 with crate(time) < 0.2.0)
# [build-dependencies]
BuildRequires:  (crate(pkg-config) >= 0.3.0 with crate(pkg-config) < 0.4.0)
%if %{with check}
# [dev-dependencies]
BuildRequires:  (crate(env_logger) >= 0.5.0 with crate(env_logger) < 0.6.0)
%endif
BuildRequires:  pkgconfig(fuse) >= 2.6.0

%description
%{summary}.

%package        devel
Summary:        %{summary}
BuildArch:      noarch
Requires:       pkgconfig(fuse) >= 2.6.0

%description    devel
Rust library for filesystems in userspace (FUSE).

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
%endif

%files          devel
%license LICENSE.md
%doc README.md
%{cargo_registry}/%{crate}-%{version}/

%changelog
* Thu Jul 26 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.3.1-1
- Initial package