File abiword.spec of Package abiword

#
# spec file for package abiword (Version 2.6.8)
#
# Copyright (c) 2009 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:           abiword
Summary:        A Multiplatform Word Processor
Version:        2.6.8
Release:        4
License:        GPL v2 only
Group:          Productivity/Office/Word Processor
Url:            http://www.abisource.com/
Source0:        http://www.abisource.com/downloads/%{name}/%{version}/%{name}-%{version}.tar.bz2
Source1:        http://www.abisource.com/downloads/%{name}/%{version}/%{name}-plugins-%{version}.tar.bz2
Source2:        http://www.abisource.com/downloads/%{name}/%{version}/%{name}-extras-%{version}.tar.bz2
Source3:        http://www.abisource.com/downloads/%{name}/%{version}/%{name}-docs-%{version}.tar.bz2
# PATCH-FIX-OPENSUSE abiword-plugins-ncurses.patch vuntz@novell.com -- Use ncurses instead of curses
Patch0:         abiword-plugins-ncurses.patch
# PATCH-FIX-UPSTREAM abiword-plugins-glibc-const.patch vuntz@novell.com -- rindex() returns a const char *
Patch1:         abiword-plugins-glibc-const.patch
## BuildRequires abiword
BuildRequires:  enchant-devel
BuildRequires:  fdupes
BuildRequires:  fribidi-devel
BuildRequires:  gcc-c++
BuildRequires:  libglade2-devel
BuildRequires:  libgnomeprintui-devel
BuildRequires:  libgsf-devel
BuildRequires:  update-desktop-files
BuildRequires:  wv-devel
# FIXME: requires libgoffice-0.4.pc and we have a more recent version
#BuildRequires:  goffice-devel
# FIXME: requires gucharmap.pc and we have gucharmap-2.pc
#BuildRequires:  gucharmap-devel
## BuildRequires abiword-plugins
BuildRequires:  asio-devel
BuildRequires:  bison
BuildRequires:  boost-devel
BuildRequires:  dbus-1-glib-devel
BuildRequires:  flex
BuildRequires:  gtkmathview-devel
BuildRequires:  librsvg-devel
BuildRequires:  libwpd-devel
BuildRequires:  link-grammar-devel
BuildRequires:  loudmouth-devel
BuildRequires:  nautilus-devel
BuildRequires:  psiconv-devel
BuildRequires:  readline-devel
# 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 24/04/2009:
# goffice-0.4
# gnome-scan >= 0.5.1
# Aiksaurus.h not found
# libots-1 >= 0.5.0
# libwpg-0.1 >= 0.1.0 and libwpd-0.8 >= 0.8.0
# libwps-0.1 >= 0.1.0
# xhtml(mht):  error - inter7 EPS headers not found
# xhtml(mht):          http://www.inter7.com/eps/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       libabiword-2_6 = %{version}
Conflicts:      abiword-unstable
%py_requires

%description
AbiWord is a multiplatform word processor with a GTK+ interface on the
UNIX platform. For extended functionality and integration, this version
is compiled with GNOME support. Abiword with the GNOME front-end is
part of the GNOME Office Suite.



Authors:
--------
    Thomas Fletcher <thomasf@qnx.com>
    Jeff Hostetler <jeff@abisource.com>
    Paul Rohr <paul@abisource.com>
    Bob Sievers <bob@abisource.com>
    Eric Sink <eric@abisource.com>
    Shaw Terwilliger <sterwill@abisource.com>

%package -n libabiword-2_6
License:        GPL v2 or later
Requires:       link-grammar
Summary:        A Multiplatform Word Processor
Group:          Productivity/Office/Word Processor

%description -n libabiword-2_6
AbiWord is a multiplatform word processor with a GTK+ interface on the
UNIX platform. For extended functionality and integration, this version
is compiled with GNOME support. Abiword with the GNOME front-end is
part of the GNOME Office Suite.



Authors:
--------
    Thomas Fletcher <thomasf@qnx.com>
    Jeff Hostetler <jeff@abisource.com>
    Paul Rohr <paul@abisource.com>
    Bob Sievers <bob@abisource.com>
    Eric Sink <eric@abisource.com>
    Shaw Terwilliger <sterwill@abisource.com>

%package -n libabiword-2_6-devel
License:        GPL v2 or later
Summary:        A Multiplatform Word Processor
Group:          Productivity/Office/Word Processor
Provides:       %{name}-devel = %{version}
Obsoletes:      %{name}-devel <= %{version}
Requires:       libabiword-2_6 = %{version}
Requires:       enchant-devel
Requires:       fontconfig-devel
Requires:       freetype2-devel
Requires:       fribidi-devel
Requires:       glib2-devel
Requires:       gnome-vfs2-devel
Requires:       gtk2-devel
Requires:       libglade2-devel
Requires:       libgnomeprint-devel
Requires:       libgnomeprintui-devel
Requires:       libgnomeui-devel
Requires:       libgsf-devel
Requires:       libpng-devel
Requires:       pango-devel
Requires:       wv-devel
Requires:       xorg-x11-devel

%description -n libabiword-2_6-devel
AbiWord is a multiplatform word processor with a GTK+ interface on the
UNIX platform. For extended functionality and integration, this version
is compiled with GNOME support. Abiword with the GNOME front-end is
part of the GNOME Office Suite.



Authors:
--------
    Thomas Fletcher <thomasf@qnx.com>
    Jeff Hostetler <jeff@abisource.com>
    Paul Rohr <paul@abisource.com>
    Bob Sievers <bob@abisource.com>
    Eric Sink <eric@abisource.com>
    Shaw Terwilliger <sterwill@abisource.com>

%prep
## abiword-plugins
%setup -q -T -b1 -n %{name}-plugins-%{version}
%patch0 -p1
%patch1 -p1
## abiword-extras
%setup -q -T -b2 -n %{name}-extras-%{version}
## abiword-docs
%setup -q -T -b3 -n %{name}-docs-%{version}
## abiword
# extract it last so that it's the directory that will be used by default
%setup -q

%build
# -fno-strict-aliasing added 2009-04-12. Need for v2.6.8
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
## abiword
cd ../abiword-%{version}
%configure --disable-static --with-pic \
	--enable-libabiword
%__make %{?jobs:-j%jobs}
## abiword-plugins
cd ../abiword-plugins-%{version}
%configure --disable-static --with-pic		\
	--with-abiword=../abiword-%{version}	\
	--with-abicollab-sugar-backend
%__make %{?jobs:-j%jobs}
# abiword-extras and abiword-docs look at the abiword-%{version}.pc pkg-config
# file to get the location info. However, that file is not installed yet, so
# just point to it in the abiword source tree.
export PKG_CONFIG_PATH="$RPM_BUILD_DIR/%{name}-%{version}"
## abiword-extras
cd ../abiword-extras-%{version}
%configure
%__make %{?jobs:-j%jobs}
## abiword-docs
cd ../abiword-docs-%{version}
# abiword-docs need the abiword binary to convert help files
export ABIWORD=$(pwd)/../%{name}-%{version}/src/wp/main/unix/abiword
%configure
%__make %{?jobs:-j%jobs}

%install
## abiword
cd ../abiword-%{version}
%makeinstall
%suse_update_desktop_file %{name}
# fix weird installation of icon file
rm $RPM_BUILD_ROOT%{_datadir}/icons/abiword_48.png 
mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps/
install -m644 abiword_48.png $RPM_BUILD_ROOT%{_datadir}/pixmaps
## abiword-plugins
cd ../abiword-plugins-%{version}
%makeinstall
rm $RPM_BUILD_ROOT%{_libdir}/abiword-2.6/plugins/*.la
## abiword-extras
cd ../abiword-extras-%{version}
%makeinstall
## abiword-docs
cd ../abiword-docs-%{version}
%makeinstall
%fdupes $RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

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

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

%files
%defattr(-, root, root)
%doc COPYING COPYRIGHT.TXT CREDITS.TXT docs
%{_bindir}/*
%{_datadir}/applications/abiword.desktop
%{_datadir}/pixmaps/abiword_48.png
%dir %{_datadir}/mime-info
%{_datadir}/mime-info/abiword.keys

%files -n libabiword-2_6
%defattr(-, root, root)
%{_libdir}/libabiword-*.so
%{_libdir}/abiword-2.6
%{_datadir}/abiword-2.6

%files -n libabiword-2_6-devel
%defattr(-, root, root)
%{_includedir}/abiword-2.6
%{_libdir}/pkgconfig/abiword-2.6.pc

%changelog
* Wed Jun 10 2009 vuntz@novell.com
- Add abiword-plugins-glibc-const.patch to fix build failure with
  latest glibc.
* Fri May 22 2009 vuntz@novell.com
- Add bison, flex, gtkmathview-devel BuildRequires for the plugins.
* Fri Apr 24 2009 vuntz@novell.com
- Completely reorganize the spec file to make it clearer what
  applies to abiword, and what applies to abiword-plugins.
  (Note: we can't split abiword and abiword-plugins in two source
  packages since abiword-plugins needs to be built with abiword
  source code)
- Also compile abiword-extras and abiword-docs in the package,
  since it's useful stuff for the user.
- Add some BuildRequires: dbus-1-glib-devel, libglade2-devel
- Comment some BuildRequires that won't work for various reasons:
  goffice-devel, gucharmap-devel, libgda-4_0-devel,
  libgnomedb-devel
- Remove unneeded BuildRequires: aspell-devel, gnutls-devel,
  libtiff-devel, libwnck-devel, mDNSResponder-devel
- Add some notes about missing BuildRequires for libraries that are
  not in openSUSE.
- Add missing requires to the devel package: enchant-devel,
  fontconfig-devel, fribidi-devel, gnome-vfs2-devel, libgsf-devel,
  libpng-devel, wv-devel, xorg-x11-devel.
- Pass --with-abicollab-sugar-backend to the configure of
  abiword-plugins to get the sugar backend of abicollab too.
- Do not add categories to the desktop files.
- Remove checks for old versions of openSUSE.
- Move the plugins and data files in the libabiword-2_6 package
  instead of just the abiword package since other applications
  using libabiword-2_6 need them.
- Add abiword-plugins-ncurses.patch to make the abicommand plugin
  compile.
* Sun Apr 12 2009 mboman@suse.de
- Update to version 2.6.8:
  + See http://www.abisource.com/changelogs/2.6.8.phtml for what's
  new in this version
- Remove abiword-fixes.patch. Fixed upstream
- Merge -devel into libabiword-2_6-devel
- Clean up requires for libabiword-2_6-devel
- Remove %%if statements <= 10.2
- Use CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
* Tue Feb 24 2009 vuntz@novell.com
- Remove eel-devel BuildRequires.
* Sun Feb 08 2009 hfiguiere@suse.de
- Added abiword-fixes.patch for some crasher fixes from upstream.
* Sun Jan 25 2009 vuntz@novell.com
- Don't use -n for %%suse_update_desktop_file on abiword, to alllow
  update of translations. Part of bnc#445728.
* Sat Jan 10 2009 hfiguiere@suse.de
- Update to version 2.6.6:
  + Add further error-checking to the handling of dimension units
  + Fix a bug that caused scrolling in the opposite direction when
  scrolling quickly
  + Fix a mismatched delete in the AbiWidget
  + Show the right and left alignment toolbar buttons regardless of
  locale
  + Bug 11898: MS Office Open XML exporter conflicts with other exporters
  + Bug 11852: ODT: Font family is not imported correctly
  + Bug 11854: ODT: Single document files are not imported at all
  + Bug 11896: ODT: Non-breaking spaces are not imported correctly
  + Update the Slovak (sk-SK) translation
* Mon Dec 29 2008 mboman@suse.de
- Update to version 2.6.5:
  + Added first iteraton of an Office Open XML filter
  + Vastly improved LaTeX export filter
  + Fixed a couple of annoying crashes in the GTK frontend
  + Fixed a bug that prevented the correct shaping of glyphs
  + Translation updates
* Fri Aug 29 2008 cyberorg@opensuse.org
- Enable libabiword required for OLPC's Write application
* Fri Jul 18 2008 jpr@suse.de
- Update to 2.6.4
  * Fixed inconsistent text rendering and layout with different zoom
  levels on Unix platforms.
  * The usual set of OpenDocument filter updates, most notably the
  added ability to import MathML formulas.
  * Add the ability to export specific pages and page ranges on the
  command line using the PostScript and PDF exporters on Linux.
- Drop abiword-no-return.diff, it was upstreamed
* Wed May 07 2008 hfiguiere@suse.de
- Patch : abiword-no-return-diff: fix now fatal compilation warnings.
* Mon Apr 07 2008 hfiguiere@suse.de
- Upgrade to AbiWord 2.6.2
  * Make the presentation plugin work.
  * Fix a bunch of small bugs in our XSL-FO, Applix, LaTeX, WML and HTML
  import/export filters.
- Remove all current patches
- Don't disable AbiCollab on configure
* Sun Apr 06 2008 hfiguiere@suse.de
- Add asio-devel in BuildRequires to enable AbiCollab
- Remove duplicate BuildRequires.
- Fix a warning with non executable script.
- Split -devel files.
* Thu Apr 03 2008 hfiguiere@suse.de
- Fix a bad build failure from last minute related to %%fdupes
  misuse
* Thu Apr 03 2008 hfiguiere@suse.de
- Upgrade to AbiWord 2.6 (bnc#374240)
  * New pango renderer (but support for asian languages)
  * GNOME Office plugin
  * Gnome-VFS support
  * Better ODF support
  * OOX support
  * Lot of bug fixes (bnc#234432)
- Grammar checking support
* Tue Nov 06 2007 maw@suse.de
- Add abiword-gcc4.3-fixes.patch, which fixes the build against
  newer versions of poppler
- Use %%fdupes.
* Fri Nov 02 2007 sbrabec@suse.cz
- Reverted one chunk of poppler patch to follow poppler changes.
* Tue Oct 23 2007 meissner@suse.de
- fixed gcc 4.3 build
* Thu Oct 11 2007 sbrabec@suse.cz
- poppler devel package names prepended by "lib".
* Mon Oct 08 2007 sbrabec@suse.cz
- Fixed build with poppler 0.6.
* Tue Jul 31 2007 jpr@suse.de
-Update to 2.4.6
- Fix IDEF vulnerabilities IDEF1613 and IDEF1614 in the MS Word
  import library wvWare
- Fix a longstanding bug that made AbiWord crash on Windows when the
  WordPerfect plugin was installed
- Massive updates to the OpenDocument, WML, XSL-FO and AbiCommand plugins
-Remove upstreamed patch
* Fri Mar 16 2007 sbrabec@suse.cz
- Added c++ packages to BuildRequires.
* Wed Feb 21 2007 mvaner@suse.cz
- Array bounds (#242029)
  - array-bounds.patch
* Thu Jan 04 2007 sbrabec@suse.cz
- Prefix changed to /usr.
- Spec file cleanup.
* Tue Dec 19 2006 meissner@suse.de
- fixed build fail due to warnings.
* Tue Nov 07 2006 ro@suse.de
- fix icon permission
* Tue Oct 31 2006 jhargadon@suse.de
- added a patch to remove call to FcFini from the XAP_UnixApp
  destructor to resolve crashes that occur during shutdown of the
  application.
* Sat Sep 30 2006 aj@suse.de
- Cleanup BuildRequires.
* Fri Sep 01 2006 jhargadon@suse.de
- update to version 2.4.5
- many bug fixes
- grammar checker added
- added tight mage wrapping
- added equations
- added OpenDocument support
- added Gnome-Office charting
- patch for compiler warnings
* Thu Aug 31 2006 gekker@suse.de
- Remove unnecessary gal2-devel from BuildRequires
* Wed Aug 09 2006 gekker@suse.de
- Fix missing sentinel warnings
* Fri Jul 07 2006 aj@suse.de
- Fix build with new poppler version.
* Sun Mar 26 2006 olh@suse.de
- remove -ansi -pedantic from CFLAGS to allow compilation with
  perl use64bitint and c++
* Fri Feb 24 2006 sbrabec@suse.cz
- Improved Categories.
* Mon Feb 06 2006 ro@suse.de
- use -fstack-protector only for > 10.0
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Jan 16 2006 sbrabec@suse.cz
- Updated to version 2.4.2.
* Fri Jan 13 2006 meissner@suse.de
- Added -fno-strict-aliasing -fstack-protector.
* Fri Nov 04 2005 sbrabec@suse.cz
- Updated to version 2.4.1.
* Sun Oct 30 2005 ro@suse.de
- remove extra qualifications to fix build with gcc-4.1
* Wed Oct 19 2005 sbrabec@suse.cz
- Build with libwpd.
* Wed Oct 05 2005 sbrabec@suse.cz
- Updated to version 2.4.0.
- Fixed more buffer overflows in RTF importer (#120097).
* Tue Sep 27 2005 sbrabec@suse.cz
- Updated to version 2.2.10 (#118545, CESA-2005-004 - rev 1).
* Thu Jul 28 2005 sbrabec@suse.cz
- Updated to version 2.2.9.
* Sat Jul 09 2005 gekker@suse.de
- Fix uninitialzed variables and remove .la files
* Mon May 23 2005 schwab@suse.de
- Fix missing declaration.
* Tue Apr 26 2005 sbrabec@suse.cz
- Updated to version 2.2.7.
* Fri Apr 15 2005 sbrabec@suse.de
- Fixed cast from pointer to integer.
* Tue Feb 22 2005 sbrabec@suse.cz
- Updated to version 2.2.4.
* Sun Jan 23 2005 meissner@suse.de
- use system wv lib, drop -fstrict-aliasing.
* Thu Jan 20 2005 sbrabec@suse.cz
- Updated to version 2.2.3.
* Tue Jan 11 2005 sbrabec@suse.cz
- Update to version 2.2.2.
* Fri Dec 10 2004 ro@suse.de
- install icon file
* Thu Nov 11 2004 sbrabec@suse.cz
- Fixed buffer overflow in the wvHandleDateTimePicture function in wv
  library: CAN-2004-0645 (#47767).
* Tue Sep 14 2004 ro@suse.de
- added ImageMagick-Magick++-devel to neededforbuild
* Tue Jun 29 2004 ro@suse.de
- added libtiff to neededforbuild
* Thu May 13 2004 clahey@suse.de
- Added patch to fix two missing return values.
* Tue May 11 2004 ro@suse.de
- added libcroco,libcroco-devel to neededforbuild
* Wed Apr 21 2004 sbrabec@suse.cz
- Updated to version 2.0.6.
* Wed Mar 17 2004 sbrabec@suse.cz
- Updated to version 2.0.5.
* Mon Mar 08 2004 sbrabec@suse.cz
- Updated to version 2.0.4.
* Sat Feb 21 2004 ro@suse.de
- updated neededforbuild
* Fri Feb 20 2004 sbrabec@suse.cz
- Package renamed to abiword.
* Mon Feb 16 2004 sbrabec@suse.cz
- Updated to version 2.0.3.
* Sat Jan 10 2004 adrian@suse.de
- add %%defattr
* Wed Oct 29 2003 sbrabec@suse.cz
- Removed garbage from spec file (move to pixmaps).
* Wed Oct 29 2003 sbrabec@suse.cz
- Updated to version 2.0.1.
- Fixed wv wmf to png support.
* Tue Oct 28 2003 ro@suse.de
- added gtksourceview to neededforbuild
* Thu Sep 18 2003 meissner@suse.de
- drop glib and glib-devel from neededforbuild, no longer needed.
* Tue Sep 16 2003 sbrabec@suse.cz
- Provide and obsolete abiword (bug #31002).
* Mon Sep 01 2003 adrian@suse.de
- install desktop file
* Thu Aug 28 2003 sbrabec@suse.cz
- Updated to version 1.99.5.
- Added gnome-libs-devel to neededforbuild (for gnome-config).
- Fixed Python 2.3 support.
* Tue Aug 26 2003 sbrabec@suse.cz
- Fixed GNOME-DB support.
* Wed Aug 20 2003 sbrabec@suse.cz
- Updated to version 1.99.4.
* Tue Aug 19 2003 sbrabec@suse.cz
- Updated neededforbuild (rename of librsvg2, eel2).
* Mon Aug 18 2003 sbrabec@suse.cz
- Use libgda instead of libgda2 (package was renamed).
* Thu Jul 31 2003 sf@suse.de
- fixed broken VA_COPY (use __va_copy)
* Mon Jul 14 2003 sbrabec@suse.cz
- GNOME prefix change to /opt/gnome.
* Mon Jun 16 2003 sbrabec@suse.cz
- Initial SuSE version of GNOME2 port.
openSUSE Build Service is sponsored by