File abiword.spec of Package abiword

# spec file for package abiword
# 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

Name:           abiword
Summary:        A Multiplatform Word Processor
License:        GPL-2.0+
Group:          Productivity/Office/Word Processor
Version:        2.8.6
Release:        0
# FIXME next version: check if the telepathy support still requires old version of empathy (with libempathy-gtk)
# FIXME: package aiksaurus, libots, mathview-frontend-libxml2
# PATCH-FIX-UPSTREAM abiword-gcc46.patch -- Fix build with gcc 4.6
Patch0:         abiword-gcc46.patch
# PATCH-FIX-UPSTREAM abiword-glib-2.31.patch -- Fix build with glib 2.31.
Patch1:         abiword-glib-2.31.patch
BuildRequires:  asio-devel
BuildRequires:  bison
BuildRequires:  boost-devel
BuildRequires:  dbus-1-glib-devel
BuildRequires:  enchant-devel
BuildRequires:  fdupes
BuildRequires:  flex
BuildRequires:  fribidi-devel
BuildRequires:  gcc-c++
BuildRequires:  gtk2-devel
BuildRequires:  libgcrypt-devel
BuildRequires:  libgsf-devel
BuildRequires:  librsvg-devel
BuildRequires:  libsoup-devel
BuildRequires:  libwmf-devel
BuildRequires:  libwpd-devel
BuildRequires:  libwpg-devel
BuildRequires:  libwps-devel
BuildRequires:  link-grammar-devel
BuildRequires:  loudmouth-devel
BuildRequires:  psiconv-devel
BuildRequires:  readline-devel
BuildRequires:  update-desktop-files
BuildRequires:  wv-devel
BuildRequires:  pkgconfig(libgoffice-0.8)
# FIXME: requires libgda >= 1.2.0 libgnomedb >= 1.2.0 and we have
# libgda-[34].0.pc
#BuildRequires:  libgda-4_0-devel
#BuildRequires:  libgnomedb-devel
# FIXME: missing BuildRequires as of 05/12/2009:
# Aiksaurus.h not found
# libots-1 >= 0.5.0
# mathview-frontend-libxml2 >= 0.7.5
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       libabiword-2_8 = %{version}
Conflicts:      abiword-unstable

AbiWord is a multiplatform word processor with a GTK+ interface on the
UNIX platform.

%package -n libabiword-2_8
Requires:       link-grammar
Summary:        A Multiplatform Word Processor - Library files
Group:          Productivity/Office/Word Processor

%description -n libabiword-2_8
AbiWord is a multiplatform word processor with a GTK+ interface on the
UNIX platform.

%package -n libabiword-2_8-devel
Summary:        A Multiplatform Word Processor - Development files
Group:          Development/Libraries/GNOME
Provides:       %{name}-devel = %{version}
Obsoletes:      %{name}-devel < %{version}
Requires:       libabiword-2_8 = %{version}
Requires:       cairo-devel
Requires:       enchant-devel
Requires:       fribidi-devel
Requires:       glib2-devel
Requires:       goffice-devel
Requires:       gtk2-devel
Requires:       libgsf-devel
Requires:       librsvg-devel
Requires:       pango-devel
Requires:       wv-devel

%description -n libabiword-2_8-devel
AbiWord is a multiplatform word processor with a GTK+ interface on the
UNIX platform.

%setup -q
%patch0 -p1
%patch1 -p0

# -fno-strict-aliasing added 2009-04-12. Still needed for 2.8.1.
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%configure --disable-static --with-pic \
        --enable-dynamic \
        --enable-plugins \
        --enable-clipart \
        --enable-templates \
        --enable-collab-backend-xmpp \
        --enable-collab-backend-tcp \
        --enable-collab-backend-sugar \
        --enable-collab-backend-service \
        --enable-emacs-keybinding \
make %{?_smp_mflags}

find %{buildroot} -name '*.la' -delete
%suse_update_desktop_file %{name}
# fix weird installation of icon file
rm %{buildroot}%{_datadir}/icons/abiword_48.png
mkdir -p %{buildroot}%{_datadir}/pixmaps/
install -m644 abiword_48.png %{buildroot}%{_datadir}/pixmaps
%fdupes %{buildroot}

%if 0%{?suse_version} > 1130


%if 0%{?suse_version} > 1130


%post -n libabiword-2_8 -p /sbin/ldconfig

%postun -n libabiword-2_8 -p /sbin/ldconfig

%defattr(-, root, root)

%files -n libabiword-2_8
%defattr(-, root, root)

%files -n libabiword-2_8-devel
%defattr(-, root, root)

openSUSE Build Service is sponsored by