Add a package to support IR remote configuration utility for Amlogic-based devices

This commit is contained in:
Alex Deryskyba 2014-12-23 01:12:34 +01:00
parent 9d468222d8
commit 238e6754c4
4 changed files with 100 additions and 0 deletions

View File

@ -0,0 +1,43 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2014 Alex Deryskyba (alex@codesnake.com)
#
# 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 <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="amremote"
PKG_VERSION="aa0a9e8"
PKG_REV="1"
PKG_ARCH="arm"
PKG_LICENSE="other"
PKG_SITE="http://www.amlogic.com"
PKG_URL="https://github.com/codesnake/amremote/releases/download/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_DEPENDS_TARGET="toolchain"
PKG_PRIORITY="optional"
PKG_SECTION="sysutils/remote"
PKG_SHORTDESC="amremote - IR remote configuration utility for Amlogic-based devices"
PKG_LONGDESC="amremote - IR remote configuration utility for Amlogic-based devices"
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"
makeinstall_target() {
mkdir -p $INSTALL/usr/bin
cp remotecfg $INSTALL/usr/bin
}
post_install() {
enable_service amlogic-remotecfg.service
}

View File

@ -0,0 +1,10 @@
[Unit]
Description=Amlogic IR remote support
[Service]
Type=oneshot
ExecStart=/bin/sh -c '[ -f /storage/.config/remote.conf ] && /usr/bin/remotecfg /storage/.config/remote.conf || /usr/bin/remotecfg /etc/remote.conf'
RemainAfterExit=yes
[Install]
WantedBy=basic.target

View File

@ -39,3 +39,7 @@ fi
if [ "$IRSERVER_SUPPORT" = "yes" ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET irserver"
fi
if [ "$AMREMOTE_SUPPORT" = "yes" ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET amremote"
fi

43
tools/mkpkg/mkpkg_amremote Executable file
View File

@ -0,0 +1,43 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program 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, or (at your option)
# any later version.
#
# This Program 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.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
echo "getting sources..."
if [ ! -d libamcodec.git ]; then
git clone https://github.com/codesnake/amremote.git amremote.git
fi
cd amremote.git
git pull
GIT_REV=`git log -n1 --format=%h`
cd ..
echo "copying sources..."
rm -rf amremote-$GIT_REV
cp -R amremote.git amremote-$GIT_REV
echo "cleaning sources..."
rm -rf amremote-$GIT_REV/.git
echo "packing sources..."
tar cvJf amremote-$GIT_REV.tar.xz amremote-$GIT_REV
echo "remove temporary sourcedir..."
rm -rf amremote-$GIT_REV