#!/bin/sh
## Build script for: gnucash
## Amigo PkgBuild template v-0.1
## See the Amigo PkgBuild HOWTO for more help.
##### ------------Standard Package Variables-------------------
# Most source code only needs these  4 variables set.
# Set  SRC_SUFFIX  to  '.tar.gz'  ' .tgz'   '.tar.bz2'  or  '.tbz'
BUILD="1"
NAME="gnucash"
VERSION="1.8.4"
SRC_SUFFIX=".tar.gz"
#####--------Common Overrides and Extras--------------------
PRE_FIX="/usr"
# CFLAGS="$STD_FLAGS$EXTRA_FLAGS"
STD_FLAGS="-O2 -march=i486 -mcpu=i686"
STD_CONFIGS="--localstatedir=/var/lib"
# COMPILE_HOST="i486-slackware-linux"
# SRC_GROUP="xap/"
# PKG_GROUP="xap/"
EXTRA_CONFIGS="--with-gnu-ld --enable-prefer-db1 --with-gnome=/usr"
DOCLIST="COPYING AUTHORS ChangeLog README"
#######----------------Processing------------------------------------
# This template shows each process individually
. /usr/share/Amigo/PkgBuild/FUNCTIONS ;
. /usr/share/Amigo/PkgBuild/PkgBuild.globals ;
find_source ;
make_src_build_dir ;
make_pkg_dirs ;
unpack_source ;
fix_source_perms ;
	# patch_source	# patch_pre_configure
configure_source ;
	# patch_post_configure
compile_source ;
	# patch_post_compile
env LIBRARY_PATH=$PKG_DIR/usr/lib:$PKG_DIR/usr/lib/gnucash make DESTDIR=$PKG_DIR install
# fake_install 

strip_bins ;
strip_libs ;
create_docs ;

fix_pkg_perms ;
compress_man_pages ;
make_description ;
make_doinst ;
make_package ;
really_install ;
exit 0
