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

%global crate onig_sys

Name:           rust-%{crate}
Version:        69.1.0
Release:        3%{?dist}
Summary:        Raw rust bindings to the oniguruma library

# Upstream license specification: MIT
# * Since we bundle oniguruma for time being, it is BSD
License:        MIT and BSD
URL:            https://crates.io/crates/onig_sys
Source:         %{crates_source}
# Use system onig by default
# * This is utterly broken with 6.9.2, https://github.com/rust-onig/rust-onig/issues/103
#Patch0:         rust-onig_sys-use-system-onig.diff

ExclusiveArch:  %{rust_arches}
%if %{__cargo_skip_build}
BuildArch:      noarch
%endif

BuildRequires:  rust-packaging

%global _description %{expand:
`onig_sys` crate contains raw rust bindings to the oniguruma library. This
crate exposes a set of unsafe functions which can then be used by other crates
to create safe wrappers around Oniguruma.
You probably don't want to link to
this crate directly; instead check out the `onig` crate.}

%description %{_description}

%package        devel
Summary:        %{summary}
BuildArch:      noarch
#Requires:       pkgconfig(oniguruma) >= 6.8.0
Provides:       bundled(oniguruma) = 6.9.1

%description    devel %{_description}

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

%files          devel
%license LICENSE.md
%{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

%package     -n %{name}+posix-api-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+posix-api-devel %{_description}

This package contains library source intended for building other packages
which use "posix-api" feature of "%{crate}" crate.

%files       -n %{name}+posix-api-devel
%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml

%package     -n %{name}+print-debug-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+print-debug-devel %{_description}

This package contains library source intended for building other packages
which use "print-debug" feature of "%{crate}" crate.

%files       -n %{name}+print-debug-devel
%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml

%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
#rm -vrf oniguruma/
find oniguruma/ -type f -executable -exec chmod -x {} \+
%cargo_prep

%generate_buildrequires
%cargo_generate_buildrequires
#echo 'pkgconfig(oniguruma) >= 6.8.0'

%build
%cargo_build

%install
%cargo_install

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

%changelog
* Sun Jun 23 00:12:31 CEST 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 69.1.0-3
- Regenerate

* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 69.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Sat Jan 12 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 69.1.0-1
- Update to 69.1.0

* Sat Nov 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 69.0.0-2
- Adapt to new packaging

* Sat Sep 08 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 69.0.0-1
- Update to 69.0.0

* Wed Sep 05 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 68.2.1-1
- Update to 68.2.1

* Mon Sep 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 68.2.0-1
- Initial package