diff --git a/packages/web/curl/build b/packages/web/curl/build
deleted file mode 100755
index 6af1a0acc3..0000000000
--- a/packages/web/curl/build
+++ /dev/null
@@ -1,91 +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
-
-# link against librt because of undefined reference to 'clock_gettime'
-export LIBS="-lrt -lm -lrtmp"
-
-cd $PKG_BUILD
-ac_cv_lib_rtmp_RTMP_Init=yes \
-ac_cv_header_librtmp_rtmp_h=yes \
-./configure --host=$TARGET_NAME \
- --build=$HOST_NAME \
- --prefix=/usr \
- --disable-static \
- --enable-shared \
- --disable-debug \
- --enable-optimize \
- --enable-warnings \
- --disable-curldebug \
- --disable-ares \
- --enable-largefile \
- --enable-http \
- --enable-ftp \
- --enable-file \
- --disable-ldap \
- --disable-ldaps \
- --disable-rtsp \
- --enable-proxy \
- --disable-dict \
- --disable-telnet \
- --disable-tftp \
- --disable-pop3 \
- --disable-imap \
- --disable-smtp \
- --disable-gophper \
- --disable-manual \
- --enable-libgcc \
- --enable-ipv6 \
- --enable-versioned-symbols \
- --enable-nonblocking \
- --enable-threaded-resolver \
- --enable-verbose \
- --disable-sspi \
- --enable-crypto-auth \
- --enable-cookies \
- --enable-hidden-symbols \
- --disable-soname-bump \
- --with-gnu-ld \
- --without-krb4 \
- --without-spnego \
- --without-gssapi \
- --with-zlib \
- --without-egd-socket \
- --enable-thread \
- --with-random=/dev/urandom \
- --with-gnutls="$SYSROOT_PREFIX/usr" \
- --without-ssl \
- --without-polarssl \
- --without-nss \
- --with-ca-bundle="$SSL_CERTIFICATES/cacert.pem" \
- --without-ca-path \
- --without-libssh2 \
- --with-librtmp="$SYSROOT_PREFIX/usr" \
- --without-libidn \
-
-make
-
-$MAKEINSTALL
-
-$SED "s:\(['= ]\)/usr:\\1$SYSROOT_PREFIX/usr:g" \
- $SYSROOT_PREFIX/usr/bin/$1-config
-
-mv $SYSROOT_PREFIX/usr/bin/$1-config $ROOT/$TOOLCHAIN/bin
diff --git a/packages/web/curl/install b/packages/web/curl/install
deleted file mode 100755
index f902b48aa0..0000000000
--- a/packages/web/curl/install
+++ /dev/null
@@ -1,27 +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/usr/bin
- cp $PKG_BUILD/src/.libs/curl $INSTALL/usr/bin
-
-mkdir -p $INSTALL/usr/lib
- cp -P $PKG_BUILD/lib/.libs/libcurl.so* $INSTALL/usr/lib
diff --git a/packages/web/curl/meta b/packages/web/curl/meta
deleted file mode 100644
index 749c8073bc..0000000000
--- a/packages/web/curl/meta
+++ /dev/null
@@ -1,35 +0,0 @@
-################################################################################
-# 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 .
-################################################################################
-
-PKG_NAME="curl"
-# curl-7.32.0 breaks XBMC ftp sources support, please test before upgrade curl!
-PKG_VERSION="7.31.0"
-PKG_REV="1"
-PKG_ARCH="any"
-PKG_LICENSE="MIT"
-PKG_SITE="http://curl.haxx.se"
-PKG_URL="http://curl.haxx.se/download/$PKG_NAME-$PKG_VERSION.tar.bz2"
-PKG_DEPENDS="zlib gnutls rtmpdump"
-PKG_BUILD_DEPENDS="toolchain zlib gnutls rtmpdump"
-PKG_PRIORITY="optional"
-PKG_SECTION="web"
-PKG_SHORTDESC="curl: Client and library for (HTTP, HTTPS, FTP, ...) transfers"
-PKG_LONGDESC="Curl is a client to get documents/files from or send documents to a server, using any of the supported protocols (HTTP, HTTPS, FTP, FTPS, GOPHER, DICT, TELNET, LDAP or FILE). The command is designed to work without user interaction or any kind of interactivity."
-PKG_IS_ADDON="no"
-
-PKG_AUTORECONF="yes"
diff --git a/packages/web/curl/package.mk b/packages/web/curl/package.mk
new file mode 100644
index 0000000000..42921bdc29
--- /dev/null
+++ b/packages/web/curl/package.mk
@@ -0,0 +1,99 @@
+################################################################################
+# 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 .
+################################################################################
+
+PKG_NAME="curl"
+# curl-7.32.0 breaks XBMC ftp sources support, please test before upgrade curl!
+PKG_VERSION="7.31.0"
+PKG_REV="1"
+PKG_ARCH="any"
+PKG_LICENSE="MIT"
+PKG_SITE="http://curl.haxx.se"
+PKG_URL="http://curl.haxx.se/download/$PKG_NAME-$PKG_VERSION.tar.bz2"
+PKG_DEPENDS="zlib gnutls rtmpdump"
+PKG_BUILD_DEPENDS_TARGET="toolchain zlib gnutls rtmpdump"
+PKG_PRIORITY="optional"
+PKG_SECTION="web"
+PKG_SHORTDESC="curl: Client and library for (HTTP, HTTPS, FTP, ...) transfers"
+PKG_LONGDESC="Curl is a client to get documents/files from or send documents to a server, using any of the supported protocols (HTTP, HTTPS, FTP, FTPS, GOPHER, DICT, TELNET, LDAP or FILE). The command is designed to work without user interaction or any kind of interactivity."
+
+PKG_IS_ADDON="no"
+PKG_AUTORECONF="yes"
+
+PKG_CONFIGURE_OPTS_TARGET="ac_cv_lib_rtmp_RTMP_Init=yes \
+ ac_cv_header_librtmp_rtmp_h=yes \
+ --disable-debug \
+ --enable-optimize \
+ --enable-warnings \
+ --disable-curldebug \
+ --disable-ares \
+ --enable-largefile \
+ --enable-http \
+ --enable-ftp \
+ --enable-file \
+ --disable-ldap \
+ --disable-ldaps \
+ --disable-rtsp \
+ --enable-proxy \
+ --disable-dict \
+ --disable-telnet \
+ --disable-tftp \
+ --disable-pop3 \
+ --disable-imap \
+ --disable-smtp \
+ --disable-gophper \
+ --disable-manual \
+ --enable-libgcc \
+ --enable-ipv6 \
+ --enable-versioned-symbols \
+ --enable-nonblocking \
+ --enable-threaded-resolver \
+ --enable-verbose \
+ --disable-sspi \
+ --enable-crypto-auth \
+ --enable-cookies \
+ --enable-hidden-symbols \
+ --disable-soname-bump \
+ --with-gnu-ld \
+ --without-krb4 \
+ --without-spnego \
+ --without-gssapi \
+ --with-zlib \
+ --without-egd-socket \
+ --enable-thread \
+ --with-random=/dev/urandom \
+ --with-gnutls=$SYSROOT_PREFIX/usr \
+ --without-ssl \
+ --without-polarssl \
+ --without-nss \
+ --with-ca-bundle=$SSL_CERTIFICATES/cacert.pem \
+ --without-ca-path \
+ --without-libssh2 \
+ --with-librtmp=$SYSROOT_PREFIX/usr \
+ --without-libidn"
+
+pre_configure_target() {
+# link against librt because of undefined reference to 'clock_gettime'
+ export LIBS="-lrt -lm -lrtmp"
+}
+
+post_makeinstall_target() {
+ rm -rf $INSTALL/usr/bin/curl-config
+
+ sed -e "s:\(['= ]\)/usr:\\1$SYSROOT_PREFIX/usr:g" -i $SYSROOT_PREFIX/usr/bin/curl-config
+ mv $SYSROOT_PREFIX/usr/bin/curl-config $ROOT/$TOOLCHAIN/bin
+}