File podofo.spec of Package podofo
#
# spec file for package podofo
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define libver 0_9_1
Name: podofo
Version: 0.9.1
Release: 0
Summary: Tools to work with PDF files
License: GPL-2.0+
Group: Productivity/Publishing/PDF
Url: http://podofo.sourceforge.net/
# http://downloads.sourceforge.net/podofo/podofo-0.9.1.tar.gz
Source0: %{name}-%{version}.tar.bz2
# PATCH-FIX-OPENSUSE podofobox.1_fix.patch asterios.dramis@gmail.com -- Fix "manual-page-warning" rpmlint warning
Patch0: podofobox.1_fix.patch
BuildRequires: cmake >= 2.5
BuildRequires: fontconfig-devel
BuildRequires: freetype2-devel
BuildRequires: gcc-c++
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libtiff-devel
%if 0%{?suse_version} > 1210
BuildRequires: lua51-devel
%else
BuildRequires: lua-devel
%endif
BuildRequires: openssl-devel
BuildRequires: zlib-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Command line tools for working with PDF files.
%package -n libpodofo%{libver}
Summary: PDF parsing and creation library
License: LGPL-2.1+
Group: System/Libraries
%description -n libpodofo%{libver}
A cross platform PDF parsing and creation library.
%package -n libpodofo-devel
Summary: Development files for podofo
License: LGPL-2.1+
Group: Development/Libraries/Other
Requires: libpodofo%{libver} = %{version}
%description -n libpodofo-devel
This package contains development files for podofo library.
%prep
%setup -q
%patch0
%build
export CFLAGS="%{optflags} -fno-strict-aliasing"
export CXXFLAGS="$CFLAGS"
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} -DPODOFO_BUILD_STATIC=FALSE -DPODOFO_USE_VISIBILITY=1 \
%if "%{_lib}" == "lib64"
-DWANT_LIB64=1 \
%endif
../
make %{?_smp_mflags}
cd ..
%install
pushd build
%make_install
popd
%post -n libpodofo%{libver} -p /sbin/ldconfig
%postun -n libpodofo%{libver} -p /sbin/ldconfig
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING README.html
%{_bindir}/*
%doc %{_mandir}/man1/podofo*.1%{ext_man}
%files -n libpodofo%{libver}
%defattr(-,root,root,-)
%{_libdir}/libpodofo.so.%{version}
%files -n libpodofo-devel
%defattr(-,root,root,-)
%doc AUTHORS COPYING.LIB ChangeLog FAQ.html README.html TODO
%{_includedir}/podofo/
%{_libdir}/libpodofo.so
%changelog