# f2fs-tools
# Builds from https://github.com/puppylinux-woof-CE/petbuilds
# File auto generated by ./mk_petbuild.sh. Edit as necessary.

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

URL=https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/snapshot
PKG=f2fs-tools
VER=1.9.0 #2017-09-21
COMP=tar.gz
DESC="tools for f2fs file system"
DEPS=
CAT=BuildingBlock
DESKTOP=
BUILD=
CWD=$(pwd)
[ -z "$MWD" ] && MWD=$(dirname $CWD)
[ -z "$BUILD" ] && BUILD=$DEF_BUILD
# comment these 2 below if you use a custom package() function
[ -f "$DESKTOP" ] || DESKTOP=not
[ -z "$DEPS" ] && DEPS=not

ARCH=$(uname -m)
case $ARCH in # set in build.conf
 *64) 	LIBDIR=$LIBCONF64 
		FLAGS=$CF64;;
 arm*)	LIBDIR=$LIBCONFarm
		FLAGS="-O2" ;;
 i686) 	LIBDIR=$LIBCONF32 
		FLAGS=$CF32;;
	*) 	LIBDIR=$LIBCONF32 
		FLAGS="-O2 -march=$ARCH -mtune=$ARCH";;
esac

# main
retrieve ${PKG}-${VER}.${COMP}
extract ${PKG}-${VER}.${COMP}

if [ ! -f ${PKG}-${VER}/configure ] ; then
	cd ${PKG}-${VER}
	autoreconf -vi
	cd -
fi

build_configure $PKG $VER $LIBDIR "$FLAGS"
package_std $PKG $VER $ARCH $DESKTOP "$DESC" $DEPS $CAT
