name=f2fs-tools
version=1.16.0
release=1
desc="F2FS filesystem tools"
url="https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git"
license="GPL-2.0-only"
depend="glibc util-linux-libs"
makedepend=""
source="https://kernel.org/pub/linux/kernel/people/jaegeuk/f2fs-tools/f2fs-tools-1.16.0.tar.gz"
sha256="SKIP"

build() {
	cd "f2fs-tools-1.16.0"
	[ -x ./configure ] || autoreconf -fi
	_opts="--prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib"
	_help=$(./configure --help 2>/dev/null)
	case "$_help" in *--disable-static*)  _opts="$_opts --disable-static" ;; esac
	case "$_help" in *--disable-nls*)     _opts="$_opts --disable-nls" ;; esac
	case "$_help" in *--disable-dependency-tracking*) _opts="$_opts --disable-dependency-tracking" ;; esac
	./configure $_opts
	gmake -j"$JOBS"
}

package() {
	cd "f2fs-tools-1.16.0"
	gmake DESTDIR="$pkgdir" install
}
