File goffice.spec of Package goffice

#
# spec file for package goffice
#
# 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:           goffice
Version:        0.9.3
Release:        0
# FIXME: when ghostscript-devel >= 9.06 is in Factory, uncomment BuildRequires (needed to support embedded EPS) (2012-04-25: we have ghostscript 9.05)
Summary:        GLib/GTK+ Set of Document-Centric Objects and Utilities
License:        GPL-2.0 or GPL-3.0
Group:          System/GUI/GNOME
Url:            http://www.gnumeric.org/
Source:         http://download.gnome.org/sources/goffice/0.9/%{name}-%{version}.tar.xz
BuildRequires:  fdupes
#BuildRequires:  ghostscript-devel >= 9.06
BuildRequires:  intltool
BuildRequires:  libgsf-devel
BuildRequires:  translation-update-upstream
BuildRequires:  pkgconfig(cairo) >= 1.10.0
BuildRequires:  pkgconfig(cairo-pdf) >= 1.10.0
BuildRequires:  pkgconfig(cairo-ps) >= 1.10.0
BuildRequires:  pkgconfig(cairo-svg) >= 1.10.0
BuildRequires:  pkgconfig(gdk-pixbuf-2.0) >= 2.22.0
BuildRequires:  pkgconfig(glib-2.0) >= 2.28.0
%if 0%{?suse_version} > 1210
BuildRequires:  pkgconfig(gobject-introspection-1.0) >= 1.31.10
%endif
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.0.0
BuildRequires:  pkgconfig(librsvg-2.0) >= 2.22.0
BuildRequires:  pkgconfig(libspectre) >= 0.2.6
BuildRequires:  pkgconfig(pango) >= 1.24.0
BuildRequires:  pkgconfig(pangocairo) >= 1.24.0
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
GOffice is a GLib/GTK+ set of document-centric objects and utilities.

These are common operations for document-centric applications that are
conceptually simple, but complex to implement fully: plug-ins, load and
save documents, undo and redo.

%package -n libgoffice-0_10-9
Summary:        GLib/GTK+ Set of Document-Centric Objects and Utilities
Group:          System/Libraries
Recommends:     %{name}-lang
# To make lang package installable
Provides:       %{name} = %{version}

%description -n libgoffice-0_10-9
GOffice is a GLib/GTK+ set of document-centric objects and utilities.

These are common operations for document-centric applications that are
conceptually simple, but complex to implement fully: plug-ins, load and
save documents, undo and redo.

%if 0%{?suse_version} > 1210
%package -n typelib-1_0-GOffice-0_10
Summary:        GLib/GTK+ Set of Document-Centric Objects and Utilities -- Introspection bindings
Group:          System/Libraries

%description -n typelib-1_0-GOffice-0_10
GOffice is a GLib/GTK+ set of document-centric objects and utilities.

This package provides the GObject Introspection bindings for GOffice.
%endif

%package devel
Summary:        Development files for goffice
Group:          Development/Libraries/GNOME
Requires:       libgoffice-0_10-9 = %{version}
%if 0%{?suse_version} > 1210
Requires:       typelib-1_0-GOffice-0_10 = %{version}
%endif
Obsoletes:      goffice-doc < %{version}
Provides:       goffice-doc = %{version}

%description devel
GOffice is a GLib/GTK+ set of document-centric objects and utilities.

This package contains files needed to develop applications using
goffice.

%lang_package
%prep
%setup -q
translation-update-upstream

%build
%configure --disable-static --with-pic
make %{?_smp_mflags}

%install
%make_install
find %{buildroot} -type f -name "*.la" -print -delete
# Create directory for extern plugins
mkdir -p %{buildroot}%{_libdir}/goffice/0.10/plugins
%find_lang %{name}-%{version}
%fdupes %{buildroot}

%clean
rm -rf %{buildroot}

%post -n libgoffice-0_10-9 -p /sbin/ldconfig

%postun -n libgoffice-0_10-9 -p /sbin/ldconfig

%files -n libgoffice-0_10-9
%defattr (-, root, root)
%doc AUTHORS BUGS COPYING COPYING-gpl2 COPYING-gpl3 ChangeLog MAINTAINERS NEWS README
%{_libdir}/libgoffice-0.10.so.*
%dir %{_libdir}/goffice
%{_libdir}/goffice/%{version}/
# Directory for external plugins
%dir %{_libdir}/goffice/0.10
%dir %{_libdir}/goffice/0.10/plugins

%if 0%{?suse_version} > 1210
%files -n typelib-1_0-GOffice-0_10
%defattr (-, root, root)
%{_libdir}/girepository-1.0/GOffice-0.10.typelib
%endif

%files devel
%defattr (-, root, root)
%{_includedir}/libgoffice-0.10/
%{_libdir}/libgoffice-0.10.so
%{_libdir}/pkgconfig/libgoffice-0.10.pc
%{_datadir}/gir-1.0/GOffice-0.10.gir
# Own these repositories to not depend on gtk-doc while building:
%dir %{_datadir}/gtk-doc
%dir %{_datadir}/gtk-doc/html
%doc %{_datadir}/gtk-doc/html/goffice-0.10/

%files lang -f %{name}-%{version}.lang

%changelog