inkscape/inkscape.spec
Stephan Kulow 3b34c80380 Accepting request 125059 from GNOME:Apps
- yudit is in non-free now (due to openmotif requirement), so do
  not require it (forwarded request 125055 from dimstar)

OBS-URL: https://build.opensuse.org/request/show/125059
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/inkscape?expand=0&rev=60
2012-06-16 05:23:37 +00:00

285 lines
9.9 KiB
RPMSpec

#
# spec file for package inkscape
#
# Copyright (c) 2012 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: inkscape
Version: 0.48.3.1
Release: 0
Summary: Vector Illustration Program
License: GPL-2.0 ; LGPL-2.1
Group: Productivity/Graphics/Vector Editors
Url: http://www.inkscape.org/
Source: http://downloads.sourceforge.net/project/inkscape/inkscape/0.48.3.1/%{name}-%{version}.tar.bz2
# openSUSE palette file
Source1: openSUSE.gpl
Source2: inkscape-split-extensions-extra.sh
# PATCH-FEATURE-OPENSUSE inkscape-remove-datetime.patch vuntz@novell.com -- Do not put date/time in the compiled binary (needed for build-compare)
Patch0: inkscape-remove-datetime.patch
# PATCH-FIX-OPENSUSE inkscape-packages.patch sbrabec@suse.cz -- Suggest packages instead of compilation from source.
Patch1: inkscape-packages.patch
# PATCH-FIX-UPSTREAM inkscape-return-on-exit.patch bnc#758275 lp#993500 dimstar@opensuse.org -- Return non-zero on error.
Patch2: inkscape-return-on-exit.patch
# PATCH-FIX-UPSTREAM inkscape-poppler20.patch rh#822413 lp#1005565 badshah400@gmail.com -- Fix building with poppler 0.20.0
Patch3: inkscape-poppler20.patch
BuildRequires: boost-devel
BuildRequires: docbook-toys
BuildRequires: fdupes
BuildRequires: gc-devel
BuildRequires: gcc-c++
BuildRequires: gnome-vfs2-devel
BuildRequires: gsl-devel
BuildRequires: gtkmm24-devel
BuildRequires: intltool
BuildRequires: libMagick++-devel
BuildRequires: liblcms2-devel
BuildRequires: libpoppler-glib-devel
BuildRequires: libwpg-devel
BuildRequires: libxslt-devel
BuildRequires: perl
BuildRequires: popt-devel
BuildRequires: python-devel
BuildRequires: python-gtk-devel
BuildRequires: sgml-skel
BuildRequires: update-desktop-files
Requires: /usr/bin/gs
Requires: ghostscript-fonts-std
Requires: gzip
Requires: pstoedit
Requires: python-gtk
Recommends: %{name}-lang
Recommends: python-lxml
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Inkscape is a vector illustration program for the GNOME desktop.
%package extensions-extra
Summary: Vector Illustration Program - Extra Extensions
Group: Productivity/Graphics/Vector Editors
Requires: %{name} = %{version}
Requires: python-lxml
Requires: python-xml
# for cdr and wmf modules
Recommends: yudit
# python-xml is already likely installed, so the big dependency is python-lxml. Hence this supplements.
Supplements: packageand(%{name}:python-lxml)
# Package in openSUSE <= 11.0 and SLED <= 10
Provides: %{name}:%{_datadir}/inkscape/extensions/inkex.py
Enhances: %{name}
%description extensions-extra
Extra extensions for Inkscape. Recommended for everybody who wants to
use Inkscape.
Inkscape is a vector illustration program for the GNOME desktop.
%package extensions-dia
Summary: Vector Illustration Program - Dia Import Extension
Group: Productivity/Graphics/Vector Editors
Requires: %{name} = %{version}
Requires: dia
Supplements: packageand(%{name}:dia)
# Package in openSUSE <= 11.0 and SLED <= 10
Provides: %{name}:%{_datadir}/inkscape/extensions/dia.inx
Enhances: %{name}
%description extensions-dia
Dia import extension for Inkscape.
Inkscape is a vector illustration program for the GNOME desktop.
%package extensions-fig
Summary: Vector Illustration Program - Fig Import Extension
Group: Productivity/Graphics/Vector Editors
Requires: %{name} = %{version}
Requires: transfig
Supplements: packageand(%{name}:transfig)
# Package in openSUSE <= 11.0 and SLED <= 10
Provides: %{name}:%{_datadir}/inkscape/extensions/fig_input.inx
Enhances: %{name}
%description extensions-fig
Fig family (XFig, Figurine, JFig, WinFig,...) import extension for
Inkscape.
Inkscape is a vector illustration program for the GNOME desktop.
%package extensions-gimp
Summary: Vector Illustration Program - The GIMP Extensions
Group: Productivity/Graphics/Vector Editors
Requires: %{name} = %{version}
Requires: gimp-2.0
Supplements: packageand(%{name}:gimp)
Supplements: packageand(%{name}:gimp-2.0)
# Package in openSUSE <= 11.0 and SLED <= 10
Provides: %{name}:%{_datadir}/inkscape/extensions/gimp_xcf.inx
Enhances: %{name}
%description extensions-gimp
The GIMP import and export extensions for Inkscape.
Inkscape is a vector illustration program for the GNOME desktop.
%package extensions-skencil
Summary: Vector Illustration Program - Skencil Import Extension
Group: Productivity/Graphics/Vector Editors
Requires: %{name} = %{version}
Requires: skencil
Supplements: packageand(%{name}:skencil)
# Package in openSUSE <= 11.0 and SLED <= 10
Provides: %{name}:%{_datadir}/inkscape/extensions/sk_input.inx
Enhances: %{name}
%description extensions-skencil
Skencil import extension for Inkscape.
Inkscape is a vector illustration program for the GNOME desktop.
%lang_package
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%if 0%{?suse_version} > 1210
%patch3 -p1
%endif
%build
export CFLAGS="%{optflags} -fno-strict-aliasing"
export CXXFLAGS="%{optflags} -fno-strict-aliasing"
# We're building without perl support for now...
%configure\
--with-python\
--without-perl
make %{?_smp_mflags}
%install
%makeinstall
rm -rf %{buildroot}%{_datadir}/locale/en_US@piglatin
rm -rf %{buildroot}%{_datadir}/inkscape/filters/filters.svg.h
rm -rf %{buildroot}%{_datadir}/inkscape/patterns/patterns.svg.h
install -D -m 0644 %{S:1} %{buildroot}%{_datadir}/inkscape/palettes
%suse_update_desktop_file -N "Inkscape" -G "SVG Vector Illustrator" inkscape
# te_IN should really just be te, see lp#690255
test ! -e %{buildroot}%{_datadir}/locale/te
mv %{buildroot}%{_datadir}/locale/te_IN %{buildroot}%{_datadir}/locale/te
%find_lang %{name} %{?no_lang_C}
bash %{S:2} %{buildroot}%{_datadir}/inkscape/extensions "%%{_datadir}/inkscape/extensions/"
## fix line endings
sed -i 's/\r$//' %{buildroot}%{_datadir}/inkscape/extensions/param_curves.py
sed -i 's/\r$//' %{buildroot}%{_datadir}/inkscape/extensions/render_alphabetsoup.py
# Localized man pages
for man in %{buildroot}%{_mandir}/*/man1/*; do
LOCALE=`echo $man | sed "s:.*%{_mandir}/\([^/]*\)/man1/.*:\1:g"`
echo "%%lang($LOCALE) %%dir %%{_mandir}/$LOCALE" >> %{name}.man-lang.tmp
echo "%%lang($LOCALE) %%dir %%{_mandir}/$LOCALE/man1" >> %{name}.man-lang.tmp
echo "%%lang($LOCALE) %%doc /${man##%{buildroot}}*" >> %{name}.man-lang.tmp
done
sort -u %{name}.man-lang.tmp > %{name}.man-lang
rm %{name}.man-lang.tmp
%fdupes %{buildroot}
%clean
rm -rf %{buildroot}
%if 0%{?suse_version} > 1130
%post
%desktop_database_post
%icon_theme_cache_post
%endif
%if 0%{?suse_version} > 1130
%postun
%desktop_database_postun
%icon_theme_cache_postun
%endif
# We can't really move the localized manpages to the lang package, since they'd
# create a conflict between the lang subpackage and bundles
%files -f inkscape.lst -f %{name}.man-lang
%defattr(-,root,root)
%doc AUTHORS COPYING COPYING.LIB ChangeLog INSTALL NEWS README* TRANSLATORS
%{_bindir}/*
%{_datadir}/applications/inkscape.desktop
%{_datadir}/icons/hicolor/*/apps/inkscape.png
%dir %{_datadir}/inkscape
%{_datadir}/inkscape/[cf-z]*
%{_datadir}/inkscape/examples
%dir %{_datadir}/inkscape/extensions
%{_datadir}/inkscape/extensions/xaml2svg
%{_datadir}/inkscape/extensions/*.pl
%{_datadir}/inkscape/extensions/*.xsl*
%{_datadir}/inkscape/extensions/colors.xml
%{_datadir}/inkscape/extensions/ps2*
%{_datadir}/inkscape/extensions/Poly3DObjects/
%{_datadir}/inkscape/extensions/alphabet_soup/
%{_datadir}/inkscape/extensions/inkweb.js
%{_datadir}/inkscape/extensions/jessyInk.js
%{_datadir}/inkscape/extensions/jessyInk_core_mouseHandler_noclick.js
%{_datadir}/inkscape/extensions/jessyInk_core_mouseHandler_zoomControl.js
%{_datadir}/inkscape/extensions/jessyInk_video.svg
#BEGIN FIXME: What is purpose of these plugins? I see no references to them:
%{_datadir}/inkscape/extensions/SpSVG.pm
%{_datadir}/inkscape/extensions/Inkscape.pm
%{_datadir}/inkscape/extensions/simplepath.rb
#END FIXME
%doc %{_mandir}/man?/*.*
# exclude extensions that go in other packages:
%exclude %{_datadir}/inkscape/extensions/Barcode
%exclude %{_datadir}/inkscape/extensions/cdr*
%exclude %{_datadir}/inkscape/extensions/wmf*
%exclude %{_datadir}/inkscape/extensions/dia*
%exclude %{_datadir}/inkscape/extensions/fig*
%exclude %{_datadir}/inkscape/extensions/*gimp*
%exclude %{_datadir}/inkscape/extensions/sk*
# this one is in extras, thanks to inkscape-split-extensions-extra.sh
%exclude %{_datadir}/inkscape/extensions/ps2pdf-ext.py
%files extensions-extra -f inkscape-extensions-extra.lst
%defattr(-,root,root)
%{_datadir}/inkscape/extensions/Barcode
%{_datadir}/inkscape/extensions/cdr*
%{_datadir}/inkscape/extensions/wmf*
# This extensions seems erronous being copied in here too.
%exclude %{_datadir}/inkscape/extensions/*gimp*
%files extensions-dia
%defattr(-,root,root)
%{_datadir}/inkscape/extensions/dia*
%files extensions-fig
%defattr(-,root,root)
%{_datadir}/inkscape/extensions/fig*
%files extensions-gimp
%defattr(-,root,root)
# NOTE: export_gimp_palette* does not depend on gimp, but belongs here logically:
%{_datadir}/inkscape/extensions/*gimp*
%files extensions-skencil
%defattr(-,root,root)
%{_datadir}/inkscape/extensions/sk*
%files lang -f %{name}.lang
%changelog