+#
+# Conditional build:
+%bcond_with cairo # enable Cairo backend
+#
Summary: PDF rendering library
+Summary(pl): Biblioteka renderuj±ca PDF
Name: poppler
Version: 0.1.1
Release: 0.1
-License: LGPL
+License: GPL
Group: Libraries
Source0: http://poppler.freedesktop.org/%{name}-%{version}.tar.gz
# Source0-md5: d10982c93a1ccee79a14bb277f94990a
URL: http://poppler.freedesktop.org/
+%{?with_cairo:BuildRequires: cairo-devel >= 0.3.0}
+BuildRequires: fontconfig-devel
+BuildRequires: freetype-devel >= 2.0
+BuildRequires: libstdc++-devel
+BuildRequires: pkgconfig
+%{?with_cairo:Requires: cairo >= 0.3.0}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
-A common PDF rendering library for integrating PDF viewing into desktop
-applications (based on the xpdf-3.0 code base).
+A common PDF rendering library for integrating PDF viewing into
+desktop applications (based on the xpdf-3.0 code base).
+
+%description -l pl
+Wspólna biblioteka renderuj±ca PDF do integrowania ogl±dania PDF w
+aplikacjach desktopowych (oparta na kodzie xpdf-3.0).
%package devel
-Summary: Poppler header files and development documentation
+Summary: Poppler header files
+Summary(pl): Pliki nag³ówkowe biblioteki Poppler
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
+%{?with_cairo:Requires: cairo-devel >= 0.3.0}
+Requires: fontconfig-devel
+Requires: freetype-devel >= 2.0
+Requires: libstdc++-devel
%description devel
-Header files and development documentation for the Poppler library.
+Header files for the Poppler library.
+
+%description devel -l pl
+Pliki nag³ówkowe biblioteki Poppler.
%package static
Summary: Poppler static libraries
+Summary(pl): Statyczne biblioteki Poppler
Group: Development/Libraries
Requires: %{name}-devel = %{version}-%{release}
%description static
Poppler static libraries.
+%description static -l pl
+Statyczne biblioteki Poppler.
+
%prep
%setup -q
%build
-%configure --disable-cairo-output
+%configure \
+ %{!?with_cairo:--disable-cairo-output}
%{__make}
%install
%clean
rm -rf $RPM_BUILD_ROOT
-%post -p /sbin/ldconfig
-%postun -p /sbin/ldconfig
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
%files
%defattr(644,root,root,755)