# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=f2fs-tools
pkgver=1.10.0
pkgrel=0
pkgdesc="Tools for the Flash-Friendly File System (F2FS)"
url="http://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs-tools.git"
arch="all"
license="GPL-2.0-or-later LGPL-2.1-or-later"
depends=""
depends_dev=""
makedepends="$depends_dev automake autoconf bsd-compat-headers
	libtool util-linux-dev linux-headers"
install=""
subpackages="$pkgname-doc $pkgname-dev $pkgname-libs"
source="https://git.kernel.org/cgit/linux/kernel/git/jaegeuk/$pkgname.git/snapshot/$pkgname-$pkgver.tar.gz
	"
builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	default_prepare
	cd "$builddir"
	./autogen.sh
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr
	make
}

package() {
	cd "$builddir"
	make install DESTDIR="$pkgdir"
	install -D -m644 mkfs/f2fs_format_utils.h "$pkgdir"/usr/include/
}

sha512sums="e0e3ffd8b67704f83f0ff8ad8435a18a059301ae8e46335801a847121825af1d0e792ee36ab631cb19c27113354f9cbba43d4b0a6ccdbb3529f21080604d92c1  f2fs-tools-1.10.0.tar.gz"
