SHA256
1
0
forked from pool/scribus
scribus/scribus.spec

158 lines
4.4 KiB
RPMSpec
Raw Normal View History

#
# spec file for package scribus
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) Peter Linnell and 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
Version: 1.4.0.rc5
Release: 5
License: GPL
Summary: Open Source Page Layout and Desktop Publishing (DTP)
Url: http://www.scribus.net/
Group: Productivity/Publishing/Other
Source: %{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: aspell-devel
BuildRequires: boost-devel
BuildRequires: cmake >= 2.6.0
BuildRequires: cups-devel
BuildRequires: fontconfig-devel
BuildRequires: libQtWebKit-devel
BuildRequires: libpodofo-devel
BuildRequires: libqt4-devel >= 4.6.0
BuildRequires: python-devel
BuildRequires: shared-mime-info
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(cairo)
BuildRequires: pkgconfig(libxml-2.0)
%if 0%{?suse_version}
Requires: ghostscript-library
Requires: python-imaging
Requires: tk
Suggests: AdobeICCProfiles
%endif
Provides: scribus-templates > 1.2
Obsoletes: scribus-templates =< 1.2
%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
License: GPL
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}.
%prep
%setup -q
%build
export CXXFLAGS="%{optflags} -fno-strict-aliasing"
export CFLAGS="$CXXFLAGS -fno-strict-aliasing"
mkdir build
cd build
cmake \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
%if "%{_lib}" == "lib64"
-DWANT_LIB64=1 \
%endif
-DDOCDIR:PATH=%{_docdir} \
-DWANT_CAIRO=1 \
-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE \
-DCMAKE_SKIP_RPATH=TRUE \
../
make %{_smp_mflags}
%install
cd build
%make_install
mkdir -p %{buildroot}%{_datadir}/pixmaps
mkdir -p %{buildroot}%{_datadir}/applications
mkdir -p %{buildroot}%{_datadir}/doc/packages/scribus
ln -s %{buildroot}%{_datadir}/scribus/icons/scribus.png %{buildroot}%{_datadir}/pixmaps/scribus.png
ln -s %{buildroot}%{_datadir}/mimelnk/application/vnd.scribus.desktop %{buildroot}%{_datadir}/applications/vnd.scribus.desktop
%if 0%{?suse_version}
%suse_update_desktop_file -i %{buildroot}%{_datadir}/mimelnk/application/vnd.scribus.desktop Office WordProcessor
%endif
%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
%clean
rm -rf %{buildroot}
%files
%defattr(-, root, root)
%{_docdir}/scribus
%{_bindir}/scribus
%{_mandir}/man?/*.*
%{_mandir}/*/man?/*.*
%{_libdir}/scribus
%{_datadir}/mime/packages/scribus.xml
%{_datadir}/scribus
%doc %{_datadir}/doc/scribus
# This should be owned by filesystem or man, but there are only scribus files:
%lang(pl) %dir %{_mandir}/pl
%lang(pl) %{_mandir}/pl/man1
%dir %{_datadir}/mimelnk
%dir %{_datadir}/mimelnk/application
%{_datadir}/mimelnk/application/vnd.scribus.desktop
%{_datadir}/applications/vnd.scribus.desktop
%{_datadir}/pixmaps/scribus.png
%files devel
%defattr(-, root, root)
%{_includedir}/scribus
%changelog