File scribus.spec of Package scribus
#
# spec file for package scribus (Version 1.3.3.14)
#
# 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/
Name: scribus-qt3
BuildRequires: cairo-devel cups cups-devel python-devel shared-mime-info
BuildRequires: fontconfig-devel libtiff-devel libxml2-devel openssl-devel
BuildRequires: gcc-c++ pkgconfig qt3-devel liblcms-devel
BuildRequires: cmake fdupes update-desktop-files
License: GPL-2.0+
Group: Productivity/Publishing/Other
Recommends: tk python-imaging
Suggests: AdobeICCProfiles
Provides: scribus-short-words
Obsoletes: scribus-i18n-de scribus-i18n-en scribus-i18n-fr scribus-short-words
Version: 1.3.3.14
Release: 1
%define tar_version %version
Source: scribus-%{tar_version}.tar.bz2
Source1: vnd.scribus.desktop
Source2: scribus.desktop
#Patch1: fix-implicit.patch
Patch3: scribus-1.3.3.10-doc-path.diff
Url: http://www.scribus.net/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: Open Source Page Layout and Desktop Publishing (DTP)
Provides: scribus = %{version}
%description
Scribus is a desktop open source page layout program with the aim of
producing commercial grade output in PDF and Postscript. It is
primarily, though not exclusively, designed for Linux.
While the goals of the program are ease of use and user-friendly
tools, Scribus offers support for the following professional
publishing features: * CMYK colors
* Easy PDF creation
* Encapsulated Postscript import and export
* Creation of color separations.
%prep
%setup -q -n scribus-%tar_version
#%patch1
%patch -P 3
%if %suse_version >= 1210
sed -i 1i\ '#include <cups/ppd.h>' scribus/cupsoptions.cpp
sed -i 1i\ '#include <cups/ppd.h>' scribus/printerutil.cpp
sed -i 1i\ '#include <gdk-pixbuf-xlibrgb.h>' scribus/pixbuf/gdk-pixbuf-xlib.c
%endif
sed -i 's|return false|return 0|g' scribus/scribusdoc.cpp
#sed -i 's|LCMS |LCMS2 |g' CMakeLists.txt
%build
mkdir build
cd build
export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -Wl,--add-needed -Wno-incompatible-pointer-types"
export CFLAGS="$CXXFLAGS -fno-strict-aliasing -Wl,--add-needed"
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE \
-DCMAKE_SKIP_RPATH=TRUE -DDOCDIR=%{_docdir} -DLIB_INSTALL_DIR=%{_libdir} \
-DLIB_SUFFIX=$(echo %_lib | cut -b4-) -DWANT_CAIRO=1 ..
make VERBOSE=1
%install
cd build
%makeinstall
cd ..
mkdir -p $RPM_BUILD_ROOT%{_docdir}/scribus
install -m 644 -D $RPM_BUILD_ROOT/usr/share/scribus/icons/scribus.png $RPM_BUILD_ROOT/usr/share/icons/hicolor/48x48/apps/scribus.png
rm -rf $RPM_BUILD_ROOT/usr/share/mimelnk
install -m 644 -D %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/applications/vnd.scribus.desktop
%suse_update_desktop_file -r vnd.scribus Office WordProcessor
install -m 644 -D scribus.xml $RPM_BUILD_ROOT%{_datadir}/mime/packages/scribus.xml
%post
if [ -f /usr/bin/update-mime-database ]; then
/usr/bin/update-mime-database /usr/share/mime > /dev/null
fi
%postun
if [ -f /usr/bin/update-mime-database ]; then
/usr/bin/update-mime-database /usr/share/mime > /dev/null
fi
%files
%defattr(-, root, root)
%doc %_defaultdocdir/scribus
%{_bindir}/*
/usr/share/applications/vnd*.desktop
/usr/share/man/man?/*.*
/usr/share/man/*/man?/*.*
%{_libdir}/scribus
%{_prefix}/share/mime/packages/*.xml
%{_prefix}/share/scribus
/usr/share/icons/hicolor/48x48/apps/scribus.png
%dir /usr/share/man/pl
%dir /usr/share/man/pl/man1
%dir /usr/share/icons/hicolor
%dir /usr/share/icons/hicolor/48x48
%dir /usr/share/icons/hicolor/48x48/apps
%changelog