LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File scribus.spec of Package scribus (Project home:ftake:scribus:CTL)

#
# spec file for package scribus
#
# Copyright (c) Peter Linnell and 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

Name:           scribus
Version:        1.5.1.svn
Release:        0
License:        GPL-2.0
Summary:        Open Source Page Layout and Desktop Publishing (DTP)
Url:            http://www.scribus.net/
Group:          Productivity/Publishing/Other
Source:         %{name}-%{version}.tar.xz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

# FIXME: How are the Qt5 packages called for != openSUSE ?
%if 0%{?fedora_version}
BuildRequires:  aspell-devel
BuildRequires:  boost-devel
BuildRequires:  cairo-devel
BuildRequires:  cmake >= 2.6.0
BuildRequires:  cups
BuildRequires:  cups-devel
BuildRequires:  fontconfig-devel
BuildRequires:  gcc-c++
BuildRequires:  lcms-devel >= 1.12
BuildRequires:  libQtWebKit-devel
BuildRequires:  libpodofo-devel
BuildRequires:  libstdc++-devel
BuildRequires:  libtiff-devel
BuildRequires:  libxml2-devel
BuildRequires:  openssl-devel
BuildRequires:  pkgconfig
BuildRequires:  python-devel
BuildRequires:  qt4-devel >= 4.6.0
BuildRequires:  shared-mime-info
%endif

%if 0%{?rhel_version}
BuildRequires:  aspell-devel
BuildRequires:  boost-devel
BuildRequires:  cairo-devel
BuildRequires:  cmake >= 2.6.0
BuildRequires:  cups
BuildRequires:  cups-devel
BuildRequires:  desktop-file-utils
BuildRequires:  fontconfig-devel
BuildRequires:  gcc-c++
BuildRequires:  lcms-devel >= 1.12
BuildRequires:  libQtWebKit-devel
BuildRequires:  libpodofo-devel
BuildRequires:  libstdc++-devel
BuildRequires:  libtiff-devel
BuildRequires:  libxml2-devel
BuildRequires:  openssl-devel
BuildRequires:  pkgconfig
BuildRequires:  python-devel
BuildRequires:  qt4-devel >= 4.6.0
BuildRequires:  shared-mime-info
%endif

%if 0%{?centos_version}
BuildRequires:  aspell-devel
BuildRequires:  boost-devel
BuildRequires:  cairo-devel
BuildRequires:  cmake >= 2.6.0
BuildRequires:  cups
BuildRequires:  cups-devel
BuildRequires:  desktop-file-utils
BuildRequires:  fontconfig-devel
BuildRequires:  gcc-c++
BuildRequires:  lcms-devel >= 1.12
BuildRequires:  libpodofo-devel
BuildRequires:  libstdc++-devel
BuildRequires:  libtiff-devel
BuildRequires:  libxml2-devel
BuildRequires:  openssl-devel
BuildRequires:  pkgconfig
BuildRequires:  python-devel
BuildRequires:  qt4-devel >= 4.6.0
BuildRequires:  shared-mime-info
%endif

%if 0%{?suse_version}
BuildRequires:  aspell-devel
BuildRequires:  boost-devel
BuildRequires:  cairo-devel
BuildRequires:  cmake >= 2.6.0
BuildRequires:  cups-devel
BuildRequires:  fdupes
BuildRequires:  fontconfig-devel
BuildRequires:  harfbuzz-devel
BuildRequires:  hunspell-devel
BuildRequires:  libGraphicsMagick++-devel
BuildRequires:  libQt5WebKit5-devel
BuildRequires:  libQt5WebKitWidgets-devel
BuildRequires:  libQt5XmlPatterns-devel
BuildRequires:  liblcms2-devel
BuildRequires:  libpixman-1-0-devel
BuildRequires:  libpodofo-devel
BuildRequires:  libpoppler-devel
BuildRequires:  libqt5-qtbase-devel
BuildRequires:  libqt5-qttools-devel
BuildRequires:  librevenge-devel
BuildRequires:  libtiff-devel
BuildRequires:  libxml2-devel
BuildRequires:  openssl-devel
BuildRequires:  p7zip
BuildRequires:  pkgconfig
BuildRequires:  python-devel
BuildRequires:  shared-mime-info
BuildRequires:  update-desktop-files
BuildRequires:  libjpeg-devel
%endif

%if 0%{?mandriva_version}
BuildRequires:  aspell-devel
BuildRequires:  boost-devel
BuildRequires:  cmake >= 2.6.0
BuildRequires:  cups-devel
BuildRequires:  desktop-file-utils
BuildRequires:  jpeg-devel
BuildRequires:  lcms-devel >= 1.12
BuildRequires:  libcairo-devel
BuildRequires:  libfontconfig-devel
BuildRequires:  libpodofo-devel
BuildRequires:  libxml2-devel
BuildRequires:  pkgconfig
BuildRequires:  png-devel
BuildRequires:  python-devel
BuildRequires:  qt4-devel >= 4.6.0
BuildRequires:  tiff-devel
%endif

%if 0%{?suse_version}
Requires:       ghostscript-library
Requires:       python-imaging
Requires:       tk
Suggests:       AdobeICCProfiles
Suggests:       uniconvertor
%endif

%if 0%{?fedora_version}
Requires:       ghostscript
Requires:       python-imaging
%endif

%if 0%{?rhel_version}
Requires:       ghostscript
Requires:       python-imaging
%endif

%if 0%{?centos_version}
Requires:       ghostscript
Requires:       python-imaging
%endif

%description
Scribus is a open source page layout program which
produces commercial grade output in PDF and Postscript, primarily,
though not exclusively, for Linux.

While the goals of the program are ease of use and simple
easy-to-understand tools, Scribus support for professional
publishing features, such as CMYK and spot colors, easy PDF creation,
Encapsulated Postscript import and export and creation of color
separations.

%package devel
Summary:        Open Source Page Layout / Desktop Publishing (DTP)
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}
Requires:       freetype2-devel
Requires:       glibc-devel
Requires:       libstdc++-devel
Requires:       zlib-devel

%description devel
This package provides the development headers for %{name}. It is most useful
for developing plugins for %{name}.

%define prefix   /usr

%prep

%setup -q

%build

%if 0%{?mandriva_version}
export PATH=/usr/lib/qt4/bin:$PATH
export QTDIR=%{_prefix}/lib/qt4/
%endif

export CXXFLAGS="%{optflags} -fno-strict-aliasing"
export CFLAGS="$CXXFLAGS -fno-strict-aliasing"

%if 0%{?suse_version} > 1310
unset SUSE_ASNEEDED
%endif

mkdir build
cd build

cmake -DCMAKE_INSTALL_PREFIX=%prefix ../ -DWANT_SYSTEM_CAIRO=1 \
-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE -DCMAKE_SKIP_RPATH=TRUE \
-DWANT_HUNSPELL=1 -DWANT_GRAPHICSMAGICK=1 

%ifarch x86_64 ppc64 s390x mips64 sparc64
cmake -DWANT_LIB64=1 DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} ../  -DWANT_SYSTEM_CAIRO=1 \
-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE -DCMAKE_SKIP_RPATH=TRUE
%endif

make %{?_smp_mflags}

%install

cd build
make install \
DESTDIR=%{buildroot}

mkdir -p %{buildroot}%{_datadir}/doc/packages/scribus
%if 0%{?suse_version}

cd ..

# install app icons for scribus.desktop
for size in 16x16 32x32 128x128 256x256 512x512 1024x1024
do
  install -d -m 755 %{buildroot}%{_datadir}/icons/hicolor/$size/apps/
  install -m 644 resources/iconsets/artwork/icon_$size.png \
                 %{buildroot}%{_datadir}/icons/hicolor/$size/apps/scribus.png
done

install -d 755 %{buildroot}%{_datadir}/applications/
install -m 644 scribus.desktop %{buildroot}%{_datadir}/applications/
%suse_update_desktop_file -r scribus Office WordProcessor
%suse_update_desktop_file -i %{buildroot}%{_datadir}/mimelnk/application/vnd.scribus.desktop Office WordProcessor

%fdupes -s %{buildroot}%{_datadir}/doc/scribus
%endif

#update the mime database
%post
umask 022
if [ -f /usr/bin/update-mime-database ]; then
  /usr/bin/update-mime-database /usr/share/mime > /dev/null
fi

%postun
umask 022
if [ -f /usr/bin/update-mime-database ]; then
  /usr/bin/update-mime-database /usr/share/mime > /dev/null
fi

%files
%defattr(-, root, root)
%doc %{_datadir}/doc/packages/scribus
%dir %{_datadir}/mimelnk
%dir %{_datadir}/mimelnk/application
# This should be owned by filesystem or man, but there are only scribus files:
%lang(pl) %dir %{_mandir}/pl
%lang(pl) %dir %{_mandir}/pl/man1
%{_bindir}/scribus
%dir %{_datadir}/appdata
%{_datadir}/appdata/scribus.appdata.xml
%{_datadir}/applications/scribus.desktop
%{_datadir}/doc/scribus/
%{_datadir}/icons/hicolor/
%{_datadir}/mime/packages/scribus.xml
%{_datadir}/mimelnk/application/vnd.scribus.desktop
%{_datadir}/scribus/
%{_libdir}/scribus/
%{_mandir}/*/man?/*.*
%{_mandir}/man?/*.*

%changelog -n scribus