name=e2fsprogs
version=1.47.4
release=3
replaces="toybox sysvinit util-linux-libs"
desc="ext2/3/4 filesystem tools"
url="https://e2fsprogs.sourceforge.net/"
license="GPL-2.0-only LGPL-2.0-only"
depend="glibc util-linux-libs"
makedepend=""
source="https://kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v1.47.4/e2fsprogs-1.47.4.tar.xz"
sha256="SKIP"

build() {
	cd "e2fsprogs-1.47.4"
	_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-fuse2fs*)  _opts="$_opts --disable-fuse2fs" ;; esac
	./configure $_opts
	make -j"$JOBS"
}

package() {
	cd "e2fsprogs-1.47.4"
	make DESTDIR="$pkgdir" install
}
