### this file is sourced not run
PKGVER=1.10.17
PKGBUILD=1
PKGARCH=x86_64

# source: BLFS 2013-08-1 - this is the latest that supports gtk2
TARBALL=gnumeric-1.10.17.tar.xz
MD5SUM=ee824d9656a271957d949b8769341f40
SRC_URL=http://ftp.gnome.org/pub/gnome/sources/gnumeric/1.10/$TARBALL
BUNDLE=

SLACKREQ='gtk2 libgoffice libglade'
SLACKDESC='gnumeric: gnumeric 1.10.17 (Spreadsheet program)  
gnumeric:  
gnumeric: An sophisticated spreadsheet program that can read MS-Excel files.  
gnumeric: 
gnumeric: 
gnumeric: 
gnumeric: 
gnumeric: 
gnumeric: 
gnumeric: 
gnumeric: 
'
SLACKSUG='python-pygobject-2.28.6'
SLACKINSTALL='glib-compile-schemas ./usr/share/glib-2.0/schemas'

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
#	return 1
	cd /tmp/gnumeric*
	touch doc/C/gnumeric-C.omf.out # so we don't need to install rarian
	CONFFLAGS="$CONFFLAGS --disable-static \
		--disable-schemas-compile" &&
	pkg_build_autoconf && 
	pkg_build_slackdesc &&
	rm -f /usr/share/icons/hicolor/icon-theme.cache &&
	
	# install ROX MIME handler
	mkdir -p /etc/xdg/rox.sourceforge.net/{MIME-types,SendTo} &&
	ln -sfv  /usr/bin/gnumeric /etc/xdg/rox.sourceforge.net/MIME-types/application_x-gnumeric &&
	ln -sfv  /usr/share/applications/gnumeric.desktop /etc/xdg/rox.sourceforge.net/SendTo/gnumeric  &&

	# install ROX "Edit with" handler
	MIMES=".application_vnd.sun.xml.calc
		.application_vnd.ms-excel
		.application_excel
		.application_vnd.oasis.opendocument.spreadsheet-template
		.text_x-comma-separated-values
		.text_spreadsheet
		.application_vnd.oasis.opendocument.spreadsheet
		.application_x-gnumeric" &&
	mkdir -p /etc/xdg/rox.sourceforge.net/SendTo &&
	(cd /etc/xdg/rox.sourceforge.net/SendTo &&
	mkdir -p $MIMES &&
	for p in $MIMES; do
		cd $p &&
		ln -sfv /usr/share/applications/gnumeric.desktop Edit-with-Gnumeric &&
		cd ..
	done
	)
}


