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-syntect/rust-syntect.spec

88 lines
3.1 KiB

# Generated by rust2rpm
# criterion is not packaged yet
%bcond_with check
%global debug_package %{nil}
%global crate syntect
Name: rust-%{crate}
Version: 2.1.0
Release: 1%{?dist}
Summary: Library for high quality syntax highlighting and code intelligence
License: MIT
URL: https://crates.io/crates/syntect
Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate
# Initial patched metadata
# * Bump onig to 4.1, https://github.com/trishume/syntect/commit/6172cf925cbe87aa8984cb4362906808bd5cf437
# * Bump regex-syntax to 0.6 and regex to 1.0, https://github.com/trishume/syntect/commit/5bd64c04aa236bfb0c03da9c101aa27ed63ed01e
# * Bump plist to 0.3, https://github.com/trishume/syntect/commit/f4aa3a1421d4213f8611af8bc243f2dcdf86146f
Patch0: syntect-fix-metadata.diff
# Make it work with new plist
Patch0001: 0001-Upgrade-plist-to-0.3-and-take-advantage-of-serde-int.patch
ExclusiveArch: %{rust_arches}
BuildRequires: rust-packaging
# [dependencies]
BuildRequires: (crate(bincode) >= 1.0.0 with crate(bincode) < 2.0.0)
BuildRequires: (crate(bitflags) >= 1.0.0 with crate(bitflags) < 2.0.0)
BuildRequires: (crate(flate2) >= 1.0.0 with crate(flate2) < 2.0.0)
BuildRequires: (crate(fnv) >= 1.0.0 with crate(fnv) < 2.0.0)
BuildRequires: (crate(lazy_static) >= 1.0.0 with crate(lazy_static) < 2.0.0)
BuildRequires: (crate(onig) >= 4.1.0 with crate(onig) < 5.0.0)
BuildRequires: (crate(plist) >= 0.3.0 with crate(plist) < 0.4.0)
BuildRequires: (crate(regex-syntax) >= 0.6.0 with crate(regex-syntax) < 0.7.0)
BuildRequires: ((crate(serde) >= 1.0.0 with crate(serde) < 2.0.0) with crate(serde/rc))
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(walkdir) >= 2.0.0 with crate(walkdir) < 3.0.0)
BuildRequires: (crate(yaml-rust) >= 0.4.0 with crate(yaml-rust) < 0.5.0)
%if %{with check}
# [dev-dependencies]
BuildRequires: (crate(criterion) >= 0.2.0 with crate(criterion) < 0.3.0)
BuildRequires: (crate(getopts) >= 0.2.0 with crate(getopts) < 0.3.0)
BuildRequires: (crate(pretty_assertions) >= 0.5.0 with crate(pretty_assertions) < 0.6.0)
BuildRequires: (crate(rayon) >= 1.0.0 with crate(rayon) < 2.0.0)
BuildRequires: (crate(regex) >= 1.0.0 with crate(regex) < 2.0.0)
%endif
%description
%{summary}.
%package devel
Summary: %{summary}
BuildArch: noarch
%description devel
library for high quality syntax highlighting and code intelligence using
Sublime Text's grammars.
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.txt
%doc Readme.md DESIGN.md
%{cargo_registry}/%{crate}-%{version}/
%exclude %{cargo_registry}/%{crate}-%{version}/{codecov.yaml,Makefile,scripts}
%changelog
* Mon Sep 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.1.0-1
- Initial package