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

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

URL=https://github.com/wdlkmpx/gnome-mplayer/releases/download/1.1.3w
#URL=https://gnome-mplayer.googlecode.com/files
#SRC=v
PKG=gnome-mplayer
VER=1.1.3w
COMP=tar.xz
DESC="A light weight graphical front end to MPlayer"
DEPS=+gmtk,+gtk+2,+mplayer
CAT=Multimedia
DESKTOP=gnome-mplayer.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-schemas-compile \
				--with-alsa \
				--with-dbus
	[ "$?" -eq 0 ] || exit
	make $MKFLG
	[ "$?" -eq 0 ] || exit
	cp -arf $CWD/template $CWD/${PKG}-install || exit
	make DESTDIR=$CWD/${PKG}-install install || exit
	cd -
}
	
# main
retrieve ${PKG}-${VER}.${COMP}
extract ${PKG}-${VER}.${COMP}
build
package_std $PKG $VER $ARCH $DESKTOP "$DESC" $DEPS $CAT
