diff --git a/packages/sysutils/e2fsprogs/build b/packages/sysutils/e2fsprogs/build
deleted file mode 100755
index 1668307dda..0000000000
--- a/packages/sysutils/e2fsprogs/build
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/sh
-
-################################################################################
-# This file is part of OpenELEC - http://www.openelec.tv
-# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
-#
-# OpenELEC is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 2 of the License, or
-# (at your option) any later version.
-#
-# OpenELEC is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with OpenELEC. If not, see .
-################################################################################
-
-. config/options $1
-
-cd $PKG_BUILD
-
-./configure --host=$TARGET_NAME \
- --build=$HOST_NAME \
- --prefix=/usr \
- --bindir=/usr/bin \
- --sbindir=/usr/bin \
- --sysconfdir=/etc \
- --enable-verbose-makecmds \
- --enable-symlink-install \
- --enable-symlink-build \
- --enable-compression \
- --enable-htree \
- --disable-elf-shlibs \
- --disable-bsd-shlibs \
- --disable-profile \
- --disable-jbd-debug \
- --disable-blkid-debug \
- --disable-testio-debug \
- --enable-libuuid \
- --enable-libblkid \
- --disable-debugfs \
- --disable-imager \
- --enable-resizer \
- --enable-fsck \
- --disable-e2initrd-helper \
- --enable-tls \
- --disable-uuidd \
- --disable-nls \
- --disable-rpath \
- --with-gnu-ld \
-
-make
diff --git a/packages/sysutils/e2fsprogs/install b/packages/sysutils/e2fsprogs/install
deleted file mode 100755
index 49af4a0a18..0000000000
--- a/packages/sysutils/e2fsprogs/install
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/sh
-
-################################################################################
-# This file is part of OpenELEC - http://www.openelec.tv
-# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
-#
-# OpenELEC is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 2 of the License, or
-# (at your option) any later version.
-#
-# OpenELEC is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with OpenELEC. If not, see .
-################################################################################
-
-. config/options $1
-
-mkdir -p $INSTALL/etc
- cp $PKG_BUILD/misc/mke2fs.conf $INSTALL/etc
-
-mkdir -p $INSTALL/sbin
- cp $PKG_BUILD/misc/fsck $INSTALL/sbin
- cp $PKG_BUILD/e2fsck/e2fsck $INSTALL/sbin
- ln -sf e2fsck $INSTALL/sbin/fsck.ext2
- ln -sf e2fsck $INSTALL/sbin/fsck.ext3
- ln -sf e2fsck $INSTALL/sbin/fsck.ext4
- ln -sf e2fsck $INSTALL/sbin/fsck.ext4dev
- cp $PKG_BUILD/misc/mke2fs $INSTALL/sbin
- ln -sf mke2fs $INSTALL/sbin/mkfs.ext2
- ln -sf mke2fs $INSTALL/sbin/mkfs.ext3
- ln -sf mke2fs $INSTALL/sbin/mkfs.ext4
- ln -sf mke2fs $INSTALL/sbin/mkfs.ext4dev
- cp $PKG_BUILD/resize/resize2fs $INSTALL/sbin
- cp $PKG_BUILD/misc/tune2fs $INSTALL/sbin
- ln -sf tune2fs $INSTALL/sbin/e2label
diff --git a/packages/sysutils/e2fsprogs/meta b/packages/sysutils/e2fsprogs/package.mk
similarity index 54%
rename from packages/sysutils/e2fsprogs/meta
rename to packages/sysutils/e2fsprogs/package.mk
index fe8d761f01..c575d26fa9 100644
--- a/packages/sysutils/e2fsprogs/meta
+++ b/packages/sysutils/e2fsprogs/package.mk
@@ -24,7 +24,7 @@ PKG_LICENSE="GPL"
PKG_SITE="http://e2fsprogs.sourceforge.net/"
PKG_URL="$SOURCEFORGE_SRC/$PKG_NAME/$PKG_NAME/1.42/$PKG_NAME-$PKG_VERSION.tar.gz"
PKG_DEPENDS=""
-PKG_BUILD_DEPENDS="toolchain"
+PKG_BUILD_DEPENDS_TARGET="toolchain"
PKG_PRIORITY="optional"
PKG_SECTION="tools"
PKG_SHORTDESC="e2fsprogs: Utilities for use with the ext2 filesystem"
@@ -36,3 +36,30 @@ PKG_AUTORECONF="yes"
if [ "$HFSTOOLS" = "yes" ]; then
PKG_DEPENDS="$PKG_DEPENDS diskdev_cmds"
fi
+
+PKG_CONFIGURE_OPTS_TARGET="--prefix=/usr \
+ --bindir=/bin \
+ --sbindir=/sbin \
+ --enable-verbose-makecmds \
+ --enable-symlink-install \
+ --enable-symlink-build \
+ --enable-compression \
+ --enable-htree \
+ --disable-elf-shlibs \
+ --disable-bsd-shlibs \
+ --disable-profile \
+ --disable-jbd-debug \
+ --disable-blkid-debug \
+ --disable-testio-debug \
+ --enable-libuuid \
+ --enable-libblkid \
+ --disable-debugfs \
+ --disable-imager \
+ --enable-resizer \
+ --enable-fsck \
+ --disable-e2initrd-helper \
+ --enable-tls \
+ --disable-uuidd \
+ --disable-nls \
+ --disable-rpath \
+ --with-gnu-ld"