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

198 lines
5.9 KiB
RPMSpec
Raw Normal View History

#
# spec file for package scribus
#
# Copyright (c) 2017 SUSE LINUX 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.6
Release: 0
Summary: Open Source Page Layout and Desktop Publishing (DTP)
License: GPL-2.0+
Group: Productivity/Publishing/Other
Url: http://www.scribus.net/
Source0: http://sourceforge.net/projects/%{name}/files/%{name}/%{version}/%{name}-%{version}.tar.xz
Source1: %{name}-icon24.png
Source2: %{name}-icon32.png
Source3: %{name}-icon64.png
Source4: %{name}-icon128.png
Source5: %{name}-icon256.png
Source6: %{name}.appdata.xml
# PATCH-FIX-OPENSUSE
Patch: hunspell-1.6.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} > 1325
BuildRequires: libboost_headers-devel
%else
BuildRequires: boost-devel
%endif
BuildRequires: cairo-devel
BuildRequires: cmake >= 2.6.0
BuildRequires: cups-devel
BuildRequires: fdupes
BuildRequires: fontconfig-devel
BuildRequires: hicolor-icon-theme
BuildRequires: hunspell-devel
BuildRequires: liblcms2-devel
BuildRequires: libpodofo-devel
BuildRequires: libqt4-devel >= 4.6.0
BuildRequires: libtiff-devel
BuildRequires: libxml2-devel
BuildRequires: openssl-devel
BuildRequires: pkgconfig
BuildRequires: python-devel
BuildRequires: shared-mime-info
BuildRequires: update-desktop-files
##BuildRequires: libMagick++-devel
%if 0%{?suse_version}
Requires: ghostscript-library
Requires: python-imaging
Requires: tk
Suggests: AdobeICCProfiles
Suggests: Uniconvertor
%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
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 scribus. It is most useful
for developing scribus plugins.
%prep
%setup -q
%patch -p1
Accepting request 235762 from home:mrdocs:branches:KDE:Extra - Update to 1.4.4 - Drop python-version.diff it is upstream. + PDF/X-1a export. + The Barcode plug-in has been updated to reflect the latest changes in the underlying Barcode Writer in Pure PostScript (BWIPP). + The Autoquote script has been rewritten and enhanced. It now provides more options and adds thin spaces to French texts where appropriate. + A script to align images in frames has been added. + Full support of the OpenICC Directory Proposal (http://www.oyranos.org/wiki/index.php?title=OpenIccDirectoryProposal). + The handling of transparencies in Photoshop-generated TIFF files has been improved. + Page borders can now act as guides (and thus be used for snapping of items). + The CMYK color palette created by the Newspaper Association of America (NAA) for newspaper advertisements has been integrated into Scribus. + A new color palette for professional geographers has been added. + Export to various bitmap formats has been re-enabled on Mac OS X. + Several issues related to the user interface and canvas display have been resolved. + Adjustments for Windows 8.x. + An issue with the spellchecker, resulting in a crash, has been resolved. + Documentation and translation updates and improvements. +For a complete list of changes see: http://bugs.scribus.net/view_all_bug_page.php?filter=99610 and http://lists.scribus.net/pipermail/scribus-commit. OBS-URL: https://build.opensuse.org/request/show/235762 OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/scribus?expand=0&rev=4
2014-05-31 21:33:36 +02:00
%build
# Delete non-free colour swatches (bnc#763586)
rm resources/swatches/givelife_colors_license.rtf
rm resources/swatches/GiveLife_Color_System*.xml
# All .eps swatches come with the same non-free license by dtp studio Oldenburg.
rm resources/swatches/*.eps
rm resources/swatches/dtp-studio-free-palettes-license.rtf
export CXXFLAGS="%{optflags} -fno-strict-aliasing"
export CFLAGS="$CXXFLAGS -fno-strict-aliasing"
mkdir build
pushd build
cmake \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
%if "%{_lib}" == "lib64"
-DWANT_LIB64=1 \
%endif
-DWANT_CAIRO=1 \
-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE \
-DCMAKE_SKIP_RPATH=TRUE \
-DWANT_HUNSPELL=1 \
../
make %{_smp_mflags}
%install
pushd build
make install DESTDIR=%{buildroot}
popd
# install hi-res icons for better appearance on gnome-shell
install -D -m 0644 %{S:1} %{buildroot}%{_datadir}/icons/hicolor/24x24/apps/%{name}.png
install -D -m 0644 %{S:2} %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
install -D -m 0644 %{S:3} %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/%{name}.png
install -D -m 0644 %{S:4} %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/%{name}.png
install -D -m 0644 %{S:5} %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/%{name}.png
%if 0%{?suse_version}
%suse_update_desktop_file -r -i %{name} Qt Office Publishing WordProcessor
# hi-res icons are already installed in hicolor-icon-theme directory
# mkdir %{buildroot}%{_datadir}/pixmaps
# install -m 644 %{buildroot}%{_datadir}/%{name}/icons/%{name}.png %{buildroot}%{_datadir}/pixmaps/
%endif
%fdupes -s %{buildroot}%{_includedir}/%{name}/
%fdupes -s %{buildroot}%{_datadir}
%if 0%{?suse_version}
%suse_update_desktop_file -i %{buildroot}%{_datadir}/mimelnk/application/vnd.scribus.desktop Office WordProcessor
%endif
# INSTALL APPSTREAM METAINFO (SOURCE6)
install -Dm0644 %{S:6} %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml
#update the mime database
%post
%mime_database_post
%desktop_database_post
%icon_theme_cache_post
%postun
%mime_database_postun
%desktop_database_postun
%icon_theme_cache_postun
%files
%defattr(-,root,root)
%{_bindir}/scribus
%{_mandir}/man?/*.*
%{_mandir}/*/man?/*.*
%{_libdir}/scribus
%{_datadir}/mime/packages/scribus.xml
%{_datadir}/scribus
%{_datadir}/doc/scribus
%{_datadir}/applications/%{name}.desktop
#%%{_datadir}/pixmaps/%%{name}.png
# 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}/icons/hicolor/*/apps/%{name}.png
%dir %{_datadir}/appdata
%{_datadir}/appdata/%{name}.appdata.xml
%files devel
%defattr(-,root,root)
%{_includedir}/scribus
%changelog