flirc_util: add initial add-on package

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
This commit is contained in:
Christian Hewitt 2023-10-21 09:26:56 +00:00
parent e9fa379f83
commit 3655ff1aa7
No known key found for this signature in database
6 changed files with 78 additions and 1 deletions

32
licenses/FLIRC.txt Normal file
View File

@ -0,0 +1,32 @@
/*
* Copyright 2023 Flirc Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY FLIRC INC. \`\`AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ${AUTHOR_UPPER} OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
* The views and conclusions contained in the software and documentation
* are those of the authors and should not be interpreted as representing
* official policies, either expressed or implied, of Flirc Inc.
*/

View File

@ -1,4 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-License-Identifier: GPL-2.0-only
# Copyright (C) 2023-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="hidapi"

View File

@ -0,0 +1 @@
initial release

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

View File

@ -0,0 +1,36 @@
# SPDX-License-Identifier: GPL-2.0-only
# Copyright (C) 2023-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="flirc_util"
PKG_VERSION="8d3c86e8bb419ad44297c1b186f0cdc7dfcac915" # 30/10/2023
PKG_SHA256="fc460e6ce5477cb6b83c90a5f8b2ebb9876ed23cdd813a6a4a0fdc3730052a2b"
PKG_LICENSE="FLIRC"
PKG_SITE="http://www.flirc.tv"
PKG_URL="https://github.com/flirc/sdk/archive/${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain hidapi libusb"
PKG_SECTION="tools"
PKG_SHORTDESC="CLI utility for flirc IR receivers"
PKG_LONGDESC="Command-Line utility for configuring flirc IR receivers"
PKG_TOOLCHAIN="manual"
PKG_IS_ADDON="yes"
PKG_ADDON_NAME="flirc_util"
PKG_ADDON_TYPE="xbmc.python.script"
make_target() {
cd cli
make VERBOSE="1" \
CONFIG="release" \
HOSTOS="LIBREELEC" \
MACHINE="Linux_${TARGET_ARCH}" \
BUILDDIR_ROOT="${PKG_BUILD}/build" \
BUILDDIR="${PKG_BUILD}/build" \
LSEARCH+=" -L../libs/Linux_${TARGET_ARCH}" \
flirc_util
}
addon() {
mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/{bin,lib}
cp -P ${PKG_BUILD}/build/flirc_util ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/
cp -P $(get_install_dir hidapi)/usr/lib/libhidapi-hidraw.so* ${ADDON_BUILD}/${PKG_ADDON_ID}/lib
}

View File

@ -0,0 +1,8 @@
# SPDX-License-Identifier: GPL-2.0-only
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
import xbmcgui
import subprocess
xbmcgui.Dialog().ok('', 'This is a console-only addon')