# gparted
# Builds from https://github.com/puppylinux-woof-CE/petbuilds

. ../func
. ../build.conf

URL=http://downloads.sourceforge.net/project/gparted/gparted/gparted-0.26.0
PKG=gparted
VER=0.26.0
COMP=tar.gz
DESC="GParted is a graphical partition manager"
DEPS=+gtk+2,+parted
#NOTE: build time deps are all the *mm_static libs. That way these go to devx
CAT=System
DESKTOP=gparted.desktop
BUILD=
CWD=$(pwd)
[ -z "$MWD" ] && MWD=$(dirname $CWD)	
[ -z "$BUILD" ] && BUILD=$DEF_BUILD
[ -f "$DESKTOP" ] || DESKTOP=not
[ -z "$DEPS" ] && DEPS=not	

ARCH=$(uname -m)
case $ARCH in
 *64) 	LIBDIR=$LIBCONF64 ;;
 arm*)	LIBDIR=$LIBCONFarm;;
 *) 	LIBDIR=$LIBCONF32 ;;
esac

build() {
	cd ${PKG}-${VER}
	./configure --prefix=/usr \
				--localstatedir=/var \
				--sysconfdir=/etc \
				--libdir=/usr/${LIBDIR} \
				--disable-doc
	[ "$?" -eq 0 ] || exit
	make $MKFLG
	[ "$?" -eq 0 ] || exit
	make DESTDIR=$CWD/${PKG}-install install
	cd -
}
	
package_ext() {
	#SPECIAL add gparted_shell
	cp -af gparted_shell ${PKG}-install/usr/sbin
}

# main
retrieve ${PKG}-${VER}.${COMP}
extract ${PKG}-${VER}.${COMP}
build
package_ext
package_std $PKG $VER $ARCH $DESKTOP "$DESC" $DEPS $CAT	
