%define srcname	onig
%global ver	6.9.7
%global rev	1

Summary:	Oniguruma - A regular expressions library
Summary(ja):	鬼車 - 正規表現ライブラリ
Name:		oniguruma
Version:	%{ver}%{?rev:.}%{?rev}
Release:	1%{?_dist_release}
Vendor:		Project Vine
Distribution:	Vine Linux

License:	BSD
Group:		system
URL:		https://github.com/kkos/oniguruma
Source0:	https://github.com/kkos/oniguruma/releases/download/v%{ver}%{?rev:.}%{?rev}/%{srcname}-%{ver}%{?rev:.}%{?rev}.tar.gz

BuildRoot:	%{_tmppath}/%{name}-%{version}-root

%description
Oniguruma is a regular expressions library.
The characteristics of this library is that different character encoding
for every regular expression object can be specified.

%description -l ja
鬼車は正規表現ライブラリです。
このライブラリの特長は、それぞれの正規表現オブジェクトごとに
異なる文字エンコーディングを指定できることです。


%package devel
Summary:	Libraries/include files for Oniguruma
Summary(ja):	鬼車の開発用ファイル
Group:		programming
Requires:	%{name} = %{version}-%{release}

%description devel
Oniguruma is a regular expressions library.
The characteristics of this library is that different character encoding
for every regular expression object can be specified.

This package contains the libraries and includes files necessary to develop
applications with Oniguruma.

%description -l ja devel
鬼車は正規表現ライブラリです。
このライブラリの特長は、それぞれの正規表現オブジェクトごとに
異なる文字エンコーディングを指定できることです。

このパッケージには、鬼車を使ったアプリケーションの開発に必要な
ライブラリ及びヘッダファイルが含まれています。


%debug_package


%prep
%autosetup -p1 -n %{srcname}-%{ver}


%build
%configure \
	--enable-posix-api \
	--disable-silent-rules \
	--disable-static

%__make %{?_smp_mflags}


%install
%__rm -rf %{buildroot}
%makeinstall

# remove unneeded files
%__rm -f %{buildroot}%{_libdir}/libonig.a
%__rm -f %{buildroot}%{_libdir}/libonig.la


%clean
%__rm -rf %{buildroot}


%files
%defattr(-,root,root,-)
%license COPYING
%doc AUTHORS HISTORY README README.ja
%{_libdir}/libonig.so.*

%files devel
%defattr(-,root,root)
%doc doc/*
%{_bindir}/onig-config
%{_libdir}/pkgconfig/oniguruma.pc
%{_libdir}/libonig.so
%{_includedir}/onig*.h


%changelog
* Tue Aug 17 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 6.9.7.1-1
- new upstream release.
- dropped Patch1000: fixed in upstream.

* Wed Oct 14 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 6.9.5.rev1-3
- imported Patch1000 from upstream to fix CVE-2020-26159.

* Fri Aug 21 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 6.9.5.rev1-2
- enabled POSIX API.

* Fri Aug 21 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 6.9.5.rev1-1
- new upstream release.

* Wed Dec 04 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 6.9.4-1
- new upstream release.

* Sat Sep 14 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 6.9.3-1
- new upstream release.

* Wed Nov 18 2015 Toshiharu Kudoh <toshi.kd2@gmail.com> 5.9.6-1
- new upstream release
- changed %%URL, %%Source0

* Sun Jan 26 2014 IWAI, Masaharu <iwaim.sub@gmail.com> 5.9.5-1
- update to 5.9.5
- add pkgconfig file in devel package

* Sat Jan 05 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> 5.9.3-1
- new upstream release

* Thu Apr 14 2011 IWAI, Masaharu <iwai@alib.jp> 5.9.2-2
- rebuild on current VineSeed

* Tue Jan 12 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> 5.9.2-1
- new upstream release

* Thu Mar 19 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> 5.9.1-1vl5
- new upstream release
- fixed remove unneeded files (added "delete libonig.la")

* Tue Aug 19 2008 Shu KONNO <owa@bg.wakwak.com> 4.7.1-1vl5
- applied new versioning policy, spec in utf-8
- dropt lib*.la

* Tue Sep 04 2007 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 4.7.1-0vl1
- new upstream release

* Fri Mar 09 2007 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 4.6.1-0vl1
- new upstream release

* Wed Dec 20 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 4.5.1-0vl1
- new upstream release

* Thu Nov 02 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 4.4.6-0vl1
- new upstream release

* Fri Sep 22 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 4.4.4-0vl1
- new upstream release

* Wed Aug 30 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 4.4.1-0vl1
- new upstream release

* Mon Aug 21 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 4.3.0-0vl1
- new upstream release
- fix typo

* Mon Aug 07 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 4.2.2-0vl2
- fix typo

* Fri Aug 04 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 4.2.2-0vl1
- initial build
