# Maintainer: Jaromir Capik <tavvva@email.cz>

pkgname=gnumeric
pkgver=1.6.3
pkgrel=4
pkgdesc="A GNOME Spreadsheet Program"
url="http://www.gnome.org/projects/gnumeric/"
license=('GPL')
depends=('goffice')
groups=('desktop')
install=$pkgname.install
source=(http://ftp.nluug.nl/pub/os/Linux/distr/pdaxrom/src/gnumeric-1.6.3.tar.bz2
	gnumeric-1.6.1-desktop.patch
	gnumeric-1.4.1-excelcrash.patch
	gnumeric-1.6.3-helppath.patch
	gnumeric-1.6.3-gda3.patch
	gnumeric-1.6.3-gpl-md5.patch
	gnumeric-1.6.3-stf-parse.patch
	gnumeric_16x16.xpm)

build() {
  cd ${startdir}/src/${pkgname}-${pkgver}
  patch -p1 < ../gnumeric-1.6.1-desktop.patch
  patch -p1 < ../gnumeric-1.4.1-excelcrash.patch
  patch -p1 < ../gnumeric-1.6.3-helppath.patch
  patch -p1 < ../gnumeric-1.6.3-gda3.patch
  patch -p1 < ../gnumeric-1.6.3-gpl-md5.patch
  patch -p1 < ../gnumeric-1.6.3-stf-parse.patch

  ./configure --prefix=/usr --sysconfdir=/etc \
              --localstatedir=/var --disable-static --without-gnome \
              --without-guile --without-bonobo --without-perl \
              --host=$CHOST --build=$CHOST
  make || return 1
  make DESTDIR=${startdir}/pkg install

  sed -i 's/.png//g' $pkgdir/usr/share/applications/gnumeric.desktop
  sed -i 's/ %F//g' $pkgdir/usr/share/applications/gnumeric.desktop
  install -Dm 644 $srcdir/gnumeric_16x16.xpm $pkgdir/usr/share/pixmaps/gnumeric_16x16.xpm
}

md5sums=('78ffd75ae6abc3bb20dd04407a082a26' '06ac8333d2369517ea91546efa6a38eb'\
         'f6f3d0ad29558188a0f77e7bf0094fc5' '6784becde793ed9dc87b8b08491cdb43'\
         '93c7c9ea9d9e23384c79e27e4d983667' '626d85f54d98f0d982b3aea1da0d9911'\
         '9cd6110c20d5989f5258b6a29710fa96' 'ed9930d7b904768e968c4887e586d2c5')
