%define gnumeric_version %{version}-bonobo
%define goffice_version  0.9.5

Summary:     A spreadsheet program for GNOME.
Summary(ja): GNOME スプレッドシート
Name: 	     gnumeric
Version:     1.11.5
Release:     1%{?_dist_release}
License:     GPLv2
Group: 	     Applications/Productivity

URL:	  http://www.gnome.org/projects/gnumeric
Source0:  ftp://ftp.gnome.org/pub/GNOME/sources/%{name}/1.11/%{name}-%{version}.tar.xz
BuildRoot: %{_tmppath}/%{name}-%{version}-root

# default font: VL Gothic
Patch0:	gnumeric-1.11.5-vlgothic.patch

Distribution: Vine Linux
Vendor: Project Vine


BuildRequires: bison
BuildRequires: flex
BuildRequires: goffice-devel >= %{goffice_version}
BuildRequires: pygobject3-devel
BuildRequires: perl python-devel
BuildRequires: automake
BuildRequires: gnome-doc-utils
BuildRequires: desktop-file-utils

Requires(postun,posttrans): glib2
Requires(post,postun): desktop-file-utils

Obsoletes:  %{name}-devel

%description
GNOME (GNU Network Object Model Environment) is a user-friendly set of
applications and desktop tools to be used in conjunction with a window
manager for the X Window System.

This is the Gnumeric, a spreadsheet for GNOME.  It aims to be a drop in
replacement for commercial spreadsheets.  It provides import/export from
MS Excel files and many other formats (csv, latex, xbase, applix).

%description -l ja
GNOME (GNU Network Object Model Environment)は
Xウィンドウシステム用の、ウィンドウマネージャと連結した
GUIアプリケーションおよびデスクトップツールのセットです。

これは Gnumeric, GNOMEスプレッドシート・プログラムです。
商用のスプレッドシート・プログラムを代替できるものを目指しています。
MS Excelファイルや他の多くのフォーマット(csv, latex, xbase, applix)
を読込み、出力できます.


%prep
%setup -q
%patch0 -p1 -b .vlgothic

%build
%ifarch alpha
	MYARCH_FLAGS="--host=alpha-redhat-linux"
%endif

%configure \
	--without-gda \
	--with-perl \
	--with-python 
make

%install
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT

make DESTDIR=$RPM_BUILD_ROOT install

./mkinstalldirs $RPM_BUILD_ROOT%{_datadir}/applications
desktop-file-install --vendor gnome --delete-original                   \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications                         \
  --add-category Office                                                 \
  --add-category Application                                            \
  --add-category Spreadsheet                                            \
  --remove-mime-type="zz-application/zz-winassoc-xls"			\
  $RPM_BUILD_ROOT%{_datadir}/applications/*.desktop

%find_lang %{name}
%find_lang %{name}-functions
cat %{name}-functions.lang >> %{name}.lang

find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} \;

rm -rf $RPM_BUILD_ROOT%{_libdir}/pkgconfig
rm -rf $RPM_BUILD_ROOT%{_includedir}/libspreadsheet-1.12
rm -rf $RPM_BUILD_ROOT%{_localstatedir}/scrollkeeper

%clean
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT

%post
/sbin/ldconfig
scrollkeeper-update > /dev/null 2>&1 || :
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
update-desktop-database -q &> /dev/null || :

%postun 
/sbin/ldconfig
scrollkeeper-update > /dev/null 2>&1 || :
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
update-desktop-database -q &> /dev/null || :
glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:

%posttrans
glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:


%files -f %{name}.lang
%defattr (-, root, root)
%doc AUTHORS BUGS *ChangeLog* COPYING HACKING NEWS README
%{_bindir}/*
%{_libdir}/libspreadsheet*.so
%{_libdir}/%{name}
%{_libdir}/goffice/0.10/plugins/%{name}
%{_datadir}/applications/*.desktop
%{_datadir}/glib-2.0/schemas/*.xml
%{_datadir}/gnome/help/%{name}
%{_datadir}/%{name}
%{_datadir}/pixmaps/*
%{_datadir}/omf/*
%{_datadir}/icons/hicolor/*
%{_mandir}/man*/*
%exclude %{_datadir}/pixmaps/win32-gnumeric.ico


%changelog
* Mon Jul 16 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.11.5-1
- new upstream release
- add Patch0 (gnumeric-1.11.5-vlgothic.patch)
- remove Patch1 (gnumeric-1.10.17-libgsf.patch)

* Fri Dec 30 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.17-2
- rebuild with libgsf-1.14.22
- add Patch1 (gnumeric-1.10.17-libgsf.patch)

* Wed Aug 03 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.17-1
- new upstream release
- update Patch0

* Sat Apr 09 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.14-1
- new upstream release

* Sat Feb 05 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.13-1
- new upstream release
- add Patch0 (gnumeric-1.10.13-vlgothic.patch)

* Thu Dec 09 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.12-1
- new upstream release

* Sat Oct 16 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.11-1
- new upstream release

* Sun Sep 12 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.10-1
- new upstream release

* Mon Aug 23 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.9-1
- new upstream release
- add desktop-file-install option: --remove-mime-type="zz-application/zz-winassoc-xls"
   (fix error of MIME type)

* Sun Aug 15 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.8-1
- new upstream release

* Mon Jul 19 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.7-1
- new upstream release

* Wed Jun 23 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.6-1
- new upstream release
- fix %post and %postun

* Thu Apr 29 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.2-1
- new upstream release

* Sun Feb 28 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.1-1
- new upstream release
- add BuildRequires: libSM-devel
- fix BuildRequires: goffice-devel >= 0.8.1

* Sun May 17 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.8.3-3
- spec in UTF-8 (fixed)

* Sat May  9 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.8.3-2
- spec in UTF-8
- added BuildRequires: libffi-devel
- added %%pre, %%preun section

* Mon Jun 23 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.8.3-1
- new upstream release
- built with libgda-3.1.4, libgnomedb-3.1.2
- applied new versioning policy

* Mon Mar 10 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.8.2-0vl1
- new upstream release

* Sat Jun 17 2006 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.6.3-0vl2
- rebuild

* Fri May  5 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.6.3-0vl1
- new upstream release

* Sun Mar 12 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.6.2-0vl1
- new upstream release
- updated build dependancies
- rebuilt with libgsf-1.14.0
- built with libgda and libgnomedb again

* Tue Nov 15 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.6.1-0vl1
- new upstream release
- updated build dependancies
- not compile with libgda and libgnomedb in this version

* Mon Mar 14 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.4.3-0vl1
- new upstream release

* Fri Feb 11 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.4.2-0vl2
- rebuild with libgda 1.2.0 and libgnome 1.2.0

* Tue Jan 18 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.4.2-0vl1
- new upstream release

* Mon Dec 13 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.4.1-0vl1
- new upstream release

* Thu Dec  2 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.4.0-0vl1
- new upstream release

* Fri Nov 12 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.13-0vl2
- rebuild with gnome-2.8 environment and libgsf-1.10.1

* Tue Jun 29 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.13-0vl1
- new upstream release
- added BuildRequires: desktop-file-utils

* Thu May  6 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.12-0vl1
- new upstream release
- Requires: libgsf >= 1.9.0, BuildPrereq: libgsf-devel >= 1.9.0

* Wed Apr 21 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.11-0vl1
- new upstream release

* Wed Apr 14 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.10-0vl1
- new upstream release

* Sun Apr 11 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.9-0vl1
- new upstream release

* Thu Mar 18 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.8-0vl1
- new upstream release

* Wed Mar 17 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.7-0vl1
- new upstream release
- clean up spec file (a little bit!)

* Thu Jan 22 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.5-0vl1
- new upstream release

* Fri Jan 16 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.4-0vl1
- new upstream release
- to use intltool-0.28

* Sun Dec 28 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.3-0vl1
- new upstream release
- rebuild with new toolchains

* Sun Nov 30 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.2-0vl1
- new upstream release
- build with new libgnomeprint, libgnomeprintui

* Fri Oct 10 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.1-0vl1
- new upstream release

* Thu Oct  2 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.0-0vl2
- rebuild with newer libgda, libgnomedb

* Thu Sep 25 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.0-0vl1
- updated to 1.2.0 (stable release)
- guile support is temporarily off this version.

* Mon Sep  9 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.1.20-1vl1
- update to 1.1.20 (gtk+-2 port)
- based on Redhat Rawhide 1.1.20-1

* Thu May  1 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.13-0vl1
- update to 1.0.13
- rebuild with gal 0.24

* Sun Mar  9 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.12-0vl2
- guile support on
- rebuild with new gal, bonobo, libgda

* Fri Feb  7 2003 Masaki Shinomiya <shino@pos.to> 1.0.12-0vl1
- New upstream release, remove xmliobackward.patch

* Mon Dec 16 2002 Masaki Shinomiya <shino@pos.to> 1.0.11-0vl2
- xml-io back to 1.0.10 because japanese corrups with new xml_parser

* Sun Dec 15 2002 Masaki Shinomiya <shino@pos.to> 1.0.11-0vl1
- New upstream release, fix for xml importing files with non ASCII characters.
- Without guile, changelog.archive, requires, build scripts, description

* Mon Nov 19 2002 Masaki Shinomiya <shino@pos.to> 1.0.10-0vl2
- files: add gnumericConf.sh, which was missing

* Mon Nov  4 2002 Masaki Shinomiya <shino@pos.to> 1.0.10-0vl1
- New upstream release.
- BuildPrereq oaf-devel 

* Mon Jul 29 2002 Masaki Shinomiya <shino@pos.to> 1.0.9-0vl1
- New upstream release.

* Mon Jul 1 2002 Masaki Shinomiya <shino@pos.to> 1.0.8-0vl1
- New upstream release.
- Default font and Japanese fonts in excel
- requires

* Sun Jun 30 2002 Masaki Shinomiya <shino@pos.to> 1.0.7-0vl1
- New upstream release.
- fixed plugins, apply patch2, remove patch3
- files - no longer devel package
- function-reference.html in help file

* Thu Jan 24 2002 Akira TAGOH <tagoh@gnome.gr.jp> 1.0.3-0vl1
- New upstream release.

* Wed Jan 16 2002 Akira TAGOH <tagoh@gnome.gr.jp> 1.0.2-0vl1
- New upstream release.
- Fixed several owner dir.

* Tue Jan 15 2002 Akira TAGOH <tagoh@gnome.gr.jp> 1.0.1-0vl2
- Build against with new gal

* Mon Jan  7 2002 Akira TAGOH <tagoh@gnome.gr.jp> 1.0.1-0vl1
- New upstream release.

* Fri Jan  4 2002 Akira TAGOH <tagoh@gnome.gr.jp> 1.0.0-0vl1
- New upstream release.

* Fri Dec 28 2001 Akira TAGOH <tagoh@gnome.gr.jp> 0.99.1-0vl1
- New upstream release.
- Applied XIM over-the-spot patch.
- Fixed directories owner.

* Wed Dec 19 2001 Akira TAGOH <tagoh@gnome.gr.jp> 0.99.0-0vl1
- New upstream release.
- Enable Bonobo.
- Merged several RH patches.
- Added BuildPreReq tags.

* Tue Jun 19 2001 Akira TAGOH <tagoh@gnome.gr.jp> 0.61-0vl3
- Fixed packaging mistake.

* Mon May 14 2001 Akira TAGOH <tagoh@gnome.gr.jp> 0.61-0vl2
- Rebuild for GAL 0.7

* Fri Mar 23 2001 Akira TAGOH <tagoh@gnome.gr.jp> 0.61-0vl1
- New upstream release.
- Use rpmmacros.

* Mon Feb  5 2001 Jun Nishii <jun@vinelinux.org>
- 0.56-0vl2
- update ja.po
- avoid core dump when inserting a row

* Mon Jul 10 2000 Yasuyuki Furukawa <furukawa@vinelinux.org>
- updated to 0.56
- remake spec with the orginal gnumeric spec file.
- added ms_excel_read and edit_item patch from Japanese gnome users mailing list.

* Tue May 16 2000 Yasuyuki Furukawa <furukawa@vinelinux.org>
- updated to 0.53
- remake SPEC based on gnumeric original.
- added libxml183 patch for libxml 1.8.3

* Thu Mar 29 2000 Kjartan Maraas <kmaraas@online.no>
- Removed gnome-gnumeric-xl.png since it is nowhere to be found.
- Added --without-bonobo and --without-gb.
- Added %define for sysconfdir

* Mon Feb 29 2000 Jody Goldberg <jgolbderg@home.com>
- Updated version requirements for gnome-print, and gnome-libs.

* Sun Jan 30 2000 Gregory McLean <gregm@comstar.net>
- Added in some auto-detect the language files logic (rpm 3.0.xx only)

* Mon Jan 12 2000 Jody Goldberg <jgolbderg@home.com>
- Add depend on gtk+ >= 1.2.2 so that we can get gtk_object_get.

* Mon Jan 03 2000 Gregory McLean <gregm@comstar.net>
- Updated to 0.47

* Mon Dec 20 1999 Jody Goldberg <jgolbderg@home.com>
- Updated the libglade dependancy.
- Remove req for guile.  We can build without it.

* Thu Sep 02 1999 Gregory McLean <gregm@comstar.net>
- Added small fix so glade generated dialogs appear.

* Wed Jul 14 1999 Gregory McLean <gregm@comstar.net>
- Added the gnome-print requirement.
- Updated the file list to try and quiet down the updating.
- added the sysconfdir

* Tue Mar 9  1999 Gregory McLean <gregm@comstar.net>
- Updated the spec file.

* Thu Sep 24 1998 Michael Fulbright <msf@redhat.com>
- Version 0.2

