diff --git a/packages/sysutils/remote/irserver/build b/packages/sysutils/remote/irserver/build
deleted file mode 100755
index 1083f3a105..0000000000
--- a/packages/sysutils/remote/irserver/build
+++ /dev/null
@@ -1,29 +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
-
-[ "$TARGET_ARCH" = "i386" ] && make CC=$TARGET_CC irserver
-[ "$TARGET_ARCH" = "x86_64" ] && make CC=$TARGET_CC irserver64
-[ "$TARGET_ARCH" = "arm" ] && make CC=$TARGET_CC irserver_arm
-
-$STRIP $1*
diff --git a/packages/sysutils/remote/irserver/install b/packages/sysutils/remote/irserver/install
deleted file mode 100755
index b7b7275001..0000000000
--- a/packages/sysutils/remote/irserver/install
+++ /dev/null
@@ -1,31 +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/sbin
- [ "$TARGET_ARCH" = "i386" ] && cp -P $PKG_BUILD/irserver $INSTALL/usr/sbin/irserver
- [ "$TARGET_ARCH" = "x86_64" ] && cp -P $PKG_BUILD/irserver64 $INSTALL/usr/sbin/irserver
- [ "$TARGET_ARCH" = "arm" ] && cp -P $PKG_BUILD/irserver_arm $INSTALL/usr/sbin/irserver
-
-mkdir -p $INSTALL/usr/share/irtrans/remotes
- cp $PKG_BUILD/remotes/irtrans.rem $INSTALL/usr/share/irtrans/remotes
- cp $PKG_BUILD/remotes/mediacenter.rem $INSTALL/usr/share/irtrans/remotes
-
diff --git a/packages/sysutils/remote/irserver/meta b/packages/sysutils/remote/irserver/package.mk
similarity index 69%
rename from packages/sysutils/remote/irserver/meta
rename to packages/sysutils/remote/irserver/package.mk
index f77bb574a7..3d794537a8 100644
--- a/packages/sysutils/remote/irserver/meta
+++ b/packages/sysutils/remote/irserver/package.mk
@@ -23,12 +23,34 @@ PKG_ARCH="any"
PKG_LICENSE="Freeware"
PKG_SITE="http://http://www.irtrans.de"
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.bz2"
-PKG_DEPENDS=""
-PKG_BUILD_DEPENDS="toolchain"
+PKG_DEPENDS_TARGET=""
+PKG_BUILD_DEPENDS_TARGET="toolchain"
PKG_PRIORITY="optional"
PKG_SECTION="sysutils/remote"
PKG_SHORTDESC="irserver: IR Trans transforms your PC into a programmable remote control."
PKG_LONGDESC="IR Trans transforms your PC into a programmable remote control: It learns the codes of your remote control, stores them in a database and sends them controlled by your applications."
-PKG_IS_ADDON="no"
+PKG_IS_ADDON="no"
PKG_AUTORECONF="no"
+
+if [ "$TARGET_ARCH" = "i386" ]; then
+ IRSERVER_BIN="irserver"
+elif [ "$TARGET_ARCH" = "x86_64" ]; then
+ IRSERVER_BIN="irserver64"
+elif [ "$TARGET_ARCH" = "arm" ]; then
+ IRSERVER_BIN="irserver_arm"
+fi
+
+make_target() {
+ make CC=$TARGET_CC CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" $IRSERVER_BIN
+ $STRIP $IRSERVER_BIN
+}
+
+makeinstall_target() {
+ mkdir -p $INSTALL/usr/sbin
+ cp -P $IRSERVER_BIN $INSTALL/usr/sbin/irserver
+
+ mkdir -p $INSTALL/usr/share/irtrans/remotes
+ cp remotes/irtrans.rem $INSTALL/usr/share/irtrans/remotes
+ cp remotes/mediacenter.rem $INSTALL/usr/share/irtrans/remotes
+}
\ No newline at end of file