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

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

PKG=curlftpfs
VER=0.9.2
URL=http://downloads.sourceforge.net/project/curlftpfs/curlftpfs/$VER/
COMP=tar.gz
DESC="CurlFtpFS is a filesystem for acessing ftp hosts based on FUSE and libcurl"
DEPS=+curl,+fuse
CAT=BuildingBlock
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} \
				--enable-static=libcurl \
				--disable-shared
	[ "$?" -eq 0 ] || exit
	make
	[ "$?" -eq 0 ] || exit
	make DESTDIR=$CWD/$PKG-install install
	cd -
}

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