Name:           fribidi
Version:        1.0.5
Release:        4
Summary:        Library implementing the Unicode Bidirectional Algorithm
License:        LGPLv2+ and UCD
URL:            https://github.com/fribidi/fribidi/
Source:         https://github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.bz2

BuildRequires:  gcc automake autoconf libtool
Patch6000       CVE-2019-18397.patch

%description
A library to handle bidirectional scripts (for example Hebrew, Arabic),
so that the display is done in the proper way; while the text data itself
is always written in logical order and display in a different direction .

%package        devel
Summary:        Libraries and include files for FriBidi
Requires:       %{name}%{?_isa} = %{version}-%{release}

%description    devel
Include files and libraries needed for developing applications which use FriBidi under some area

%prep
%autosetup -n %{name}-%{version} -p1
autoreconf -i

%build
%configure --disable-static --disable-docs
%make_build

%check
make check

%install
%make_install
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la

%post -p /sbin/ldconfig

%postun  -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc README AUTHORS ChangeLog THANKS NEWS TODO
%license COPYING
%{_bindir}/fribidi
%{_libdir}/libfribidi.so.0*

%files devel
%{_includedir}/fribidi
%{_libdir}/libfribidi.so
%{_libdir}/pkgconfig/*.pc
%{_mandir}/man3/*.gz

%changelog
* Sun Jan 12 2020 zhangrui <zhangrui182@huawei.com> - 1.0.5-4
- fix CVE-2019-18397

* Fri Jan 10 2020 zhangrui <zhangrui182@huawei.com> - 1.0.5-3
- Remove unnecessary patch

* Wed Sep 11 2019 openEuler jimmy<dukaitian@huawei.com> - 1.0.5-2
- Package init jimmy
