You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rust-difference/rust-difference.spec

87 lines
2.1 KiB

# Generated by rust2rpm 10
%bcond_without check
%global debug_package %{nil}
# Binary is pretty useless
%global __cargo_is_bin() false
%global crate difference
Name: rust-%{crate}
Version: 2.0.0
Release: %autorelease
Summary: Rust text diffing and assertion library
# Upstream license specification: MIT
License: MIT
URL: https://crates.io/crates/difference
Source: %{crates_source}
# Initial patched metadata
# * Bump term to 0.6, https://github.com/johannhof/difference.rs/pull/42
# * Bump quickcheck to 0.9, https://github.com/johannhof/difference.rs/pull/38
# * Remove bin feature, it is useless
Patch0: difference-fix-metadata.diff
# Use ..= for an inclusive range instead of deprecated ...
# https://github.com/johannhof/difference.rs/pull/41
Patch1: https://patch-diff.githubusercontent.com/raw/johannhof/difference.rs/pull/41.patch#/0001-Fix-inclusive-range.patch
ExclusiveArch: %{rust_arches}
%if %{__cargo_skip_build}
BuildArch: noarch
%endif
BuildRequires: rust-packaging
%global _description %{expand:
Rust text diffing and assertion library.}
%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
%license LICENSE
%doc README.md
%{cargo_registry}/%{crate}-%{version}/
%exclude %{cargo_registry}/%{crate}-%{version}/appveyor.yml
%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
%generate_buildrequires
%cargo_generate_buildrequires
%build
%cargo_build
%install
%cargo_install
%if %{with check}
%check
%cargo_test
%endif
%changelog
%autochangelog