File podofo.spec of Package podofo

#
# spec file for package podofo (Version 0.8.4)
#
# Copyright (c) 2010 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 prefix   /usr
%define libver 0_8_4

Name:           podofo
Version:        0.8.4
Release:        1
License:        LGPLv2.1
Summary:        PDF parsing and creation library
Group:          Development/Libraries/Other
Source0:        %{name}-%{version}.tar.bz2
BuildRequires:  cmake >= 2.5
BuildRequires:  fontconfig-devel
BuildRequires:  freetype2-devel
BuildRequires:  gcc-c++
BuildRequires:  libjpeg-devel
BuildRequires:  libpng-devel
BuildRequires:  libtiff-devel
BuildRequires:  lua-devel
BuildRequires:  openssl-devel
BuildRequires:  zlib-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
A cross platform PDF parsing and creation library. Podofo also
includes some command line tools for working with PDF files.

Author: Dominik Seichter domseichter at  web dot de
and others.

%package -n   libpodofo%{libver}


License:        LGPLv2.1
Summary:        PDF parsing and creation library
Group:          Development/Libraries/Other

%description -n libpodofo%{libver}
A cross platform PDF parsing and creation library. Podofo also
includes some command line tools for working with PDF files.

%package -n libpodofo-devel
Summary:        Development files for podofo
Group:          Development/Libraries/Other
Requires:       libpodofo%{libver} = %{version}

License:        LGPLv2.1

%description -n libpodofo-devel
Developer package for podofo library A cross platform PDF
parsing and creation library.

%prep
%setup -q

%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

%ifarch x86_64 ppc64 s390x mips64 sparc64
cmake ../ -DWANT_LIB64=1 -DCMAKE_INSTALL_PREFIX=%prefix  -DPODOFO_BUILD_STATIC=FALSE -DPODOFO_USE_VISIBILITY=1
%endif

make %{?jobs:-j %jobs}

%install
#make install
pushd build
make -e DESTDIR=%{buildroot} install
popd

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-,root,root)
%{_bindir}/*

%files -n libpodofo%{libver}
%defattr(-,root,root)
%{_libdir}/libpodofo.so.*

%files -n libpodofo-devel
%defattr(-,root,root)
%{_includedir}/podofo
%{_libdir}/libpodofo.so

%post -n libpodofo%{libver} -p /sbin/ldconfig

%postun -n libpodofo%{libver} -p /sbin/ldconfig

%changelog
openSUSE Build Service is sponsored by