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

. ../func
. ../build.conf
#https://github.com/kohler/gifsicle/archive/v1.88.tar.gz
URL=https://github.com/kohler/gifsicle/archive/
PKG=gifsicle
VER=1.88
SVER=v
COMP=tar.gz
DESC="command-line tool for creating, editing, and getting information about GIF images and animations"
DEPS=
CAT=BuildingBlock
DESKTOP=gifsicle.desktop
BUILD=
CWD=$(pwd)
[ -z "$MWD" ] && MWD=$(dirname $CWD)
[ -z "$BUILD" ] && BUILD=$DEF_BUILD

ARCH=$(uname -m)
case $ARCH in
 #*64) LIBDIR=lib64 ;;
 *) LIBDIR=lib ;;
esac

build() {
	cd ${PKG}-${VER}
	./bootstrap.sh
	./configure --prefix=/usr \
				--localstatedir=/var \
				--sysconfdir=/etc \
				--libdir=/usr/${LIBDIR}
	[ "$?" -eq 0 ] || exit
	make $MKFLG
	[ "$?" -eq 0 ] || exit
	make DESTDIR=$CWD/${PKG}-install install
	cd -
}
	
# main
retrieve ${SVER}${VER}.${COMP}
extract ${SVER}${VER}.${COMP}
build
package_std $PKG $VER $ARCH $DESKTOP "$DESC" $DEPS $CAT	
