#!/bin/sh
#
# Copyright 2009 Tiago Souza <ts.salvador@gmail.com>
# Available under the terms of the GNU GPL.
#
# Heavily based on GSB (http://get.gnomeslackbuild.org/gsb) by
# 'Tadgy' Austin <darren (at) gnomeslackbuild.org> (Copyright (c) 2007)

# Requires slib, postgresql, libofx and goffice
NAME="gnucash"
VERSION="2.2.9"
REVISION="1"

PKG_SOURCEURL='http://www.gnucash.org/pub/$NAME/sources/stable/$NAME-$VERSION.tar.gz'

. $DLG_ROOT/config
. $DLG_ROOT/SCRIPTS/dropline-functions.sh

cflags
cxxflags
prepare
analyzesource
configure "--with-gconf-schema-file-dir=/etc/gconf/schemas -with-gconf-source=`/usr/bin/gconftool-2 --get-default-source` --disable-error-on-warning --enable-sql --enable-ofx -with-ofx-prefix=/usr"

makeinstall 
# Preserve old configuration
spewdo "mv $PKG_STAGEROOT/etc/gnucash/config $PKG_STAGEROOT/etc/gnucash/config.new"
tidydocumentation
analyzebinaries
finalizepackage
packagize
cleanup

