diff --git a/licenses/FLIRC.txt b/licenses/FLIRC.txt new file mode 100644 index 0000000000..d135582636 --- /dev/null +++ b/licenses/FLIRC.txt @@ -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. + */ diff --git a/packages/addons/addon-depends/hidapi/package.mk b/packages/addons/addon-depends/hidapi/package.mk index 55025d6e5e..bee13ef94b 100644 --- a/packages/addons/addon-depends/hidapi/package.mk +++ b/packages/addons/addon-depends/hidapi/package.mk @@ -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" diff --git a/packages/addons/tools/flirc_util/changelog.txt b/packages/addons/tools/flirc_util/changelog.txt new file mode 100644 index 0000000000..927b2407d4 --- /dev/null +++ b/packages/addons/tools/flirc_util/changelog.txt @@ -0,0 +1 @@ +initial release diff --git a/packages/addons/tools/flirc_util/icon/icon.png b/packages/addons/tools/flirc_util/icon/icon.png new file mode 100644 index 0000000000..8976d44345 Binary files /dev/null and b/packages/addons/tools/flirc_util/icon/icon.png differ diff --git a/packages/addons/tools/flirc_util/package.mk b/packages/addons/tools/flirc_util/package.mk new file mode 100644 index 0000000000..7b3febddf9 --- /dev/null +++ b/packages/addons/tools/flirc_util/package.mk @@ -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 +} diff --git a/packages/addons/tools/flirc_util/source/default.py b/packages/addons/tools/flirc_util/source/default.py new file mode 100644 index 0000000000..e833d8f43e --- /dev/null +++ b/packages/addons/tools/flirc_util/source/default.py @@ -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') +