Blob Blame Raw
# Generated by rust2rpm 9
%bcond_with check
%global debug_package %{nil}

%global crate atomicwrites

Name:           rust-%{crate}
Version:        0.2.3
Release:        1%{?dist}
Summary:        Atomic file-writes

# Upstream license specification: MIT
License:        MIT
URL:            https://crates.io/crates/atomicwrites
Source:         %{crates_source}
# Initial patched metadata
# - Remove Windows-only dependencies
Patch0:         atomicwrites-fix-metadata.diff

ExclusiveArch:  %{rust_arches}

BuildRequires:  rust-packaging
BuildRequires:  (crate(nix/default) >= 0.14.0 with crate(nix/default) < 0.15.0)
BuildRequires:  (crate(tempdir/default) >= 0.3.0 with crate(tempdir/default) < 0.4.0)

%global _description %{expand:
Atomic file-writes.

The basic idea is to write to temporary files, and move them when done writing.
This avoids the problem of two programs writing to the same file. For
AllowOverwrite, rename is used. For DisallowOverwrite, link + unlink is used
instead to raise errors when the target path already exists.}

%description %{_description}

%package        devel
Summary:        %{summary}
BuildArch:      noarch

%description    devel %{_description}

This package contains library source intended for building other packages
which use "%{crate}" crate.

%files          devel
%doc README.md
%license LICENSE
%{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_no_tilde} -p1
%cargo_prep

%build
%cargo_build

%install
%cargo_install

%if %{with check}
%check
%cargo_test
%endif

%changelog
* Wed Jun 05 17:43:13 CEST 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.2.3-1
- Update to 0.2.3

* Wed Jun 05 2019 Josh Stone <jistone@redhat.com> - 0.2.2-3
- Bump nix to 0.14

* Tue Apr 23 15:02:56 CEST 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.2.2-2
- Run tests in infrastructure

* Sat Apr 13 2019 Robert-André Mauchin <zebob.m@gmail.com> - 0.2.2-1
- Initial package