-Summary: Library implementing the Unicode BiDi algorithm
-Summary(pl.UTF-8): Biblioteka implementująca algorytm Unicode BiDi
+#
+# Conditional build:
+%bcond_without glib # Glib usage
+%bcond_without static_libs # static library
+#
+Summary: GNU FriBidi - library implementing the Unicode BiDi algorithm
+Summary(pl.UTF-8): GNU FriBidi - biblioteka implementująca algorytm Unicode BiDi
Name: fribidi
-Version: 0.10.9
+Version: 0.19.6
Release: 1
-License: LGPL
+License: LGPL v2.1+
Group: Libraries
-Source0: http://fribidi.org/download/%{name}-%{version}.tar.gz
-# Source0-md5: 647aee89079b056269ff0918dc1c6d28
+Source0: http://fribidi.org/download/%{name}-%{version}.tar.bz2
+# Source0-md5: ce93d862344991173dabb609bf93ca1d
+Patch0: format-security.patch
URL: http://fribidi.freedesktop.org/
-BuildRequires: autoconf
-BuildRequires: automake
-BuildRequires: libtool
+BuildRequires: autoconf >= 2.64
+BuildRequires: automake >= 1:1.11.1
+%{?with_glib:BuildRequires: glib2-devel >= 1:2.4}
+BuildRequires: libtool >= 2:2.2
+BuildRequires: pkgconfig
+%{?with_glib:Requires: glib2 >= 1:2.4}
Obsoletes: libfribidi0
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
-A Free Implementation of the Unicode BiDi algorithm.
+GNU FriBidi is a free Implementation of the Unicode BiDi algorithm.
%description -l pl.UTF-8
-Implementacja algorytmu Unicode BiDi.
+GNU FriBidi to wolnodostępna implementacja algorytmu Unicode BiDi.
%package devel
-Summary: Library implementing the Unicode BiDi algorithm
-Summary(pl.UTF-8): Implementacja algorytmu Unicode BiDi
+Summary: Header files for FriBidi library
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki FriBidi
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
+%{?with_glib:Requires: glib2-devel >= 1:2.4}
Obsoletes: libfribidi0-devel
%description devel
The fribidi-devel package includes header files for the fribidi
package.
-Install fribidi-devel if you want to develop programs which will use
-fribidi.
-
%description devel -l pl.UTF-8
-Pliki developerskie pozwalające na wykorzystywanie biblioteki fribidi
-w swoim oprogramowaniu.
+Pliki programistyczne pozwalające na wykorzystywanie biblioteki
+fribidi w swoim oprogramowaniu.
%package static
-Summary: Static %{name} libraries
-Summary(pl.UTF-8): Biblioteki statyczne %{name}
+Summary: Static FriBidi library
+Summary(pl.UTF-8): Biblioteka statyczna FriBidi
Group: Development/Libraries
Requires: %{name}-devel = %{version}-%{release}
%description static
-Static %{name} libraries.
+Static FriBidi library.
%description static -l pl.UTF-8
-Biblioteki statyczne %{name}.
+Biblioteka statyczna FriBidi.
%prep
%setup -q
+%patch0 -p1
%build
-rm -f missing acinclude.m4
%{__libtoolize}
%{__aclocal}
%{__autoheader}
%{__autoconf}
%{__automake}
-%configure
+%configure \
+ --disable-silent-rules \
+ %{?with_static_libs:--enable-static} \
+ --with-glib%{!?with_glib:=no}
+
%{__make}
%install
%doc AUTHORS ChangeLog NEWS README THANKS TODO
%attr(755,root,root) %{_bindir}/fribidi
%attr(755,root,root) %{_libdir}/libfribidi.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libfribidi.so.0
%files devel
%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/fribidi-config
-%attr(755,root,root) %{_libdir}/lib*.so
-%{_libdir}/lib*.la
+%attr(755,root,root) %{_libdir}/libfribidi.so
+%{_libdir}/libfribidi.la
%{_includedir}/fribidi
-%{_pkgconfigdir}/*.pc
+%{_pkgconfigdir}/fribidi.pc
+%{_mandir}/man3/fribidi_*.3*
+%if %{with static_libs}
%files static
%defattr(644,root,root,755)
-%{_libdir}/lib*.a
+%{_libdir}/libfribidi.a
+%endif