mirror of
https://github.com/LibreELEC/LibreELEC.tv
synced 2025-09-24 19:46:01 +07:00
Compare commits
184 Commits
8.2.0.1
...
libreelec-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1085837ff4 | ||
|
|
3e7d83fb28 | ||
|
|
df9145c250 | ||
|
|
0f6857592b | ||
|
|
4b72147729 | ||
|
|
b79a481ec1 | ||
|
|
7dd1701a10 | ||
|
|
c1d41509e2 | ||
|
|
7056afe53c | ||
|
|
7a7fbb53ee | ||
|
|
ccaaa92373 | ||
|
|
ff268e9b33 | ||
|
|
4ef6e2f76e | ||
|
|
6383674424 | ||
|
|
b3800a65ba | ||
|
|
f5682418ca | ||
|
|
1da6210ae8 | ||
|
|
0897730e8b | ||
|
|
05e240629f | ||
|
|
ff5a954789 | ||
|
|
0d0b97b056 | ||
|
|
6fa338ae66 | ||
|
|
57e48ebe38 | ||
|
|
06889551af | ||
|
|
d78fddb53a | ||
|
|
0909b9af59 | ||
|
|
f0574c4a9c | ||
|
|
6c4205385f | ||
|
|
0beeae963d | ||
|
|
ff97658a8f | ||
|
|
9dd59338ab | ||
|
|
bc574b113f | ||
|
|
b41e26f2a2 | ||
|
|
910572926e | ||
|
|
7d18736d61 | ||
|
|
9f8b751427 | ||
|
|
a5812da71b | ||
|
|
57a13951db | ||
|
|
cb6b3b7004 | ||
|
|
a9aebc1fe1 | ||
|
|
da19c99313 | ||
|
|
c0a875f8d1 | ||
|
|
c2d7588fe7 | ||
|
|
143da3b8ea | ||
|
|
5d2db97d15 | ||
|
|
797d67328b | ||
|
|
8bf057fa5a | ||
|
|
dc67a68048 | ||
|
|
f5ad74f95b | ||
|
|
ce567c2840 | ||
|
|
d125c30462 | ||
|
|
35e7220fd5 | ||
|
|
4bbc0f1113 | ||
|
|
311920c236 | ||
|
|
71e8adf3d3 | ||
|
|
0b633b79d1 | ||
|
|
934507d922 | ||
|
|
cff5b35dfe | ||
|
|
219d51e9c1 | ||
|
|
192bec10e6 | ||
|
|
7fd53f39c3 | ||
|
|
db6d5abd8a | ||
|
|
f3bd3fab9e | ||
|
|
484c478fe5 | ||
|
|
a32ed80de7 | ||
|
|
c6d901a444 | ||
|
|
535a924d30 | ||
|
|
91718a8461 | ||
|
|
4251fbeebf | ||
|
|
e98bb26824 | ||
|
|
b37646d107 | ||
|
|
f93675c674 | ||
|
|
fba45a585d | ||
|
|
e0dc115e44 | ||
|
|
c1bcdb5728 | ||
|
|
84fe69fefe | ||
|
|
5b67d0cbd6 | ||
|
|
f42ef70c4b | ||
|
|
1c719410ad | ||
|
|
026c467429 | ||
|
|
c59dc5256a | ||
|
|
d0352cb74a | ||
|
|
a76d1275a9 | ||
|
|
e16e263fb9 | ||
|
|
eacd50cbc6 | ||
|
|
fe39836041 | ||
|
|
23c5398ba5 | ||
|
|
87430084aa | ||
|
|
eee50c694c | ||
|
|
bdfc710974 | ||
|
|
98ace83f5b | ||
|
|
12174ee961 | ||
|
|
8bdd6863ad | ||
|
|
59c60c679c | ||
|
|
754d7fce84 | ||
|
|
405ab3fe30 | ||
|
|
ca20c72f08 | ||
|
|
1e54f6b690 | ||
|
|
c8c57fba6e | ||
|
|
cc4d220911 | ||
|
|
72580f1e82 | ||
|
|
8ade757f2b | ||
|
|
780de86d69 | ||
|
|
b55e08ea15 | ||
|
|
1e0100a45f | ||
|
|
2d2999fcf0 | ||
|
|
e29118865b | ||
|
|
dd508b24a7 | ||
|
|
34aa4b9b41 | ||
|
|
e0d690a2fc | ||
|
|
1a141e73fc | ||
|
|
05abd4a02f | ||
|
|
9667591332 | ||
|
|
92ccbd743a | ||
|
|
e41deb8256 | ||
|
|
fb92e8efc9 | ||
|
|
3e68c62f1c | ||
|
|
bf824be3c7 | ||
|
|
c3d292f978 | ||
|
|
ed3143fffe | ||
|
|
71060aaf91 | ||
|
|
23a4479aff | ||
|
|
66c4137a90 | ||
|
|
b265100ed7 | ||
|
|
59ebfda677 | ||
|
|
728a03c9c5 | ||
|
|
0793708613 | ||
|
|
615e4bda1e | ||
|
|
5332b5dd90 | ||
|
|
00ba45170f | ||
|
|
4bd00ea49b | ||
|
|
e8708f0772 | ||
|
|
e882c649fe | ||
|
|
a09b8ea227 | ||
|
|
3c6b246da1 | ||
|
|
0dc0085d12 | ||
|
|
501d64503f | ||
|
|
ce9deb7aa7 | ||
|
|
0ddf2aa42e | ||
|
|
1951715877 | ||
|
|
83282b6af0 | ||
|
|
d019b64b78 | ||
|
|
fb3975758f | ||
|
|
2b3c251900 | ||
|
|
332ab42cc7 | ||
|
|
9ab6b71716 | ||
|
|
469f1829c1 | ||
|
|
ec759de239 | ||
|
|
18581f3006 | ||
|
|
2a5e229a20 | ||
|
|
c3b52d6284 | ||
|
|
fd8aa6610d | ||
|
|
57afce6129 | ||
|
|
110ea515dc | ||
|
|
861bb0e445 | ||
|
|
ec446e21ef | ||
|
|
c7d8093c6b | ||
|
|
ba0a2ec358 | ||
|
|
07aa491253 | ||
|
|
00437c4c8d | ||
|
|
2509ccd743 | ||
|
|
4d9caffbe4 | ||
|
|
e39892557d | ||
|
|
e347b69d0e | ||
|
|
f20200dad3 | ||
|
|
cb7c0c9361 | ||
|
|
4ca25d29a7 | ||
|
|
2dab8326c4 | ||
|
|
169ebdb762 | ||
|
|
fcfa9a9d9c | ||
|
|
ed3ea1d53d | ||
|
|
de9a2ba961 | ||
|
|
a24745c9be | ||
|
|
bad81a508e | ||
|
|
bfa4e8d74b | ||
|
|
d2a7c9c5d2 | ||
|
|
24fb463fda | ||
|
|
63f25a2f8a | ||
|
|
c9695b5868 | ||
|
|
aade987f76 | ||
|
|
d8f951533a | ||
|
|
f840cb7ecf | ||
|
|
b384e473b5 | ||
|
|
5d50feac62 |
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"partitions": [
|
||||
{
|
||||
"label": "@DISTRONAME@_@PROJECT@_System",
|
||||
"label": "System",
|
||||
"filesystem_type": "FAT",
|
||||
"partition_size_nominal": @SYSTEM_SIZE@,
|
||||
"want_maximised": false,
|
||||
@@ -9,7 +9,7 @@
|
||||
"mkfs_options": ""
|
||||
},
|
||||
{
|
||||
"label": "@DISTRONAME@_@PROJECT@_Storage",
|
||||
"label": "Storage",
|
||||
"filesystem_type": "ext4",
|
||||
"partition_size_nominal": 512,
|
||||
"want_maximised": true,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# VERSION: set full version, use "devel" for development version
|
||||
LIBREELEC_VERSION="8.2.0.1"
|
||||
LIBREELEC_VERSION="devel"
|
||||
|
||||
# OS_VERSION: OS Version
|
||||
OS_VERSION="8.2"
|
||||
|
||||
23
licenses/BSL.txt
Normal file
23
licenses/BSL.txt
Normal file
@@ -0,0 +1,23 @@
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
Permission is hereby granted, free of charge, to any person or organization
|
||||
obtaining a copy of the software and accompanying documentation covered by
|
||||
this license (the "Software") to use, reproduce, display, distribute,
|
||||
execute, and transmit the Software, and to prepare derivative works of the
|
||||
Software, and to permit third-parties to whom the Software is furnished to
|
||||
do so, all subject to the following:
|
||||
|
||||
The copyright notices in the Software and this entire statement, including
|
||||
the above license grant, this restriction and the following disclaimer,
|
||||
must be included in all copies of the Software, in whole or in part, and
|
||||
all derivative works of the Software, unless such copies or derivative
|
||||
works are solely in the form of machine-executable object code generated by
|
||||
a source language processor.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="Adafruit_Python_ADS1x15"
|
||||
PKG_VERSION="733d179"
|
||||
PKG_VERSION="a963cc0"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="https://github.com/adafruit/${PKG_NAME}"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="Adafruit_Python_ADXL345"
|
||||
PKG_VERSION="b153663"
|
||||
PKG_VERSION="dca3d90"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="https://github.com/adafruit/${PKG_NAME}"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="Adafruit_Python_BMP"
|
||||
PKG_VERSION="ad6521d"
|
||||
PKG_VERSION="4e89e32"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="https://github.com/adafruit/${PKG_NAME}"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="Adafruit_Python_CharLCD"
|
||||
PKG_VERSION="e5952eb"
|
||||
PKG_VERSION="bc75cad"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="https://github.com/adafruit/${PKG_NAME}"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="Adafruit_Python_DHT"
|
||||
PKG_VERSION="310c59b"
|
||||
PKG_VERSION="a609d7d"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="https://github.com/adafruit/${PKG_NAME}"
|
||||
@@ -40,10 +40,6 @@ esac
|
||||
pre_make_target() {
|
||||
export PYTHONXCPREFIX="$SYSROOT_PREFIX/usr"
|
||||
export LDSHARED="$CC -shared"
|
||||
|
||||
sed -e 's/from ez_setup import use_setuptools/\#from ez_setup import use_setuptools/' \
|
||||
-e 's/use_setuptools()/\#use_setuptools()/' \
|
||||
-i setup.py
|
||||
}
|
||||
|
||||
make_target() {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="Adafruit_Python_GPIO"
|
||||
PKG_VERSION="fdf0fca"
|
||||
PKG_VERSION="c543d1d"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="https://github.com/adafruit/${PKG_NAME}"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="Adafruit_Python_LED_Backpack"
|
||||
PKG_VERSION="d3bd401"
|
||||
PKG_VERSION="e34b954"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="https://github.com/adafruit/${PKG_NAME}"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="Adafruit_Python_LSM303"
|
||||
PKG_VERSION="03b344d"
|
||||
PKG_VERSION="81bcc12"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="https://github.com/adafruit/${PKG_NAME}"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="Adafruit_Python_MCP3008"
|
||||
PKG_VERSION="705f090"
|
||||
PKG_VERSION="e721d26"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="https://github.com/adafruit/${PKG_NAME}"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="Adafruit_Python_MCP4725"
|
||||
PKG_VERSION="5b5fc87"
|
||||
PKG_VERSION="8a30e5e"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="https://github.com/adafruit/${PKG_NAME}"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="Adafruit_Python_PCA9685"
|
||||
PKG_VERSION="bfa4851"
|
||||
PKG_VERSION="f86db2c"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="https://github.com/adafruit/${PKG_NAME}"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="Adafruit_Python_PureIO"
|
||||
PKG_VERSION="a29d95a"
|
||||
PKG_VERSION="5e952c2"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="https://github.com/adafruit/${PKG_NAME}"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="Adafruit_Python_SI1145"
|
||||
PKG_VERSION="cbc6c62"
|
||||
PKG_VERSION="18c4006"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="https://github.com/THP-JOE/Python_SI1145"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="Adafruit_Python_TCS34725"
|
||||
PKG_VERSION="4ff05a3"
|
||||
PKG_VERSION="6306f90"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="https://github.com/adafruit/${PKG_NAME}"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="Adafruit_Python_VCNL40xx"
|
||||
PKG_VERSION="e54bff9"
|
||||
PKG_VERSION="3c59be5"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="https://github.com/adafruit/${PKG_NAME}"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="Adafruit_Python_WS2801"
|
||||
PKG_VERSION="699426a"
|
||||
PKG_VERSION="d0c1907"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="https://github.com/adafruit/${PKG_NAME}"
|
||||
|
||||
37
packages/addons/addon-depends/ccid/package.mk
Normal file
37
packages/addons/addon-depends/ccid/package.mk
Normal file
@@ -0,0 +1,37 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2017-present Team LibreELEC
|
||||
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="ccid"
|
||||
PKG_VERSION="1.4.28"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="LGPL"
|
||||
PKG_SITE="http://pcsclite.alioth.debian.org/ccid.html"
|
||||
PKG_URL="https://alioth.debian.org/frs/download.php/latestfile/112/${PKG_NAME}-${PKG_VERSION}.tar.bz2"
|
||||
PKG_DEPENDS_TARGET="toolchain pcsc-lite"
|
||||
PKG_SECTION="driver"
|
||||
PKG_SHORTDESC="CCID free software driver"
|
||||
PKG_LONGDESC="CCID free software driver"
|
||||
PKG_AUTORECONF="yes"
|
||||
|
||||
PKG_CONFIGURE_OPTS_TARGET="--enable-static --enable-twinserial"
|
||||
|
||||
make_target() {
|
||||
make
|
||||
make -C src/ Info.plist
|
||||
}
|
||||
@@ -17,12 +17,11 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="rust"
|
||||
PKG_VERSION="1.20.0"
|
||||
PKG_VERSION="1.26.0"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="https://www.rust-lang.org"
|
||||
PKG_URL=""
|
||||
PKG_DEPENDS="toolchain"
|
||||
PKG_DEPENDS_TARGET="toolchain rustup.rs"
|
||||
PKG_SECTION="devel"
|
||||
PKG_LONGDESC="Rust is a systems programming language that runs blazingly fast, prevents segfaults, and guarantees thread safety."
|
||||
PKG_IS_ADDON="no"
|
||||
@@ -42,7 +41,7 @@ make_target() {
|
||||
export RUSTUP_HOME="$CARGO_HOME"
|
||||
export PATH="$CARGO_HOME/bin:$PATH"
|
||||
rm -rf "$CARGO_HOME"
|
||||
curl https://sh.rustup.rs -sSf | sh -s -- --no-modify-path -y
|
||||
$(get_build_dir rustup.rs)/rustup-init.sh --no-modify-path -y
|
||||
rustup default "$PKG_VERSION"
|
||||
case "$TARGET_ARCH" in
|
||||
aarch64)
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2018-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="rustup.rs"
|
||||
PKG_VERSION="1.3.0"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="https://www.rust-lang.org"
|
||||
PKG_URL="https://github.com/rust-lang-nursery/rustup.rs/archive/$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_SECTION="devel"
|
||||
PKG_LONGDESC="The Rust toolchain installer."
|
||||
PKG_IS_ADDON="no"
|
||||
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
|
||||
configure_target() {
|
||||
:
|
||||
}
|
||||
|
||||
make_target() {
|
||||
:
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
:
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
From 299427ade578adb04a761ebbe7aacc07367fe37a Mon Sep 17 00:00:00 2001
|
||||
From: TitanSnow <sweeto@live.cn>
|
||||
Date: Sat, 21 Oct 2017 13:08:33 +0800
|
||||
Subject: [PATCH 1/2] fallbacks to wget if curl not installed
|
||||
|
||||
modify 'rustup-init.sh' to support wget
|
||||
if curl not installed. This situation
|
||||
often happens on some linux distribution.
|
||||
---
|
||||
rustup-init.sh | 28 ++++++++++++++++++++++++----
|
||||
1 file changed, 24 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/rustup-init.sh b/rustup-init.sh
|
||||
index 7e089a1fb..a33a31377 100755
|
||||
--- a/rustup-init.sh
|
||||
+++ b/rustup-init.sh
|
||||
@@ -9,8 +9,8 @@
|
||||
# option. This file may not be copied, modified, or distributed
|
||||
# except according to those terms.
|
||||
|
||||
-# This is just a little script that can be curled from the internet to
|
||||
-# install rustup. It just does platform detection, curls the installer
|
||||
+# This is just a little script that can be downloaded from the internet to
|
||||
+# install rustup. It just does platform detection, downloads the installer
|
||||
# and runs it.
|
||||
|
||||
set -u
|
||||
@@ -41,8 +41,8 @@ EOF
|
||||
}
|
||||
|
||||
main() {
|
||||
+ downloader --check
|
||||
need_cmd uname
|
||||
- need_cmd curl
|
||||
need_cmd mktemp
|
||||
need_cmd chmod
|
||||
need_cmd mkdir
|
||||
@@ -100,7 +100,7 @@ main() {
|
||||
fi
|
||||
|
||||
ensure mkdir -p "$_dir"
|
||||
- ensure curl -sSfL "$_url" -o "$_file"
|
||||
+ ensure downloader "$_url" "$_file"
|
||||
ensure chmod u+x "$_file"
|
||||
if [ ! -x "$_file" ]; then
|
||||
printf '%s\n' "Cannot execute $_file (likely because of mounting /tmp as noexec)." 1>&2
|
||||
@@ -359,4 +359,24 @@ ignore() {
|
||||
"$@"
|
||||
}
|
||||
|
||||
+# This wraps curl or wget. Try curl first, if not installed,
|
||||
+# use wget instead.
|
||||
+downloader() {
|
||||
+ if command -v curl > /dev/null 2>&1
|
||||
+ then _dld=curl
|
||||
+ elif command -v wget > /dev/null 2>&1
|
||||
+ then _dld=wget
|
||||
+ else _dld='curl or wget' # to be used in error message of need_cmd
|
||||
+ fi
|
||||
+
|
||||
+ if [ "$1" = --check ]
|
||||
+ then need_cmd "$_dld"
|
||||
+ elif [ "$_dld" = curl ]
|
||||
+ then curl -sSfL "$1" -o "$2"
|
||||
+ elif [ "$_dld" = wget ]
|
||||
+ then wget "$1" -O "$2"
|
||||
+ else err "Unknown downloader" # should not reach here
|
||||
+ fi
|
||||
+}
|
||||
+
|
||||
main "$@" || exit 1
|
||||
|
||||
From faa08bd786b7282500cc4162a2f428484c891130 Mon Sep 17 00:00:00 2001
|
||||
From: Tibo <delor.thibault@gmail.com>
|
||||
Date: Thu, 8 Mar 2018 16:41:19 +1100
|
||||
Subject: [PATCH 2/2] Avoid duplication of command -v
|
||||
|
||||
---
|
||||
rustup-init.sh | 11 ++++++++---
|
||||
1 file changed, 8 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/rustup-init.sh b/rustup-init.sh
|
||||
index a33a31377..e874aa7a3 100755
|
||||
--- a/rustup-init.sh
|
||||
+++ b/rustup-init.sh
|
||||
@@ -331,11 +331,16 @@ err() {
|
||||
}
|
||||
|
||||
need_cmd() {
|
||||
- if ! command -v "$1" > /dev/null 2>&1
|
||||
+ if ! check_cmd "$1"
|
||||
then err "need '$1' (command not found)"
|
||||
fi
|
||||
}
|
||||
|
||||
+check_cmd() {
|
||||
+ command -v "$1" > /dev/null 2>&1
|
||||
+ return $?
|
||||
+}
|
||||
+
|
||||
need_ok() {
|
||||
if [ $? != 0 ]; then err "$1"; fi
|
||||
}
|
||||
@@ -362,9 +367,9 @@ ignore() {
|
||||
# This wraps curl or wget. Try curl first, if not installed,
|
||||
# use wget instead.
|
||||
downloader() {
|
||||
- if command -v curl > /dev/null 2>&1
|
||||
+ if check_cmd curl
|
||||
then _dld=curl
|
||||
- elif command -v wget > /dev/null 2>&1
|
||||
+ elif check_cmd wget
|
||||
then _dld=wget
|
||||
else _dld='curl or wget' # to be used in error message of need_cmd
|
||||
fi
|
||||
@@ -1,6 +1,6 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016 Team LibreELEC
|
||||
# Copyright (C) 2016-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -17,12 +17,12 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="squeezelite"
|
||||
PKG_VERSION="a3d95ec"
|
||||
PKG_VERSION="e92c09c"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPLv3"
|
||||
PKG_SITE="https://github.com/ralph-irving/squeezelite"
|
||||
PKG_URL="https://github.com/ralph-irving/squeezelite/archive/$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain faad2 ffmpeg flac libmad libvorbis mpg123 soxr"
|
||||
PKG_DEPENDS_TARGET="toolchain faad2 ffmpeg flac libmad libvorbis mpg123 soxr libogg"
|
||||
PKG_SECTION="tools"
|
||||
PKG_SHORTDESC="squeezelite"
|
||||
PKG_LONGDESC="A client for the Logitech Media Server"
|
||||
@@ -31,9 +31,9 @@ PKG_IS_ADDON="no"
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
pre_make_target() {
|
||||
OPTS="-DDSD -DFFMPEG -DRESAMPLE -DVISEXPORT"
|
||||
OPTS="-DDSD -DFFMPEG -DRESAMPLE -DVISEXPORT -DLINKALL"
|
||||
CFLAGS="$CFLAGS $OPTS"
|
||||
LDFLAGS="$LDFLAGS -lasound -lpthread -lm -lrt -lFLAC -lmad -lvorbisfile -lfaad -lmpg123"
|
||||
LDFLAGS="$LDFLAGS -lasound -lpthread -lm -lrt -lFLAC -lmad -lvorbisfile -lfaad -lmpg123 -lvorbis -logg"
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://LibreELEC.tv
|
||||
# Copyright (C) 2016 Team LibreELEC
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -17,21 +17,19 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="pcsc-lite"
|
||||
PKG_VERSION="1.8.16"
|
||||
PKG_VERSION="1.8.22"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://pcsclite.alioth.debian.org/pcsclite.html"
|
||||
PKG_URL="https://alioth.debian.org/frs/download.php/file/4164/${PKG_NAME}-${PKG_VERSION}.tar.bz2"
|
||||
PKG_URL="https://alioth.debian.org/frs/download.php/latestfile/39/${PKG_NAME}-${PKG_VERSION}.tar.bz2"
|
||||
PKG_DEPENDS_TARGET="toolchain libusb"
|
||||
PKG_SECTION="service/system"
|
||||
PKG_SHORTDESC="Middleware to access a smart card using SCard API (PC/SC)"
|
||||
PKG_LONGDESC="Middleware to access a smart card using SCard API (PC/SC)"
|
||||
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
PKG_CONFIGURE_OPTS_TARGET="--disable-shared \
|
||||
--enable-static \
|
||||
--disable-libudev \
|
||||
--enable-libusb \
|
||||
--enable-usbdropdir=/storage/.kodi/addons/service.system.pcscd-addon/drivers"
|
||||
--enable-usbdropdir=/storage/.kodi/addons/service.pcscd/drivers"
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2018-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="aixlog"
|
||||
PKG_VERSION="1.2.1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="https://github.com/badaix/aixlog"
|
||||
PKG_URL="https://github.com/badaix/aixlog/archive/v$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_SECTION="tools"
|
||||
PKG_LONGDESC="Header-only C++ logging library"
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_USE_CMAKE="no"
|
||||
|
||||
make_target() {
|
||||
:
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
:
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2018-present Team LibreELEC
|
||||
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="alsa-plugins"
|
||||
PKG_VERSION="1.1.6"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.alsa-project.org/"
|
||||
PKG_URL="ftp://ftp.alsa-project.org/pub/plugins/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
||||
PKG_DEPENDS_TARGET="toolchain alsa-lib"
|
||||
PKG_LONGDESC="Alsa plugins"
|
||||
|
||||
if [ "$PULSEAUDIO_SUPPORT" = yes ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET pulseaudio"
|
||||
SUBDIR_PULSEAUDIO="pulse"
|
||||
fi
|
||||
|
||||
PKG_CONFIGURE_OPTS_TARGET="--with-plugindir=/usr/lib/alsa"
|
||||
PKG_MAKE_OPTS_TARGET="SUBDIRS=$SUBDIR_PULSEAUDIO"
|
||||
PKG_MAKEINSTALL_OPTS_TARGET="SUBDIRS=$SUBDIR_PULSEAUDIO"
|
||||
@@ -0,0 +1,37 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2018-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="asio"
|
||||
PKG_VERSION="1-12-0"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="BSL"
|
||||
PKG_SITE="http://think-async.com/Asio"
|
||||
PKG_URL="https://github.com/chriskohlhoff/asio/archive/asio-$PKG_VERSION.zip"
|
||||
PKG_SOURCE_DIR="asio-asio-$PKG_VERSION"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_SECTION="tools"
|
||||
PKG_LONGDESC="Asio C++ Library"
|
||||
PKG_IS_ADDON="no"
|
||||
|
||||
make_target() {
|
||||
:
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
:
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2018-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="popl"
|
||||
PKG_VERSION="1.2.0"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPLv3"
|
||||
PKG_SITE="https://github.com/badaix/popl"
|
||||
PKG_URL="https://github.com/badaix/popl/archive/v$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_SECTION="tools"
|
||||
PKG_LONGDESC="Header-only C++ program options parser library"
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_USE_CMAKE="no"
|
||||
|
||||
make_target() {
|
||||
:
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
:
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2018-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="shairport-sync"
|
||||
PKG_VERSION="3.2"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="OSS"
|
||||
PKG_SITE="https://github.com/mikebrady/shairport-sync"
|
||||
PKG_URL="https://github.com/mikebrady/shairport-sync/archive/$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain alsa-lib avahi libconfig libdaemon openssl popt pulseaudio soxr"
|
||||
PKG_SECTION="tools"
|
||||
PKG_LONGDESC="AirPlay audio player"
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_AUTORECONF="yes"
|
||||
|
||||
PKG_CONFIGURE_OPTS_TARGET="--with-alsa \
|
||||
--with-avahi \
|
||||
--with-convolution \
|
||||
--with-metadata \
|
||||
--with-pa \
|
||||
--with-pipe \
|
||||
--with-soxr \
|
||||
--with-ssl=openssl \
|
||||
--with-stdout"
|
||||
|
||||
makeinstall_target() {
|
||||
:
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2018-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="snapcast"
|
||||
PKG_VERSION="0.15.0"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPLv3"
|
||||
PKG_SITE="https://github.com/badaix/snapcast"
|
||||
PKG_URL="https://github.com/badaix/snapcast/archive/v$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain aixlog alsa-lib asio avahi flac libvorbis popl"
|
||||
PKG_SECTION="tools"
|
||||
PKG_LONGDESC="Synchronous multi-room audio player"
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_USE_CMAKE="no"
|
||||
|
||||
pre_configure_target() {
|
||||
cd ..
|
||||
rm -rf .$TARGET_NAME
|
||||
CXXFLAGS="$CXXFLAGS -pthread \
|
||||
-I$(get_build_dir aixlog)/include \
|
||||
-I$(get_build_dir asio)/asio/include \
|
||||
-I$(get_build_dir popl)/include"
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
:
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
--- snapcast-0.14.0/client/Makefile 2018-04-27 19:43:25.000000000 +0200
|
||||
+++ snapcast-0.14.0.makefiles/client/Makefile 2018-05-21 13:14:12.388757526 +0200
|
||||
@@ -78,10 +78,8 @@
|
||||
|
||||
else
|
||||
|
||||
-CXX = g++
|
||||
-STRIP = strip
|
||||
CXXFLAGS += -pthread -DHAS_VORBIS -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON
|
||||
-LDFLAGS += -lrt -lasound -lvorbis -lavahi-client -lavahi-common -static-libgcc -static-libstdc++ -latomic
|
||||
+LDFLAGS += -lrt -lasound -lvorbis -lavahi-client -lavahi-common -logg
|
||||
OBJ += ../common/daemon.o player/alsaPlayer.o browseZeroConf/browseAvahi.o
|
||||
|
||||
endif
|
||||
diff -Naur snapcast-0.14.0/server/Makefile snapcast-0.14.0.makefiles/server/Makefile
|
||||
--- snapcast-0.14.0/server/Makefile 2018-04-27 19:43:25.000000000 +0200
|
||||
+++ snapcast-0.14.0.makefiles/server/Makefile 2018-05-21 13:14:56.881206277 +0200
|
||||
@@ -84,10 +84,8 @@
|
||||
|
||||
else
|
||||
|
||||
-CXX = g++
|
||||
-STRIP = strip
|
||||
CXXFLAGS += -DHAS_AVAHI -DHAS_DAEMON -pthread
|
||||
-LDFLAGS += -lrt -lavahi-client -lavahi-common -static-libgcc -static-libstdc++
|
||||
+LDFLAGS += -lrt -lavahi-client -lavahi-common -logg
|
||||
OBJ += ../common/daemon.o publishZeroConf/publishAvahi.o
|
||||
|
||||
endif
|
||||
@@ -0,0 +1,28 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2018-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="miniupnpc"
|
||||
PKG_VERSION="2.0.20180222"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="BSD"
|
||||
PKG_SITE="http://miniupnp.free.fr"
|
||||
PKG_URL="http://miniupnp.free.fr/files/$PKG_NAME-$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_LONGDESC="The MiniUPnP project offers software which supports the UPnP Internet Gateway Device (IGD) specifications"
|
||||
|
||||
PKG_CMAKE_OPTS_TARGET="-DUPNPC_BUILD_SHARED=OFF -DUPNPC_BUILD_STATIC=ON"
|
||||
@@ -1,3 +1,7 @@
|
||||
104
|
||||
- use new output from mediaclient
|
||||
use xmlstartlet to parse settings.xml file
|
||||
|
||||
103
|
||||
- once a serial number is in config file then ir_disabled parameter
|
||||
needs to be localized below it (it is not global parameter anymore)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
PKG_NAME="sundtek-mediatv"
|
||||
PKG_VERSION="7.0"
|
||||
PKG_REV="103"
|
||||
PKG_REV="104"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="nonfree"
|
||||
PKG_SITE="http://support.sundtek.com/"
|
||||
|
||||
@@ -67,7 +67,15 @@ fi
|
||||
[ ! -f $SUNDTEK_ADDON_HOME/rc_key_ok.map ] && mv $SUNDTEK_ADDON_HOME/rc_key_ok $SUNDTEK_ADDON_HOME/rc_key_ok.map
|
||||
|
||||
mkdir -p /var/config
|
||||
cat "$SUNDTEK_ADDON_SETTINGS" | awk -F\" '{print $2"=\""$4"\""}' | sed '/^=/d' > /var/config/sundtek-addon.conf
|
||||
|
||||
# check settings version
|
||||
XML_SETTINGS_VER="$(xmlstarlet sel -t -m settings -v @version $SUNDTEK_ADDON_SETTINGS)"
|
||||
if [ "$XML_SETTINGS_VER" = "2" ]; then
|
||||
xmlstarlet sel -t -m settings/setting -v @id -o "=\"" -v . -o "\"" -n "$SUNDTEK_ADDON_SETTINGS" > /var/config/sundtek-addon.conf
|
||||
else
|
||||
xmlstarlet sel -t -m settings -m setting -v @id -o "=\"" -v @value -o "\"" -n "$SUNDTEK_ADDON_SETTINGS" > /var/config/sundtek-addon.conf
|
||||
fi
|
||||
|
||||
. /var/config/sundtek-addon.conf
|
||||
|
||||
# check if there is new driver on web
|
||||
@@ -186,7 +194,7 @@ if [ -z "$(pidof mediasrv)" ]; then
|
||||
KEYMAP=$(eval echo \$ATTACHED_TUNER_${SERIAL}_KEYMAP)
|
||||
|
||||
if [ "$DVBMODE" = "DVB-T" ]; then
|
||||
# only set DVB-T because default is DVB-C (and DVB-S is not set either)
|
||||
# only set DVB-T because default is DVB-C (and DVB-S/S2 is not set either)
|
||||
DVBMODE="DVBT"
|
||||
else
|
||||
DVBMODE=""
|
||||
|
||||
@@ -77,7 +77,7 @@ def get_devices_sundtek(mediaclient_e):
|
||||
str = line.strip()
|
||||
if str.startswith('device '):
|
||||
name = str[str.find("[")+1:str.find("]")]
|
||||
tuners.append([name, 0, 's'])
|
||||
tuners.append([name, 0, []])
|
||||
|
||||
if str.startswith('[SERIAL]:'):
|
||||
line = p.readline()
|
||||
@@ -85,20 +85,31 @@ def get_devices_sundtek(mediaclient_e):
|
||||
if str.startswith('ID:'):
|
||||
id = str.split(':');
|
||||
id = id[1].strip()
|
||||
tuners[len(tuners)-1] = [name, id, 's']
|
||||
tuners[len(tuners)-1][1] = id
|
||||
|
||||
if str.startswith('[DVB'):
|
||||
types_arr = tuners[len(tuners)-1][2]
|
||||
str = str.translate(None, '[]:')
|
||||
types = str.split(",")
|
||||
for i in range(len(types)):
|
||||
if types[i] == 'DVB-C':
|
||||
types_arr.append('c')
|
||||
elif types[i] == 'DVB-T':
|
||||
types_arr.append('t')
|
||||
elif types[i] == 'DVB-T2':
|
||||
types_arr.append('t2')
|
||||
elif types[i] == 'DVB-S/S2':
|
||||
types_arr.append('s')
|
||||
|
||||
tuners[len(tuners)-1][2] = types_arr
|
||||
|
||||
if str.startswith('[DVB-C]:'):
|
||||
tuners[len(tuners)-1] = [name, id, 'c']
|
||||
elif str.startswith('[DVB-T]:'):
|
||||
tuners[len(tuners)-1] = [name, id, 'c']
|
||||
elif str.startswith('[DVB-T2]:'):
|
||||
tuners[len(tuners)-1] = [name, id, 'c']
|
||||
except IOError:
|
||||
print 'Error getting sundtek tuners info'
|
||||
return tuners
|
||||
|
||||
"""
|
||||
root ~ # mediaclient -e
|
||||
|
||||
**** List of Media Hardware Devices ****
|
||||
device 0: [Sundtek MediaTV Pro (USB 2.0)] DVB-C, DVB-T, ANALOG-TV, FM-RADIO, REMOTE-CONTROL, OSS-AUDIO, RDS
|
||||
[BUS]:
|
||||
@@ -123,6 +134,21 @@ device 0: [Sundtek MediaTV Pro (USB 2.0)] DVB-C, DVB-T, ANALOG-TV, FM-RADIO, RE
|
||||
INPUT0: /dev/mediainput0
|
||||
[OSS]:
|
||||
OSS0: /dev/dsp0
|
||||
|
||||
**** List of Media Hardware Devices ****
|
||||
device 0: [MediaTV Digital Home III (EU)] DVB-C, DVB-T, DVB-T2, REMOTE-CONTROL
|
||||
[INFO]:
|
||||
STATUS: STANDBY
|
||||
[BUS]:
|
||||
ID: 2-5
|
||||
[SERIAL]:
|
||||
ID: U170130193421
|
||||
[DVB-C,DVB-T,DVB-T2]:
|
||||
FRONTEND: /dev/dvb/adapter0/frontend0
|
||||
DVR: /dev/dvb/adapter0/dvr0
|
||||
DMX: /dev/dvb/adapter0/demux0
|
||||
[REMOTECONTROL]:
|
||||
INPUT0: /dev/mediainput0
|
||||
"""
|
||||
|
||||
######################################################################################################
|
||||
@@ -182,19 +208,42 @@ def add_sundtek(xmldoc, node_cat, tuners):
|
||||
for ix, tuner in enumerate(tuners):
|
||||
tuner_name = tuner[0]
|
||||
tuner_serial = tuner[1]
|
||||
tuner_type = tuner[2]
|
||||
tuner_types = tuner[2]
|
||||
|
||||
node1 = xmldoc.createElement("setting")
|
||||
node1.setAttribute("id", 'ATTACHED_TUNER_' + tuner_serial + '_DVBMODE')
|
||||
node1.setAttribute("label", tuner_name + ", " + tuner_serial)
|
||||
node1.setAttribute("type", 'labelenum')
|
||||
|
||||
if (tuner_type == 's'):
|
||||
node1.setAttribute("default", 'DVB-S')
|
||||
node1.setAttribute("values", 'DVB-S')
|
||||
if len(tuner_types) == 0:
|
||||
values = 'unkn'
|
||||
default = 'unkn'
|
||||
else:
|
||||
node1.setAttribute("default", 'DVB-C')
|
||||
node1.setAttribute("values", 'DVB-C|DVB-T')
|
||||
values = ''
|
||||
default = ''
|
||||
|
||||
for ix, type in enumerate(tuner_types):
|
||||
if type == 'c':
|
||||
type_str = 'DVB-C'
|
||||
elif type == 't':
|
||||
type_str = 'DVB-T'
|
||||
elif type == 't2':
|
||||
type_str = 'DVB-T2'
|
||||
elif type == 's':
|
||||
type_str = 'DVB-S/S2'
|
||||
else:
|
||||
type_str = 'unkn'
|
||||
|
||||
if not default: # first one
|
||||
default = type_str;
|
||||
|
||||
if ix == 0:
|
||||
values = type_str
|
||||
else:
|
||||
values = values + '|' + type_str
|
||||
|
||||
node1.setAttribute("default", default)
|
||||
node1.setAttribute("values", values)
|
||||
|
||||
node_cat.appendChild(node1)
|
||||
|
||||
@@ -237,7 +286,7 @@ def add_new_tuners(xmldoc, tuners, which):
|
||||
def save_settings(settings_xml, xmldoc):
|
||||
try:
|
||||
outputfile = open(settings_xml, 'w')
|
||||
xmlpp.pprint(xmldoc.toxml(), output = outputfile, indent=2)
|
||||
xmlpp.pprint(xmldoc.toxml(), output = outputfile, indent=2, width=500)
|
||||
outputfile.close()
|
||||
except IOError:
|
||||
print 'Error saving file:', settings_xml
|
||||
|
||||
@@ -1,6 +1,25 @@
|
||||
8.0.101
|
||||
102
|
||||
updated libraries:
|
||||
- Adafruit Python ADS1x15 Library
|
||||
- Adafruit Python ADXL345 Library
|
||||
- Adafruit Python BMP Library
|
||||
- Adafruit Python CharLCD Library
|
||||
- Adafruit Python DHT Library
|
||||
- Adafruit Python GPIO Library
|
||||
- Python library for controlling LED backpack displays.
|
||||
- Adafruit Python LSM303 Library
|
||||
- Adafruit Python MCP3008 Library
|
||||
- Adafruit Python MCP4725 Library
|
||||
- Adafruit Python PCA9685 Library
|
||||
- Pure python access to Linux IO including I2C and SPI.
|
||||
- Python library for the SI1145
|
||||
- Adafruit Python TCS34725 Library
|
||||
- Adafruit Python VCNL40xx Library
|
||||
- Adafruit Python WS2801 Library
|
||||
|
||||
101
|
||||
- include SI1145 library
|
||||
- compile DHT driver
|
||||
|
||||
8.0.100
|
||||
100
|
||||
- Initial Release
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
PKG_NAME="adafruit-libraries"
|
||||
PKG_VERSION=""
|
||||
PKG_REV="101"
|
||||
PKG_REV="102"
|
||||
PKG_ARCH="any"
|
||||
PKG_ADDON_PROJECTS="RPi RPi2"
|
||||
PKG_LICENSE="MIT"
|
||||
@@ -27,7 +27,7 @@ PKG_URL=""
|
||||
PKG_DEPENDS_TARGET="Adafruit_Python_ADS1x15 Adafruit_Python_ADXL345 Adafruit_Python_BMP Adafruit_Python_CharLCD Adafruit_Python_DHT Adafruit_Python_GPIO Adafruit_Python_LED_Backpack Adafruit_Python_LSM303 Adafruit_Python_MCP3008 Adafruit_Python_MCP4725 Adafruit_Python_PCA9685 Adafruit_Python_PureIO Adafruit_Python_SI1145 Adafruit_Python_TCS34725 Adafruit_Python_VCNL40xx Adafruit_Python_WS2801"
|
||||
PKG_SECTION="virtual"
|
||||
PKG_SHORTDESC="A bundle of libraries from Adafruit"
|
||||
PKG_LONGDESC="This bundle currently includes Adafruit_ADS1x15, Adafruit_ADXL345, Adafruit_BMP, Adafruit_CharLCD, Adafruit_DHT, Adafruit_GPIO, Adafruit_LED_Backpack, Adafruit_LSM303, Adafruit_MCP3008, Adafruit_MCP4725, Adafruit_PCA9685, Adafruit_PureIO, Adafruit_SI1145 Adafruit_TCS34725, Adafruit_VCNL40xx and Adafruit_WS2801 python modules"
|
||||
PKG_LONGDESC="This is a bundle of various Adafruit Python libraries. Included are: ADS1x15, ADXL345, BMP, CharLCD, DHT, GPIO, LED_Backpack, LSM303, MCP3008, MCP4725, PCA9685, PureIO, SI1145, TCS34725, VCNL40xx, WS2801"
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
PKG_IS_ADDON="yes"
|
||||
|
||||
@@ -1,3 +1,22 @@
|
||||
111
|
||||
- Update to 431be9e
|
||||
- Fix delay with Kodi playback option
|
||||
- Cache volume
|
||||
|
||||
110
|
||||
- Update to 685fb4e
|
||||
- Add kSupportsPlaylistV2 enum
|
||||
|
||||
109
|
||||
- Refer librespot-org repository
|
||||
- Update to bc7ceb3
|
||||
- Set stream type to audio in Kodi mode
|
||||
- Initial volume as a setting
|
||||
|
||||
108
|
||||
- Correct bug which prevented disabling the service from Kodi
|
||||
- Place named pipe in /var/run/librespot
|
||||
|
||||
107
|
||||
- Update to ddfc28f
|
||||
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="librespot"
|
||||
PKG_VERSION="ddfc28f"
|
||||
PKG_REV="107"
|
||||
PKG_VERSION="431be9e"
|
||||
PKG_REV="111"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="https://github.com/plietar/$PKG_NAME/"
|
||||
PKG_URL="https://github.com/plietar/$PKG_NAME/archive/$PKG_VERSION.zip"
|
||||
PKG_DEPENDS_TARGET="toolchain avahi libvorbis pulseaudio pyalsaaudio rust"
|
||||
PKG_SITE="https://github.com/librespot-org/$PKG_NAME/"
|
||||
PKG_URL="https://github.com/librespot-org/$PKG_NAME/archive/$PKG_VERSION.zip"
|
||||
PKG_DEPENDS_TARGET="toolchain avahi pulseaudio pyalsaaudio rust"
|
||||
PKG_SECTION="service"
|
||||
PKG_SHORTDESC="Librespot: play Spotify through LibreELEC using a Spotify app as a remote"
|
||||
PKG_LONGDESC="Librespot ($PKG_VERSION) plays Spotify through LibreELEC using the open source librespot library using a Spotify app as a remote."
|
||||
@@ -43,7 +43,7 @@ configure_target() {
|
||||
|
||||
make_target() {
|
||||
cd src
|
||||
$CARGO_BUILD --no-default-features --features "alsa-backend pulseaudio-backend"
|
||||
$CARGO_BUILD --no-default-features --features "alsa-backend pulseaudio-backend with-dns-sd"
|
||||
cd "$PKG_BUILD/.$TARGET_NAME"/*/release
|
||||
$STRIP librespot
|
||||
}
|
||||
|
||||
@@ -1,135 +0,0 @@
|
||||
From b0d70bed1d5f3614f0e966c53c3a4898c7b33918 Mon Sep 17 00:00:00 2001
|
||||
From: awiouy <awiouy@gmail.com>
|
||||
Date: Mon, 4 Sep 2017 23:01:38 +0200
|
||||
Subject: [PATCH] use dns-sd instead of mdns for discovery
|
||||
|
||||
---
|
||||
Cargo.lock | 19 +++++--------------
|
||||
Cargo.toml | 2 +-
|
||||
src/discovery.rs | 19 ++++++++++---------
|
||||
src/lib.rs | 2 +-
|
||||
4 files changed, 17 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/Cargo.lock b/Cargo.lock
|
||||
index d8128db..5f54617 100644
|
||||
--- a/Cargo.lock
|
||||
+++ b/Cargo.lock
|
||||
@@ -277,7 +277,7 @@ dependencies = [
|
||||
"librespot-metadata 0.1.0",
|
||||
"librespot-protocol 0.1.0",
|
||||
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "mdns 0.2.0 (git+https://github.com/plietar/rust-mdns)",
|
||||
+ "dns-sd 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-bigint 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"portaudio-rs 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"protobuf 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -386,20 +386,12 @@ version = "0.1.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
-name = "mdns"
|
||||
-version = "0.2.0"
|
||||
-source = "git+https://github.com/plietar/rust-mdns#c0fc73502d7d752a4ffeb5268a017561405e218c"
|
||||
+name = "dns-sd"
|
||||
+version = "0.1.3"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
- "byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "dns-parser 0.3.2 (git+https://github.com/plietar/dns-parser)",
|
||||
- "futures 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "multimap 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "net2 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "nix 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "rand 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "tokio-core 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1099,7 +1091,6 @@ dependencies = [
|
||||
"checksum magenta 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4bf0336886480e671965f794bc9b6fce88503563013d1bfb7a502c81fe3ac527"
|
||||
"checksum magenta-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "40d014c7011ac470ae28e2f76a02bfea4a8480f73e701353b49ad7a8d75f4699"
|
||||
"checksum matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "100aabe6b8ff4e4a7e32c1c13523379802df0772b82466207ac25b013f193376"
|
||||
-"checksum mdns 0.2.0 (git+https://github.com/plietar/rust-mdns)" = "<none>"
|
||||
"checksum memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4"
|
||||
"checksum mime 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c5ca99d8a021c1687882fd68dca26e601ceff5c26571c7cb41cf4ed60d57cb2d"
|
||||
"checksum mio 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "dbd91d3bfbceb13897065e97b2ef177a09a438cb33612b2d371bf568819a9313"
|
||||
diff --git a/Cargo.toml b/Cargo.toml
|
||||
index f4e6349..131e4f3 100644
|
||||
--- a/Cargo.toml
|
||||
+++ b/Cargo.toml
|
||||
@@ -36,7 +36,7 @@ futures = "0.1.8"
|
||||
getopts = "0.2.14"
|
||||
hyper = "0.11.2"
|
||||
log = "0.3.5"
|
||||
-mdns = { git = "https://github.com/plietar/rust-mdns" }
|
||||
+dns-sd = "0.1.3"
|
||||
num-bigint = "0.1.35"
|
||||
protobuf = "1.1"
|
||||
rand = "0.3.13"
|
||||
diff --git a/src/discovery.rs b/src/discovery.rs
|
||||
index 3eaa5f0..6f9a4ae 100644
|
||||
--- a/src/discovery.rs
|
||||
+++ b/src/discovery.rs
|
||||
@@ -6,7 +6,7 @@ use futures::sync::mpsc;
|
||||
use futures::{Future, Stream, BoxFuture, Poll, Async};
|
||||
use hyper::server::{Service, NewService, Request, Response, Http};
|
||||
use hyper::{self, Get, Post, StatusCode};
|
||||
-use mdns;
|
||||
+use dns_sd::DNSService;
|
||||
use num_bigint::BigUint;
|
||||
use rand;
|
||||
use std::collections::BTreeMap;
|
||||
@@ -203,7 +203,7 @@ impl NewService for Discovery {
|
||||
|
||||
pub struct DiscoveryStream {
|
||||
credentials: mpsc::UnboundedReceiver<Credentials>,
|
||||
- _svc: mdns::Service,
|
||||
+ _svc: DNSService,
|
||||
task: Box<Future<Item=(), Error=io::Error>>,
|
||||
}
|
||||
|
||||
@@ -213,7 +213,7 @@ pub fn discovery(handle: &Handle, config: ConnectConfig, device_id: String)
|
||||
let (discovery, creds_rx) = Discovery::new(config.clone(), device_id);
|
||||
|
||||
let listener = TcpListener::bind(&"0.0.0.0:0".parse().unwrap(), handle)?;
|
||||
- let addr = listener.local_addr()?;
|
||||
+ let port = listener.local_addr().unwrap().port();
|
||||
|
||||
let http = Http::new();
|
||||
let handle_ = handle.clone();
|
||||
@@ -222,12 +222,13 @@ pub fn discovery(handle: &Handle, config: ConnectConfig, device_id: String)
|
||||
Ok(())
|
||||
}));
|
||||
|
||||
- let responder = mdns::Responder::spawn(&handle)?;
|
||||
- let svc = responder.register(
|
||||
- "_spotify-connect._tcp".to_owned(),
|
||||
- config.name,
|
||||
- addr.port(),
|
||||
- &["VERSION=1.0", "CPath=/"]);
|
||||
+ let svc = DNSService::register(Some(&*config.name),
|
||||
+ "_spotify-connect._tcp",
|
||||
+ None,
|
||||
+ None,
|
||||
+ port,
|
||||
+ &["VERSION=1.0", "CPath=/"])
|
||||
+ .unwrap();
|
||||
|
||||
Ok(DiscoveryStream {
|
||||
credentials: creds_rx,
|
||||
diff --git a/src/lib.rs b/src/lib.rs
|
||||
index b9c920e..dfaf5a2 100644
|
||||
--- a/src/lib.rs
|
||||
+++ b/src/lib.rs
|
||||
@@ -13,7 +13,7 @@ extern crate base64;
|
||||
extern crate crypto;
|
||||
extern crate futures;
|
||||
extern crate hyper;
|
||||
-extern crate mdns;
|
||||
+extern crate dns_sd;
|
||||
extern crate num_bigint;
|
||||
extern crate protobuf;
|
||||
extern crate rand;
|
||||
@@ -1,110 +1,165 @@
|
||||
From a20f55c268bf44d6923be4cad6c6fdfecfc5dd8a Mon Sep 17 00:00:00 2001
|
||||
From: awiouy <awiouy@gmail.com>
|
||||
Date: Tue, 12 Sep 2017 09:37:53 +0200
|
||||
Subject: [PATCH] kodi hooks
|
||||
|
||||
---
|
||||
src/player.rs | 25 +++++++++++++++++--------
|
||||
1 file changed, 17 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/player.rs b/src/player.rs
|
||||
index 29380e3..44b9a24 100644
|
||||
--- a/src/player.rs
|
||||
+++ b/src/player.rs
|
||||
@@ -1,6 +1,7 @@
|
||||
use futures::sync::oneshot;
|
||||
use futures::{future, Future};
|
||||
use std::borrow::Cow;
|
||||
+use std::env;
|
||||
use std::mem;
|
||||
use std::sync::mpsc::{RecvError, TryRecvError};
|
||||
use std::thread;
|
||||
@@ -13,7 +14,7 @@ use core::util::{self, SpotifyId, Subfile};
|
||||
use audio_backend::Sink;
|
||||
use audio::{AudioFile, AudioDecrypt};
|
||||
diff --git a/playback/src/player.rs b/playback/src/player.rs
|
||||
index dd99423..365c108 100644
|
||||
--- a/playback/src/player.rs
|
||||
+++ b/playback/src/player.rs
|
||||
@@ -17,7 +17,7 @@ use core::spotify_id::SpotifyId;
|
||||
use audio::{AudioDecrypt, AudioFile};
|
||||
use audio::{VorbisDecoder, VorbisPacket};
|
||||
-use metadata::{FileFormat, Track, Metadata};
|
||||
+use metadata::{Artist, FileFormat, Track, Metadata};
|
||||
use audio_backend::Sink;
|
||||
-use metadata::{FileFormat, Metadata, Track};
|
||||
+use metadata::{FileFormat, Metadata, Track, Artist};
|
||||
use mixer::AudioFilter;
|
||||
|
||||
#[derive(Clone)]
|
||||
@@ -215,7 +216,7 @@ impl PlayerInternal {
|
||||
pub struct Player {
|
||||
@@ -49,15 +49,22 @@ enum PlayerCommand {
|
||||
pub enum PlayerEvent {
|
||||
Started {
|
||||
track_id: SpotifyId,
|
||||
+ track: Track,
|
||||
+ artist: Artist,
|
||||
+ new_state: String,
|
||||
},
|
||||
|
||||
None => {
|
||||
self.sink.stop().unwrap();
|
||||
- self.run_onstop();
|
||||
+ info!("onstop 1");
|
||||
Changed {
|
||||
old_track_id: SpotifyId,
|
||||
new_track_id: SpotifyId,
|
||||
+ track: Track,
|
||||
+ artist: Artist,
|
||||
+ new_state: String,
|
||||
},
|
||||
|
||||
let old_state = mem::replace(&mut self.state, PlayerState::Stopped);
|
||||
old_state.signal_end_of_track();
|
||||
@@ -227,6 +228,12 @@ impl PlayerInternal {
|
||||
debug!("command={:?}", cmd);
|
||||
match cmd {
|
||||
PlayerCommand::Load(track_id, play, position, end_of_track) => {
|
||||
+ let track = Track::get(&self.session, track_id).wait().unwrap();
|
||||
+ let artist = Artist::get(&self.session, track.artists[0]).wait().unwrap();
|
||||
+ env::set_var("LS_ARTIST", artist.name);
|
||||
+ env::set_var("LS_TITLE", track.name);
|
||||
+ self.run_onstart();
|
||||
+
|
||||
if self.state.is_playing() {
|
||||
self.sink.stop().unwrap();
|
||||
}
|
||||
@@ -235,7 +242,7 @@ impl PlayerInternal {
|
||||
Some(decoder) => {
|
||||
Stopped {
|
||||
track_id: SpotifyId,
|
||||
+ new_state: String,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -404,6 +411,9 @@ impl PlayerInternal {
|
||||
|
||||
match self.load_track(track_id, position as i64) {
|
||||
Some((decoder, normalisation_factor)) => {
|
||||
+ let track = Track::get(&self.session, track_id).wait().unwrap();
|
||||
+ let artist = Artist::get(&self.session, track.artists[0]).wait().unwrap();
|
||||
+
|
||||
if play {
|
||||
if !self.state.is_playing() {
|
||||
- self.run_onstart();
|
||||
+ info!("onstart 1");
|
||||
}
|
||||
self.sink.start().unwrap();
|
||||
|
||||
@@ -245,7 +252,7 @@ impl PlayerInternal {
|
||||
};
|
||||
} else {
|
||||
if self.state.is_playing() {
|
||||
- self.run_onstop();
|
||||
+ info!("onstop 2");
|
||||
match self.state {
|
||||
PlayerState::Playing {
|
||||
@@ -413,11 +423,20 @@ impl PlayerInternal {
|
||||
| PlayerState::EndOfTrack {
|
||||
track_id: old_track_id,
|
||||
..
|
||||
- } => self.send_event(PlayerEvent::Changed {
|
||||
- old_track_id: old_track_id,
|
||||
- new_track_id: track_id,
|
||||
- }),
|
||||
- _ => self.send_event(PlayerEvent::Started { track_id }),
|
||||
+ } => {
|
||||
+ let new_state = "play".to_string();
|
||||
+ self.send_event(PlayerEvent::Changed {
|
||||
+ old_track_id: old_track_id,
|
||||
+ new_track_id: track_id,
|
||||
+ track: track,
|
||||
+ artist: artist,
|
||||
+ new_state: new_state,
|
||||
+ });
|
||||
+ },
|
||||
+ _ => {
|
||||
+ let new_state = "play".to_string();
|
||||
+ self.send_event(PlayerEvent::Started { track_id, track, artist, new_state });
|
||||
+ },
|
||||
}
|
||||
|
||||
self.state = PlayerState::Paused {
|
||||
@@ -258,7 +265,7 @@ impl PlayerInternal {
|
||||
None => {
|
||||
end_of_track.complete(());
|
||||
if self.state.is_playing() {
|
||||
- self.run_onstop();
|
||||
+ info!("onstop 3");
|
||||
self.start_sink();
|
||||
@@ -443,13 +462,20 @@ impl PlayerInternal {
|
||||
| PlayerState::EndOfTrack {
|
||||
track_id: old_track_id,
|
||||
..
|
||||
- } => self.send_event(PlayerEvent::Changed {
|
||||
- old_track_id: old_track_id,
|
||||
- new_track_id: track_id,
|
||||
- }),
|
||||
+ } => {
|
||||
+ let new_state = "pause".to_string();
|
||||
+ self.send_event(PlayerEvent::Changed {
|
||||
+ old_track_id: old_track_id,
|
||||
+ new_track_id: track_id,
|
||||
+ track: track,
|
||||
+ artist: artist,
|
||||
+ new_state: new_state,
|
||||
+ })
|
||||
+ },
|
||||
_ => (),
|
||||
}
|
||||
- self.send_event(PlayerEvent::Stopped { track_id });
|
||||
+ let new_state = "pause".to_string();
|
||||
+ self.send_event(PlayerEvent::Stopped { track_id, new_state });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -279,7 +286,7 @@ impl PlayerInternal {
|
||||
if let PlayerState::Paused { .. } = self.state {
|
||||
|
||||
@@ -474,7 +500,10 @@ impl PlayerInternal {
|
||||
if let PlayerState::Paused { track_id, .. } = self.state {
|
||||
self.state.paused_to_playing();
|
||||
|
||||
- self.run_onstart();
|
||||
+ info!("onstart 2");
|
||||
self.sink.start().unwrap();
|
||||
- self.send_event(PlayerEvent::Started { track_id });
|
||||
+ let track = Track::get(&self.session, track_id).wait().unwrap();
|
||||
+ let artist = Artist::get(&self.session, track.artists[0]).wait().unwrap();
|
||||
+ let new_state = "play".to_string();
|
||||
+ self.send_event(PlayerEvent::Started { track_id, track, artist, new_state });
|
||||
self.start_sink();
|
||||
} else {
|
||||
warn!("Player::play called from invalid state");
|
||||
@@ -291,17 +298,19 @@ impl PlayerInternal {
|
||||
@@ -486,7 +515,8 @@ impl PlayerInternal {
|
||||
self.state.playing_to_paused();
|
||||
|
||||
self.sink.stop().unwrap();
|
||||
- self.run_onstop();
|
||||
+ info!("onstop 4");
|
||||
self.stop_sink_if_running();
|
||||
- self.send_event(PlayerEvent::Stopped { track_id });
|
||||
+ let new_state = "pause".to_string();
|
||||
+ self.send_event(PlayerEvent::Stopped { track_id, new_state });
|
||||
} else {
|
||||
warn!("Player::pause called from invalid state");
|
||||
}
|
||||
}
|
||||
|
||||
PlayerCommand::Stop => {
|
||||
+ self.run_onstop();
|
||||
+
|
||||
match self.state {
|
||||
PlayerState::Playing { .. } => {
|
||||
self.sink.stop().unwrap();
|
||||
- self.run_onstop();
|
||||
+ info!("onstop 5");
|
||||
self.state = PlayerState::Stopped;
|
||||
}
|
||||
PlayerState::Paused { .. } => {
|
||||
@@ -497,7 +527,8 @@ impl PlayerInternal {
|
||||
| PlayerState::Paused { track_id, .. }
|
||||
| PlayerState::EndOfTrack { track_id } => {
|
||||
self.stop_sink_if_running();
|
||||
- self.send_event(PlayerEvent::Stopped { track_id });
|
||||
+ let new_state = "stop".to_string();
|
||||
+ self.send_event(PlayerEvent::Stopped { track_id, new_state });
|
||||
self.state = PlayerState::Stopped;
|
||||
}
|
||||
PlayerState::Stopped => {
|
||||
diff --git a/src/player_event_handler.rs b/src/player_event_handler.rs
|
||||
index b6a653d..f746c8f 100644
|
||||
--- a/src/player_event_handler.rs
|
||||
+++ b/src/player_event_handler.rs
|
||||
@@ -18,18 +18,28 @@ pub fn run_program_on_events(event: PlayerEvent, onevent: &str) {
|
||||
PlayerEvent::Changed {
|
||||
old_track_id,
|
||||
new_track_id,
|
||||
+ track,
|
||||
+ artist,
|
||||
+ new_state,
|
||||
} => {
|
||||
env_vars.insert("PLAYER_EVENT", "change".to_string());
|
||||
env_vars.insert("OLD_TRACK_ID", old_track_id.to_base16());
|
||||
env_vars.insert("TRACK_ID", new_track_id.to_base16());
|
||||
+ env_vars.insert("TITLE", track.name.to_string());
|
||||
+ env_vars.insert("ARTIST", artist.name.to_string());
|
||||
+ env_vars.insert("STATE", new_state.to_string());
|
||||
}
|
||||
- PlayerEvent::Started { track_id } => {
|
||||
+ PlayerEvent::Started { track_id, track, artist, new_state } => {
|
||||
env_vars.insert("PLAYER_EVENT", "start".to_string());
|
||||
env_vars.insert("TRACK_ID", track_id.to_base16());
|
||||
+ env_vars.insert("TITLE", track.name.to_string());
|
||||
+ env_vars.insert("ARTIST", artist.name.to_string());
|
||||
+ env_vars.insert("STATE", new_state.to_string());
|
||||
}
|
||||
- PlayerEvent::Stopped { track_id } => {
|
||||
+ PlayerEvent::Stopped { track_id, new_state } => {
|
||||
env_vars.insert("PLAYER_EVENT", "stop".to_string());
|
||||
env_vars.insert("TRACK_ID", track_id.to_base16());
|
||||
+ env_vars.insert("STATE", new_state.to_string());
|
||||
}
|
||||
}
|
||||
run_program(onevent, env_vars);
|
||||
|
||||
@@ -1,28 +1,21 @@
|
||||
From e9bb269936ea26b1c0c698b8d05aaf68e2e79bcc Mon Sep 17 00:00:00 2001
|
||||
From: awiouy <awiouy@gmail.com>
|
||||
Date: Tue, 12 Sep 2017 09:41:14 +0200
|
||||
Subject: [PATCH] use librespot_sink pulseadio sink
|
||||
|
||||
---
|
||||
src/audio_backend/pulseaudio.rs | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/audio_backend/pulseaudio.rs b/src/audio_backend/pulseaudio.rs
|
||||
index 3b9a09b..ce78062 100644
|
||||
--- a/src/audio_backend/pulseaudio.rs
|
||||
+++ b/src/audio_backend/pulseaudio.rs
|
||||
@@ -23,12 +23,13 @@ impl Open for PulseAudioSink {
|
||||
|
||||
let name = CString::new("librespot").unwrap();
|
||||
let description = CString::new("A spoty client library").unwrap();
|
||||
+ let sink = CString::new("librespot_sink").unwrap();
|
||||
diff --git a/playback/src/audio_backend/pulseaudio.rs b/playback/src/audio_backend/pulseaudio.rs
|
||||
index 88f6280..4e7186b 100644
|
||||
--- a/playback/src/audio_backend/pulseaudio.rs
|
||||
+++ b/playback/src/audio_backend/pulseaudio.rs
|
||||
@@ -76,6 +76,7 @@ impl Open for PulseAudioSink {
|
||||
|
||||
let s = unsafe {
|
||||
pa_simple_new(null(), // Use the default server.
|
||||
name.as_ptr(), // Our application's name.
|
||||
PA_STREAM_PLAYBACK,
|
||||
- null(), // Use the default device.
|
||||
+ sink.as_ptr(), // Our sink.
|
||||
description.as_ptr(), // Description of our stream.
|
||||
&ss, // Our sample format.
|
||||
null(), // Use default channel map
|
||||
impl Sink for PulseAudioSink {
|
||||
fn start(&mut self) -> io::Result<()> {
|
||||
+ let sink = CString::new("librespot_sink").unwrap();
|
||||
if self.s == null_mut() {
|
||||
self.s = call_pulseaudio(
|
||||
|err| unsafe {
|
||||
@@ -83,7 +84,7 @@ impl Sink for PulseAudioSink {
|
||||
null(), // Use the default server.
|
||||
self.name.as_ptr(), // Our application's name.
|
||||
PA_STREAM_PLAYBACK,
|
||||
- null(), // Use the default device.
|
||||
+ sink.as_ptr(), // Our sink.
|
||||
self.desc.as_ptr(), // desc of our stream.
|
||||
&self.ss, // Our sample format.
|
||||
null(), // Use default channel map
|
||||
|
||||
@@ -28,7 +28,7 @@ while True:
|
||||
if len(pcms) == 0:
|
||||
dialog.ok(xbmcaddon.Addon().getAddonInfo('name'), strings(30210))
|
||||
break
|
||||
pcmx = dialog.select(strings(30112), pcms)
|
||||
pcmx = dialog.select(strings(30115), pcms)
|
||||
if pcmx == -1:
|
||||
break
|
||||
pcm = pcms[pcmx]
|
||||
|
||||
2
packages/addons/service/librespot/source/bin/librespot.onevent
Executable file
2
packages/addons/service/librespot/source/bin/librespot.onevent
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
echo -e "$STATE\n$ARTIST\n$TITLE" > "$LS_FIFO"
|
||||
@@ -1,2 +0,0 @@
|
||||
#!/bin/sh
|
||||
echo -e "play\n$LS_ARTIST\n$LS_TITLE" > "$LS_FIFO"
|
||||
@@ -1,2 +0,0 @@
|
||||
#!/bin/sh
|
||||
echo -e "stop" > "$LS_FIFO"
|
||||
@@ -87,8 +87,7 @@ oe_setup_addon service.librespot
|
||||
LIBRESPOT="librespot --cache \"$ADDON_HOME/cache\" \
|
||||
--disable-audio-cache \
|
||||
--name \"Librespot@$HOSTNAME\" \
|
||||
--onstart librespot.onstart \
|
||||
--onstop librespot.onstop"
|
||||
--onevent librespot.onevent"
|
||||
|
||||
if [ -n "$ls_b" -a "$ls_b" != "-" ]; then
|
||||
LIBRESPOT="$LIBRESPOT --bitrate $ls_b"
|
||||
@@ -119,6 +118,6 @@ if [ -z "$(pactl list short modules | grep source=$LS_SINK.monitor)" ]; then
|
||||
destination_ip=127.0.0.1 port="$LS_PORT" source_ip=127.0.0.1 > /dev/null
|
||||
fi
|
||||
|
||||
export LS_FIFO="$ADDON_DIR/rc"
|
||||
export LS_FIFO="/var/run/librespot"
|
||||
|
||||
eval $LIBRESPOT
|
||||
|
||||
@@ -25,10 +25,10 @@ import xbmc
|
||||
import xbmcaddon
|
||||
import xbmcgui
|
||||
|
||||
|
||||
PORT = '6666'
|
||||
SINK = 'librespot_sink'
|
||||
|
||||
|
||||
def suspendSink(bit):
|
||||
subprocess.call(['pactl', 'suspend-sink', SINK, bit])
|
||||
|
||||
@@ -38,7 +38,7 @@ def systemctl(command):
|
||||
|
||||
class Controller(threading.Thread):
|
||||
|
||||
FIFO = os.path.join(xbmcaddon.Addon().getAddonInfo('path'), 'rc')
|
||||
FIFO = '/var/run/librespot'
|
||||
|
||||
def __init__(self, player):
|
||||
super(Controller, self).__init__()
|
||||
@@ -65,13 +65,17 @@ class Controller(threading.Thread):
|
||||
self.player.play()
|
||||
elif command[0] == 'stop':
|
||||
self.player.stop()
|
||||
|
||||
def stop(self):
|
||||
elif command[0] == 'pause':
|
||||
self.player.pause()
|
||||
try:
|
||||
os.unlink(self.FIFO)
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
def stop(self):
|
||||
with open(self.FIFO, 'w') as fifo:
|
||||
fifo.close()
|
||||
|
||||
|
||||
class Player(xbmc.Player):
|
||||
|
||||
@@ -79,7 +83,6 @@ class Player(xbmc.Player):
|
||||
|
||||
def __init__(self):
|
||||
super(Player, self).__init__(self)
|
||||
self.window = xbmcgui.Window(12006)
|
||||
if self.isPlaying():
|
||||
self.onPlayBackStarted()
|
||||
|
||||
@@ -101,10 +104,15 @@ class Player(xbmc.Player):
|
||||
if not self.isPlaying() and xbmcaddon.Addon().getSetting('ls_O') == 'Kodi':
|
||||
suspendSink('0')
|
||||
listitem = xbmcgui.ListItem(xbmcaddon.Addon().getAddonInfo('name'))
|
||||
listitem.addStreamInfo('audio',{'codec': 'mp3'})
|
||||
listitem.setArt({'thumb': xbmcaddon.Addon().getAddonInfo('icon')})
|
||||
super(Player, self).play(self.ITEM, listitem)
|
||||
del listitem
|
||||
self.window.show()
|
||||
xbmcgui.Window(12006).show()
|
||||
|
||||
def pause(self):
|
||||
if self.isPlaying() and self.getPlayingFile() == self.ITEM:
|
||||
super(Player, self).pause()
|
||||
|
||||
def stop(self):
|
||||
suspendSink('1')
|
||||
@@ -130,3 +138,4 @@ if __name__ == '__main__':
|
||||
controller.start()
|
||||
Monitor(player).waitForAbort()
|
||||
controller.stop()
|
||||
controller.join()
|
||||
|
||||
@@ -7,67 +7,75 @@ msgctxt "#30100"
|
||||
msgid "Librespot"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30101"
|
||||
msgctxt "#30102"
|
||||
msgid "Bit rate"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30102"
|
||||
msgctxt "#30103"
|
||||
msgid "-"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30103"
|
||||
msgctxt "#30104"
|
||||
msgid "96"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30104"
|
||||
msgctxt "#30105"
|
||||
msgid "160"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30105"
|
||||
msgctxt "#30106"
|
||||
msgid "320"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30106"
|
||||
msgctxt "#30107"
|
||||
msgid "Output"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30107"
|
||||
msgid "Username"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30108"
|
||||
msgid "Password"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30109"
|
||||
msgid "Discovery mode (set username and password to disable)"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30110"
|
||||
msgid "ALSA"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30109"
|
||||
msgid "Kodi"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30110"
|
||||
msgid "Username"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30111"
|
||||
msgid "Configuration wizard"
|
||||
msgid "Password"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30112"
|
||||
msgid "Playback device"
|
||||
msgid "Discovery mode (set username and password to disable)"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30113"
|
||||
msgid "Playback route"
|
||||
msgid "ALSA"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30114"
|
||||
msgid "auto detect"
|
||||
msgid "Configuration wizard"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30115"
|
||||
msgid "headphone jack"
|
||||
msgid "Playback device"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30116"
|
||||
msgid "Playback route"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30117"
|
||||
msgid "auto detect"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30118"
|
||||
msgid "headphone jack"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30119"
|
||||
msgid "HDMI"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<settings>
|
||||
<category label="30100" >
|
||||
<setting label="30101" type="labelenum" id="ls_b" lvalues="30102|30103|30104|30105" />
|
||||
<setting label="30106" type="labelenum" id="ls_O" lvalues="ALSA|Kodi" />
|
||||
<setting label="30107" type="text" id="ls_u" />
|
||||
<setting label="30108" type="text" id="ls_p" option="hidden" visible="!eq(-1,)" />
|
||||
<setting label="30109" type="bool" id="ls_d" default="true" enable="false" visible="eq(-1,)|eq(-2,)" />
|
||||
<setting label="30109" type="bool" id="ls_D" default="false" enable="false" visible="!eq(-2,)+!eq(-3,)" />
|
||||
<setting label="30102" type="labelenum" id="ls_b" lvalues="30103|30104|30105|30106" />
|
||||
<setting label="30107" type="labelenum" id="ls_O" lvalues="30108|30109" />
|
||||
<setting label="30110" type="text" id="ls_u" />
|
||||
<setting label="30111" type="text" id="ls_p" option="hidden" visible="!eq(-1,)" />
|
||||
<setting label="30112" type="bool" id="ls_d" default="true" enable="false" visible="eq(-1,)|eq(-2,)" />
|
||||
<setting label="30112" type="bool" id="ls_D" default="false" enable="false" visible="!eq(-2,)+!eq(-3,)" />
|
||||
</category>
|
||||
<category label="30110" >
|
||||
<setting label="30106" type="labelenum" id="ls_O" lvalues="ALSA|Kodi" visible="false" />
|
||||
<setting label="30111" type="action" action="RunAddon(service.librespot)" enable="eq(-1,0)" />
|
||||
<setting label="30112" type="text" id="ls_o" default="" enable="eq(-2,0)" />
|
||||
<setting label="30113" type="enum" id="pcm_3" lvalues="30114|30115|30116" enable="eq(-3,0)" visible="eq(-1,default:CARD=ALSA)|eq(-1,sysdefault:CARD=ALSA)" />
|
||||
<category label="30113" >
|
||||
<setting label="30107" type="labelenum" id="ls_O" lvalues="30108|30109" visible="false" />
|
||||
<setting label="30114" type="action" action="RunAddon(service.librespot)" enable="eq(-1,0)" />
|
||||
<setting label="30115" type="text" id="ls_o" default="" enable="eq(-2,0)" />
|
||||
<setting label="30116" type="enum" id="pcm_3" lvalues="30117|30118|30119" enable="eq(-3,0)" visible="eq(-1,default:CARD=ALSA)|eq(-1,sysdefault:CARD=ALSA)" />
|
||||
</category>
|
||||
</settings>
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<settings>
|
||||
<setting id="ls_D" value="false" />
|
||||
<setting id="ls_O" value="ALSA" />
|
||||
<setting id="ls_b" value="320" />
|
||||
<setting id="ls_d" value="true" />
|
||||
<setting id="ls_o" value="" />
|
||||
<setting id="ls_p" value="" />
|
||||
<setting id="ls_u" value="" />
|
||||
<setting id="pcm_3" value="0" />
|
||||
</settings>
|
||||
@@ -1,3 +1,14 @@
|
||||
104
|
||||
- Change daemon startup option
|
||||
|
||||
103
|
||||
- update config.sub to support new hardware
|
||||
- disable mini-agent in config options to get system MIB
|
||||
- compile static binary to avoid cross compiling linking issue
|
||||
|
||||
102
|
||||
-version bump
|
||||
|
||||
101
|
||||
- make addon configurable
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016 Team LibreELEC
|
||||
# Copyright (C) 2016-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
PKG_NAME="net-snmp"
|
||||
PKG_VERSION="5.7.3"
|
||||
PKG_REV="101"
|
||||
PKG_REV="104"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="BSD"
|
||||
PKG_SITE="http://www.net-snmp.org"
|
||||
@@ -40,9 +40,8 @@ PKG_CONFIGURE_OPTS_TARGET="--with-defaults \
|
||||
--disable-deprecated \
|
||||
--disable-snmptrapd-subagent \
|
||||
--disable-scripts \
|
||||
--enable-static=no \
|
||||
--enable-shared=yes \
|
||||
--enable-mini-agent \
|
||||
--enable-static=yes \
|
||||
--enable-shared=no \
|
||||
--with-nl \
|
||||
--with-logfile=/storage/.kodi/userdata/addon_data/${PKG_ADDON_ID} \
|
||||
--with-persistent-directory=/storage/.kodi/userdata/addon_data/${PKG_ADDON_ID} \
|
||||
@@ -67,9 +66,4 @@ makeinstall_target() {
|
||||
addon() {
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/lib
|
||||
cp -r $PKG_BUILD/.$TARGET_NAME/storage/.kodi/addons/${PKG_ADDON_ID}/bin $PKG_BUILD/.$TARGET_NAME/storage/.kodi/userdata/addon_data/${PKG_ADDON_ID}/share $ADDON_BUILD/$PKG_ADDON_ID/
|
||||
#Do not copy symlinks
|
||||
find $PKG_BUILD/.$TARGET_NAME/storage/.kodi/addons/${PKG_ADDON_ID}/lib/ -type f -name '*.so.*' -exec cp '{}' $ADDON_BUILD/$PKG_ADDON_ID/lib/ \;
|
||||
#remove all but major version from so file
|
||||
for f in $ADDON_BUILD/$PKG_ADDON_ID/lib/*.so.* ; do mv "$f" "${f%.*.*}" ; done
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
diff -ur net-snmp-5.7.3/config.sub net-snmp-5.7.3.new/config.sub
|
||||
--- net-snmp-5.7.3/config.sub 2014-12-08 21:23:22.000000000 +0100
|
||||
+++ net-snmp-5.7.3.new/config.sub 2017-11-09 18:39:31.638689732 +0100
|
||||
@@ -247,10 +247,11 @@ case $basic_machine in
|
||||
# Some are omitted here because they have special meanings below.
|
||||
1750a | 580 \
|
||||
| a29k \
|
||||
+ | aarch64 | aarch64_be \
|
||||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
|
||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
||||
| am33_2.0 \
|
||||
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
|
||||
+ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
|
||||
| bfin \
|
||||
| c4x | clipper \
|
||||
| d10v | d30v | dlx | dsp16xx \
|
||||
@@ -339,6 +340,7 @@ case $basic_machine in
|
||||
# Recognize the basic CPU types with company name.
|
||||
580-* \
|
||||
| a29k-* \
|
||||
+ | aarch64-* | aarch64_be-* \
|
||||
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
|
||||
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
|
||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
|
||||
@@ -1171,6 +1173,9 @@ case $basic_machine in
|
||||
basic_machine=hppa1.1-winbond
|
||||
os=-proelf
|
||||
;;
|
||||
+ x64)
|
||||
+ basic_machine=x86_64-pc
|
||||
+ ;;
|
||||
xbox)
|
||||
basic_machine=i686-pc
|
||||
os=-mingw32
|
||||
@@ -24,4 +24,4 @@ ADDON_ID=service.net-snmp
|
||||
ADDON_DIR="$HOME/.kodi/addons/$ADDON_ID"
|
||||
ADDON_HOME="$HOME/.kodi/userdata/addon_data/$ADDON_ID"
|
||||
|
||||
$ADDON_DIR/bin/snmpd -f -LS0-6d -c $ADDON_HOME/share/snmp/snmpd.conf -M $ADDON_DIR/share/snmp/mibs -p /var/run/snmpd.pid
|
||||
$ADDON_DIR/bin/snmpd -f -LS0-6d -C -c $ADDON_HOME/share/snmp/snmpd.conf -M $ADDON_DIR/share/snmp/mibs -p /var/run/snmpd.pid
|
||||
|
||||
2
packages/addons/service/pcscd/changelog.txt
Normal file
2
packages/addons/service/pcscd/changelog.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
100
|
||||
- initial addon
|
||||
10
packages/addons/service/pcscd/config/reader.conf
Normal file
10
packages/addons/service/pcscd/config/reader.conf
Normal file
@@ -0,0 +1,10 @@
|
||||
# Gemalto reader with serial communication
|
||||
# - n is the serial port to use n in [0..3]
|
||||
# - reader is the reader name. It is needed for multi-slot readers.
|
||||
# Possible reader values are: GemPCPinPad, GemCorePOSPro, GemCoreSIMPro,
|
||||
# GemPCTwin (default value)
|
||||
# example: /dev/ttyS0:GemPCPinPad
|
||||
#FRIENDLYNAME "GemPCTwin serial"
|
||||
#DEVICENAME /dev/ttySn[:reader]
|
||||
#LIBPATH /storage/.kodi/addons/service.pcscd/drivers/serial/libccidtwin.so
|
||||
#CHANNELID n
|
||||
BIN
packages/addons/service/pcscd/icon/icon.png
Executable file
BIN
packages/addons/service/pcscd/icon/icon.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 63 KiB |
59
packages/addons/service/pcscd/package.mk
Normal file
59
packages/addons/service/pcscd/package.mk
Normal file
@@ -0,0 +1,59 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2017-present Team LibreELEC
|
||||
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
|
||||
# Copyright (C) 2011-2011 Gregor Fuis (gujs@openelec.tv)
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="pcscd"
|
||||
PKG_VERSION="1.0"
|
||||
PKG_REV="100"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://libreelec.tv"
|
||||
PKG_URL=""
|
||||
PKG_DEPENDS_TARGET="toolchain pcsc-lite libusb ccid"
|
||||
PKG_SECTION="service"
|
||||
PKG_SHORTDESC="Middleware to access a smart card using SCard API (PC/SC)"
|
||||
PKG_LONGDESC="Middleware to access a smart card using SCard API (PC/SC)"
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
PKG_IS_ADDON="yes"
|
||||
PKG_ADDON_NAME="PC/SC Smart Card Daemon"
|
||||
PKG_ADDON_TYPE="xbmc.service"
|
||||
|
||||
make_target() {
|
||||
:
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
:
|
||||
}
|
||||
|
||||
addon() {
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin/
|
||||
cp -Pa $(get_build_dir pcsc-lite)/.install_pkg/usr/sbin/pcscd $ADDON_BUILD/$PKG_ADDON_ID/bin/pcscd.bin
|
||||
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/drivers/serial
|
||||
cp -Pa $(get_build_dir ccid)/.$TARGET_NAME/src/.libs/libccidtwin.so $ADDON_BUILD/$PKG_ADDON_ID/drivers/serial
|
||||
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/drivers/ifd-ccid.bundle/Contents/Linux/
|
||||
cp -Pa $(get_build_dir ccid)/.$TARGET_NAME/src/.libs/libccid.so $ADDON_BUILD/$PKG_ADDON_ID/drivers/ifd-ccid.bundle/Contents/Linux/
|
||||
cp -Pa $(get_build_dir ccid)/.$TARGET_NAME/src/Info.plist $ADDON_BUILD/$PKG_ADDON_ID/drivers/ifd-ccid.bundle/Contents
|
||||
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/config
|
||||
cp -Pa $PKG_DIR/config/* $ADDON_BUILD/$PKG_ADDON_ID/config/
|
||||
}
|
||||
34
packages/addons/service/pcscd/source/bin/pcscd.start
Executable file
34
packages/addons/service/pcscd/source/bin/pcscd.start
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2017-present Team LibreELEC
|
||||
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
. /etc/profile
|
||||
|
||||
oe_setup_addon service.pcscd
|
||||
|
||||
mkdir -p $ADDON_HOME/config
|
||||
|
||||
chmod a+x $ADDON_DIR/bin/*
|
||||
|
||||
if [ ! -f "$ADDON_HOME/config/reader.conf" ]; then
|
||||
cp $ADDON_DIR/config/reader.conf $ADDON_HOME/config/reader.conf
|
||||
fi
|
||||
|
||||
exec pcscd.bin --foreground -c $ADDON_HOME/config/reader.conf
|
||||
35
packages/addons/service/pcscd/source/default.py
Normal file
35
packages/addons/service/pcscd/source/default.py
Normal file
@@ -0,0 +1,35 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2017-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
import subprocess
|
||||
import xbmc
|
||||
import xbmcaddon
|
||||
|
||||
|
||||
class Monitor(xbmc.Monitor):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
xbmc.Monitor.__init__(self)
|
||||
self.id = xbmcaddon.Addon().getAddonInfo('id')
|
||||
|
||||
def onSettingsChanged(self):
|
||||
subprocess.call(['systemctl', 'restart', self.id])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
Monitor().waitForAbort()
|
||||
@@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=PCSC lite
|
||||
After=graphical.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/sh -c "exec sh /storage/.kodi/addons/service.pcscd/bin/pcscd.start"
|
||||
TimeoutStopSec=1
|
||||
Restart=always
|
||||
RestartSec=2
|
||||
StartLimitInterval=0
|
||||
|
||||
[Install]
|
||||
WantedBy=kodi.target
|
||||
11
packages/addons/service/snapclient/changelog.txt
Normal file
11
packages/addons/service/snapclient/changelog.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
102
|
||||
- Update to 0.15.0
|
||||
- Add alsa-plugins
|
||||
|
||||
101
|
||||
- Always restart service
|
||||
- Improve latency setting
|
||||
- Keep daemon state
|
||||
|
||||
100
|
||||
- Initial addon
|
||||
BIN
packages/addons/service/snapclient/icon/icon.png
Normal file
BIN
packages/addons/service/snapclient/icon/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 39 KiB |
51
packages/addons/service/snapclient/package.mk
Normal file
51
packages/addons/service/snapclient/package.mk
Normal file
@@ -0,0 +1,51 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2018-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="snapclient"
|
||||
PKG_VERSION="0.15.0"
|
||||
PKG_REV="102"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPLv3"
|
||||
PKG_DEPENDS_TARGET="toolchain alsa-plugins snapcast"
|
||||
PKG_SECTION="service"
|
||||
PKG_SHORTDESC="Snapclient: Synchronous multi-room audio client"
|
||||
PKG_LONGDESC="Snapclient ($PKG_VERSION) is a Snapcast client. Snapcast is a multi-room client-server audio system, where all clients are time synchronized with the server to play perfectly synced audioplays."
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
PKG_IS_ADDON="yes"
|
||||
PKG_ADDON_NAME="Snapclient"
|
||||
PKG_ADDON_TYPE="xbmc.service.library"
|
||||
PKG_MAINTAINER="Anton Voyl (awiouy)"
|
||||
|
||||
make_target() {
|
||||
:
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
:
|
||||
}
|
||||
|
||||
addon() {
|
||||
mkdir -p "$ADDON_BUILD/$PKG_ADDON_ID/bin"
|
||||
cp "$(get_build_dir snapcast)/client/snapclient" \
|
||||
"$ADDON_BUILD/$PKG_ADDON_ID/bin"
|
||||
|
||||
mkdir -p "$ADDON_BUILD/$PKG_ADDON_ID/lib"
|
||||
cp "$(get_build_dir alsa-plugins)/.install_pkg/usr/lib/alsa"/*.so \
|
||||
"$ADDON_BUILD/$PKG_ADDON_ID/lib"
|
||||
}
|
||||
40
packages/addons/service/snapclient/source/addon.py
Normal file
40
packages/addons/service/snapclient/source/addon.py
Normal file
@@ -0,0 +1,40 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2018-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
import os.path
|
||||
import subprocess
|
||||
import xbmcaddon
|
||||
import xbmcgui
|
||||
|
||||
SNAPCLIENT = os.path.join(
|
||||
xbmcaddon.Addon().getAddonInfo('path'), 'bin', 'snapclient')
|
||||
|
||||
card = ''
|
||||
cards = []
|
||||
lines = subprocess.check_output([SNAPCLIENT, '--list']).splitlines()
|
||||
|
||||
for line in lines:
|
||||
if line != '':
|
||||
card = card + ' ' + line
|
||||
else:
|
||||
cards.append(card)
|
||||
card = ''
|
||||
|
||||
dialog = xbmcgui.Dialog()
|
||||
dialog.select(xbmcaddon.Addon().getLocalizedString(30015), cards)
|
||||
del dialog
|
||||
@@ -0,0 +1,53 @@
|
||||
#!/bin/sh
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2018-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
. /etc/profile
|
||||
oe_setup_addon service.snapclient
|
||||
|
||||
. /etc/os-release
|
||||
case "$LIBREELEC_ARCH" in
|
||||
RPi*.arm)
|
||||
if [ "$sc_a" == "true" ]; then
|
||||
ALSA="/proc/asound/ALSA"
|
||||
if [ ! -e "$ALSA" ]; then
|
||||
echo "Starting Raspberry Pi onboard audio"
|
||||
dtparam audio=on
|
||||
sleep 1
|
||||
fi
|
||||
if [ -e "$ALSA" ]; then
|
||||
echo "Setting Raspberry Pi onboard audio playback route"
|
||||
index="$(readlink $ALSA)"
|
||||
index="${index##*card}"
|
||||
amixer -c "$index" cset name="PCM Playback Route" "$sc_r"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
[ -n "$sc_h" ] && sc_H="--hostID $sc_h"
|
||||
[ -n "$sc_s" ] && sc_S="--soundcard $sc_s"
|
||||
|
||||
HOME="$ADDON_HOME" \
|
||||
nice -n "$sc_n" \
|
||||
snapclient \
|
||||
$sc_H \
|
||||
--latency "$sc_l" \
|
||||
--port "$sc_p" \
|
||||
$sc_S \
|
||||
> /dev/null
|
||||
70
packages/addons/service/snapclient/source/default.py
Normal file
70
packages/addons/service/snapclient/source/default.py
Normal file
@@ -0,0 +1,70 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2018-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
import subprocess
|
||||
import xbmc
|
||||
import xbmcaddon
|
||||
|
||||
|
||||
def systemctl(command):
|
||||
subprocess.call(
|
||||
['systemctl', command, xbmcaddon.Addon().getAddonInfo('id')])
|
||||
|
||||
|
||||
class Monitor(xbmc.Monitor):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
xbmc.Monitor.__init__(self)
|
||||
self.player = Player()
|
||||
|
||||
def onSettingsChanged(self):
|
||||
self.player.start('restart')
|
||||
|
||||
|
||||
class Player(xbmc.Player):
|
||||
|
||||
def __init__(self):
|
||||
super(Player, self).__init__(self)
|
||||
self.start('start')
|
||||
|
||||
def onPlayBackEnded(self):
|
||||
if xbmcaddon.Addon().getSetting('sc_k') == 'true':
|
||||
xbmc.sleep(500)
|
||||
if not self.isPlaying():
|
||||
systemctl('start')
|
||||
|
||||
def onPlayBackStarted(self):
|
||||
if xbmcaddon.Addon().getSetting('sc_k') == 'true':
|
||||
systemctl('stop')
|
||||
|
||||
def onPlayBackStopped(self):
|
||||
if xbmcaddon.Addon().getSetting('sc_k') == 'true':
|
||||
systemctl('start')
|
||||
|
||||
def start(self, command):
|
||||
if xbmcaddon.Addon().getSetting('sc_k') == 'true':
|
||||
if self.isPlaying():
|
||||
systemctl('stop')
|
||||
else:
|
||||
systemctl(command)
|
||||
else:
|
||||
systemctl(command)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
Monitor().waitForAbort()
|
||||
@@ -0,0 +1,70 @@
|
||||
# Kodi Media Center language file
|
||||
# Addon Name: snapclient
|
||||
# Addon id: service.snapclient
|
||||
# Addon Provider: Team LibreELEC
|
||||
msgid ""
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30000"
|
||||
msgid "Snapclient"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30001"
|
||||
msgid "List sound cards"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30002"
|
||||
msgid "Sound card"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30003"
|
||||
msgid "Host ID"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30004"
|
||||
msgid "Port"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30005"
|
||||
msgid "Priority"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30006"
|
||||
msgid "Latency"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30007"
|
||||
msgid "Kodi"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30008"
|
||||
msgid "Stop Snapclient when Kodi plays"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30009"
|
||||
msgid "Rasperry Pi"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30010"
|
||||
msgid "Manage onboard audio"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30011"
|
||||
msgid "Onboard audio playback route"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30012"
|
||||
msgid "Autodetect"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30013"
|
||||
msgid "Jack"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30014"
|
||||
msgid "HDMI"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30015"
|
||||
msgid "Available sound cards"
|
||||
msgstr ""
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<settings>
|
||||
<category label="30000">
|
||||
<setting label="30001" type="action" action="RunAddon(service.snapclient)"/>
|
||||
<setting label="30002" type="text" id="sc_s" default=""/>
|
||||
<setting label="30003" type="text" id="sc_h" default=""/>
|
||||
<setting label="30004" type="number" id="sc_p" default="1704"/>
|
||||
<setting label="30005" type="slider" id="sc_n" default="-3" range="-20,1,19" option="int"/>
|
||||
<setting label="30006" type="number" id="sc_l" default="0"/>
|
||||
</category>
|
||||
<category label="30007">
|
||||
<setting label="30008" type="bool" id="sc_k" default="false"/>
|
||||
</category>
|
||||
<category label="30009">
|
||||
<setting label="30010" type="bool" id="sc_a" default="false"/>
|
||||
<setting label="30011" type="enum" id="sc_r" lvalues="30012|30013|30014" visible="eq(-1,true)"/>
|
||||
</category>
|
||||
</settings>
|
||||
@@ -0,0 +1,10 @@
|
||||
<settings>
|
||||
<setting id="sc_a" value="false" />
|
||||
<setting id="sc_h" value="" />
|
||||
<setting id="sc_k" value="false" />
|
||||
<setting id="sc_l" value="0" />
|
||||
<setting id="sc_n" value="-3" />
|
||||
<setting id="sc_p" value="1704" />
|
||||
<setting id="sc_r" value="0" />
|
||||
<setting id="sc_s" value="" />
|
||||
</settings>
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Snapclient
|
||||
After=kodi.service network-online.target sound.target
|
||||
Requires=kodi.service network-online.target sound.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/sh /storage/.kodi/addons/service.snapclient/bin/snapclient.start
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=kodi.target
|
||||
10
packages/addons/service/snapserver/changelog.txt
Normal file
10
packages/addons/service/snapserver/changelog.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
102
|
||||
- Update to 0.15.0
|
||||
|
||||
101
|
||||
- Add streaming from Kodi
|
||||
- Keep daemon state
|
||||
- Rework settings
|
||||
|
||||
100
|
||||
- Initial addon
|
||||
BIN
packages/addons/service/snapserver/icon/icon.png
Normal file
BIN
packages/addons/service/snapserver/icon/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 40 KiB |
49
packages/addons/service/snapserver/package.mk
Normal file
49
packages/addons/service/snapserver/package.mk
Normal file
@@ -0,0 +1,49 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2018-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="snapserver"
|
||||
PKG_VERSION="0.15.0"
|
||||
PKG_REV="102"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPLv3"
|
||||
PKG_DEPENDS_TARGET="toolchain shairport-sync snapcast"
|
||||
PKG_SECTION="service"
|
||||
PKG_SHORTDESC="Snapserver: Synchronous multi-room audio server"
|
||||
PKG_LONGDESC="Snapclient ($PKG_VERSION) is a Snapcast server. Snapcast is a multi-room client-server audio system, where all clients are time synchronized with the server to play perfectly synced audioplays."
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
PKG_IS_ADDON="yes"
|
||||
PKG_ADDON_NAME="Snapserver"
|
||||
PKG_ADDON_TYPE="xbmc.service"
|
||||
PKG_ADDON_REQUIRES="service.librespot:0.0.0"
|
||||
PKG_MAINTAINER="Anton Voyl (awiouy)"
|
||||
|
||||
make_target() {
|
||||
:
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
:
|
||||
}
|
||||
|
||||
addon() {
|
||||
mkdir -p "$ADDON_BUILD/$PKG_ADDON_ID/bin"
|
||||
cp "$(get_build_dir shairport-sync)/.$TARGET_NAME/shairport-sync" \
|
||||
"$(get_build_dir snapcast)/server/snapserver" \
|
||||
"$ADDON_BUILD/$PKG_ADDON_ID/bin"
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
#!/bin/sh
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2018-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
. /etc/profile
|
||||
oe_setup_addon service.snapserver
|
||||
|
||||
config="pulseaudio.conf"
|
||||
link="/storage/.config/pulse-daemon.conf.d/50-snapserver.conf"
|
||||
mkdir -p "$(dirname $link)"
|
||||
ln -sf "$ADDON_HOME/$config" "$link"
|
||||
if [ ! -e "$ADDON_HOME/$config" ]; then
|
||||
cp "$ADDON_DIR/config/$config" "$ADDON_HOME"
|
||||
fi
|
||||
|
||||
file="/tmp/snapkodi"
|
||||
sink_name="Snapserver"
|
||||
if [ -z "$(pactl list short | grep $sink_name)" ]; then
|
||||
pactl load-module module-pipe-sink \
|
||||
file="$file" \
|
||||
rate=48000 \
|
||||
sink_name="$sink_name" \
|
||||
sink_properties=device.description="$sink_name"
|
||||
fi
|
||||
|
||||
case "$ss_st" in
|
||||
Default)
|
||||
stream="pipe:///tmp/snapfifo?name=Default"
|
||||
;;
|
||||
Kodi)
|
||||
stream="pipe://$file?name=Kodi"
|
||||
;;
|
||||
Spotify)
|
||||
stream="spotify:///librespot?name=Spotify"
|
||||
;;
|
||||
*)
|
||||
stream="airplay:///shairport-sync?name=AirPlay"
|
||||
;;
|
||||
esac
|
||||
|
||||
HOME="$ADDON_HOME" \
|
||||
nice -n "$ss_ni" \
|
||||
snapserver \
|
||||
--controlPort "$ss_cp" \
|
||||
--port "$ss_sp" \
|
||||
--stream "$stream" \
|
||||
> /dev/null
|
||||
@@ -0,0 +1,6 @@
|
||||
### Pulseaudio reads this file when it starts-up
|
||||
### Uncomment or add options if you know what you are doing
|
||||
|
||||
#resample-method = soxr-vhq
|
||||
#default-sample-format = s16le
|
||||
#default-sample-rate = 48000
|
||||
39
packages/addons/service/snapserver/source/default.py
Normal file
39
packages/addons/service/snapserver/source/default.py
Normal file
@@ -0,0 +1,39 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2018-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
import subprocess
|
||||
import xbmc
|
||||
import xbmcaddon
|
||||
|
||||
|
||||
def systemctl(command):
|
||||
subprocess.call(
|
||||
['systemctl', command, xbmcaddon.Addon().getAddonInfo('id')])
|
||||
|
||||
|
||||
class Monitor(xbmc.Monitor):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
xbmc.Monitor.__init__(self)
|
||||
|
||||
def onSettingsChanged(self):
|
||||
systemctl('restart')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
Monitor().waitForAbort()
|
||||
@@ -0,0 +1,26 @@
|
||||
# Kodi Media Center language file
|
||||
# Addon Name: snapserver
|
||||
# Addon id: service.snapclient
|
||||
# Addon Provider: Team LibreELEC
|
||||
msgid ""
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30000"
|
||||
msgid "Configuration"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30001"
|
||||
msgid "Server port"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30002"
|
||||
msgid "Control port"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30003"
|
||||
msgid "Priority"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30004"
|
||||
msgid "Stream"
|
||||
msgstr ""
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<settings>
|
||||
<category label="30000">
|
||||
<setting label="30001" type="number" id="ss_sp" default="1704"/>
|
||||
<setting label="30002" type="number" id="ss_cp" default="1705"/>
|
||||
<setting label="30003" type="slider" id="ss_ni" default="0" range="-20,1,19" option="int"/>
|
||||
<setting label="30004" type="select" id="ss_st" values="AirPlay|Default|Kodi|Spotify"/>
|
||||
</category>
|
||||
</settings>
|
||||
@@ -0,0 +1,6 @@
|
||||
<settings>
|
||||
<setting id="ss_cp" value="1705" />
|
||||
<setting id="ss_ni" value="0" />
|
||||
<setting id="ss_sp" value="1704" />
|
||||
<setting id="ss_st" value="AirPlay" />
|
||||
</settings>
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Snapserver
|
||||
After=kodi.service network-online.target sound.target
|
||||
Requires=kodi.service network-online.target sound.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/sh /storage/.kodi/addons/service.snapserver/bin/snapserver.start
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=kodi.target
|
||||
9
packages/addons/service/tinc/changelog.txt
Executable file → Normal file
9
packages/addons/service/tinc/changelog.txt
Executable file → Normal file
@@ -1,5 +1,12 @@
|
||||
103
|
||||
- Update to tinc-1.1pre15
|
||||
- Rework
|
||||
|
||||
102
|
||||
- Enable clean building
|
||||
|
||||
101
|
||||
- Bump to tinc-1.1pre14
|
||||
- Update to tinc-1.1pre14
|
||||
|
||||
100
|
||||
- Initial addon
|
||||
|
||||
@@ -17,13 +17,14 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="tinc"
|
||||
PKG_VERSION="1.1pre14"
|
||||
PKG_REV="101"
|
||||
PKG_VERSION="1.1pre15"
|
||||
PKG_REV="103"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPLv2"
|
||||
PKG_SITE="http://www.tinc-vpn.org/"
|
||||
PKG_URL="${PKG_SITE}/packages/$PKG_NAME-$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain openssl lzo zlib"
|
||||
PKG_URL="https://github.com/gsliepen/tinc/archive/release-$PKG_VERSION.tar.gz"
|
||||
PKG_SOURCE_DIR="tinc-release-$PKG_VERSION"
|
||||
PKG_DEPENDS_TARGET="toolchain lzo miniupnpc openssl zlib"
|
||||
PKG_SECTION="service/system"
|
||||
PKG_SHORTDESC="tinc: a Virtual Private Network daemon"
|
||||
PKG_LONGDESC="tinc ($PKG_VERSION) is a Virtual Private Network (VPN) daemon that uses tunnelling and encryption to create a secure private network between hosts on the Internet. Because the VPN appears to the IP level network code as a normal network device, there is no need to adapt any existing software. This allows VPN sites to share information with each other over the Internet without exposing any information to others."
|
||||
@@ -34,23 +35,22 @@ PKG_ADDON_NAME="tinc"
|
||||
PKG_ADDON_TYPE="xbmc.service"
|
||||
PKG_MAINTAINER="Anton Voyl (awiouy)"
|
||||
|
||||
PKG_CONFIGURE_OPTS_TARGET="--disable-curses \
|
||||
PKG_CONFIGURE_OPTS_TARGET="--disable-curses \
|
||||
--disable-readline \
|
||||
--sysconfdir=/storage/.cache"
|
||||
--enable-miniupnpc \
|
||||
--sysconfdir=/run"
|
||||
|
||||
pre_configure_target() {
|
||||
# tinc fails to build in subdirs
|
||||
cd $PKG_BUILD
|
||||
rm -rf .$TARGET_NAME
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
make_target() {
|
||||
:
|
||||
}
|
||||
|
||||
addon() {
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
cp $PKG_BUILD/src/tinc \
|
||||
$PKG_BUILD/src/tincd \
|
||||
cp $PKG_BUILD/.install_pkg/usr/sbin/* \
|
||||
$ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
}
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/bin/sh
|
||||
. /etc/profile
|
||||
oe_setup_addon service.system.tinc
|
||||
|
||||
case "$SUBNET" in
|
||||
??:??:??:??:??:??)
|
||||
:
|
||||
;;
|
||||
*)
|
||||
if [ "$NAME" == "$NODE" ]
|
||||
then
|
||||
ip addr replace "$SUBNET/$tinc_mask" dev "$INTERFACE"
|
||||
elif [ "$tinc_mask" == "32" ]
|
||||
then
|
||||
ip route replace "$SUBNET" dev "$INTERFACE"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
@@ -1,81 +0,0 @@
|
||||
#!/bin/sh
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016 Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
. /etc/profile
|
||||
oe_setup_addon service.system.tinc
|
||||
|
||||
config="$ADDON_HOME/.config"
|
||||
dev="vmnetz"
|
||||
host="$ADDON_HOME/Host"
|
||||
hosts="$ADDON_HOME/Hosts"
|
||||
|
||||
rm -rf "$host"
|
||||
rm -f "$hosts"
|
||||
|
||||
if [ -z "$tinc_name" ]
|
||||
then
|
||||
rm -rf "$config"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
read_name="$(tinc -c $config get name)"
|
||||
|
||||
if [ "$read_name" != "$tinc_name" ]
|
||||
then
|
||||
rm -rf "$config"
|
||||
tinc -c "$config" init "$tinc_name"
|
||||
fi
|
||||
|
||||
mkdir -p "$host"
|
||||
ln -s "$config/hosts/$tinc_name" "$host/$tinc_name"
|
||||
ln -nsf "$config/hosts" "$hosts"
|
||||
|
||||
for var in address port subnet
|
||||
do
|
||||
eval "tinc_var=\$tinc_$var"
|
||||
if [ -z "$tinc_var" ]
|
||||
then
|
||||
tinc -c "$config" del "$var"
|
||||
else
|
||||
tinc -c "$config" set "$var" "$tinc_var"
|
||||
fi
|
||||
done
|
||||
|
||||
cp "$ADDON_DIR/bin/subnet-up" \
|
||||
"$ADDON_DIR/bin/tinc-up" \
|
||||
"$config"
|
||||
|
||||
case "$tinc_subnets" in
|
||||
"default")
|
||||
subnets=""
|
||||
;;
|
||||
"strict subnets")
|
||||
subnets="-o StrictSubnets=yes"
|
||||
;;
|
||||
"tunnel server")
|
||||
subnets="-o TunnelServer=yes"
|
||||
;;
|
||||
esac
|
||||
|
||||
tincd -c "$config" \
|
||||
-n "$dev" \
|
||||
-o AutoConnect=yes \
|
||||
-o LocalDiscovery=yes \
|
||||
-o mode="$tinc_mode" \
|
||||
$subnets
|
||||
83
packages/addons/service/tinc/source/bin/tinc.start
Normal file
83
packages/addons/service/tinc/source/bin/tinc.start
Normal file
@@ -0,0 +1,83 @@
|
||||
#!/bin/sh
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
. /etc/profile
|
||||
oe_setup_addon service.system.tinc
|
||||
|
||||
DIR_LEGACY="$ADDON_HOME/.config"
|
||||
if [ -d "$DIR_LEGACY" ]; then
|
||||
echo "Warning: using legacy configuration $DIR_LEGACY, ignoring Kodi settings"
|
||||
tincd --config "$DIR_LEGACY" --no-detach
|
||||
exit $?
|
||||
fi
|
||||
|
||||
[ -z "$tinc_loglevel" ] && tinc_loglevel="3"
|
||||
|
||||
NET="vmnet_le"
|
||||
NAME="${tinc_subnet//./_}"
|
||||
CONF_KEYS="/storage/.cache/tinc.$NET"
|
||||
CONF_TINC="/run/tinc/$NET"
|
||||
DATA_LOCAL="$ADDON_HOME/Local"
|
||||
DATA_REMOTES="$ADDON_HOME/Remotes"
|
||||
|
||||
rm -fr "$CONF_TINC" "$DATA_LOCAL" &> /dev/null
|
||||
|
||||
if [ ! -d "$CONF_KEYS" ]; then
|
||||
rm -fr "$CONF_KEYS" &> /dev/null
|
||||
mkdir -p "$CONF_KEYS"
|
||||
tinc --batch --config "$CONF_KEYS" generate-ed25519-keys
|
||||
fi
|
||||
|
||||
if [ ! -d "$DATA_REMOTES" ]; then
|
||||
rm -fr "$DATA_REMOTES" &> /dev/null
|
||||
mkdir -p "$DATA_REMOTES"
|
||||
fi
|
||||
|
||||
if [ "$tinc_subnet" == "0.0.0.0" ]; then
|
||||
echo "Warning: default subnet $tinc_subnet, aborting"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ -e "$DATA_REMOTES/$NAME" ]; then
|
||||
echo "Error: $NAME in $DATA_REMOTES, aborting"
|
||||
exit
|
||||
fi
|
||||
|
||||
mkdir -p "$CONF_TINC"
|
||||
cp -RT "$ADDON_DIR/config" "$CONF_TINC"
|
||||
chmod +x "$CONF_TINC"/*-*
|
||||
ln -sf "$DATA_REMOTES" "$CONF_TINC/hosts"
|
||||
tee >> "$CONF_TINC/tinc.conf" << EOF
|
||||
Ed25519PrivateKeyFile = $CONF_KEYS/ed25519_key.priv
|
||||
LogLevel = $tinc_loglevel
|
||||
Name = $NAME
|
||||
EOF
|
||||
|
||||
mkdir -p "$DATA_LOCAL"
|
||||
if [ -n "$tinc_address" ]; then
|
||||
echo "Address = $tinc_address" >> "$DATA_LOCAL/$NAME"
|
||||
fi
|
||||
cat "$CONF_KEYS/ed25519_key.pub" >> "$DATA_LOCAL/$NAME"
|
||||
|
||||
tee -a "$CONF_TINC/tinc.conf" >> "$DATA_LOCAL/$NAME" << EOF
|
||||
Port = $tinc_port
|
||||
Subnet = $tinc_subnet
|
||||
EOF
|
||||
|
||||
tincd --net "$NET" --no-detach
|
||||
4
packages/addons/service/tinc/source/config/subnet-down
Normal file
4
packages/addons/service/tinc/source/config/subnet-down
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
if [ "$NAME" != "$NODE" ]; then
|
||||
ip route del "$SUBNET" dev "$INTERFACE"
|
||||
fi
|
||||
6
packages/addons/service/tinc/source/config/subnet-up
Normal file
6
packages/addons/service/tinc/source/config/subnet-up
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
if [ "$NAME" == "$NODE" ]; then
|
||||
ip addr replace "$SUBNET" dev "$INTERFACE"
|
||||
else
|
||||
ip route replace "$SUBNET" dev "$INTERFACE"
|
||||
fi
|
||||
0
packages/addons/service/tinc/source/bin/tinc-up → packages/addons/service/tinc/source/config/tinc-up
Executable file → Normal file
0
packages/addons/service/tinc/source/bin/tinc-up → packages/addons/service/tinc/source/config/tinc-up
Executable file → Normal file
6
packages/addons/service/tinc/source/config/tinc.conf
Normal file
6
packages/addons/service/tinc/source/config/tinc.conf
Normal file
@@ -0,0 +1,6 @@
|
||||
AutoConnect = yes
|
||||
ExperimentalProtocol = yes
|
||||
LocalDiscovery = yes
|
||||
Mode = Router
|
||||
TunnelServer = yes
|
||||
UPnP = yes
|
||||
@@ -1,6 +1,6 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016 Team LibreELEC
|
||||
# Copyright (C) 2016-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -15,74 +15,21 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
import os.path
|
||||
import random
|
||||
import socket
|
||||
import struct
|
||||
|
||||
import subprocess
|
||||
import urllib2
|
||||
import xbmc
|
||||
import xbmcaddon
|
||||
|
||||
|
||||
ADDON = xbmcaddon.Addon()
|
||||
ID = ADDON.getAddonInfo('id')
|
||||
PATH = ADDON.getAddonInfo('path')
|
||||
TINC = os.path.join(PATH, 'bin', 'tinc')
|
||||
|
||||
def run_code(cmd, *argv):
|
||||
return subprocess.call(cmd.format(*argv).split())
|
||||
|
||||
def run_lines(cmd, *argv):
|
||||
try:
|
||||
return subprocess.check_output(cmd.format(*argv).split()).splitlines()
|
||||
except subprocess.CalledProcessError:
|
||||
return []
|
||||
|
||||
|
||||
class Monitor(xbmc.Monitor):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
xbmc.Monitor.__init__(self)
|
||||
def __init__(self, *args, **kwargs):
|
||||
xbmc.Monitor.__init__(self)
|
||||
self.id = xbmcaddon.Addon().getAddonInfo('id')
|
||||
|
||||
def onSettingsChanged(self):
|
||||
run_code('systemctl restart {}'.format(ID))
|
||||
def onSettingsChanged(self):
|
||||
subprocess.call(['systemctl', 'restart', self.id])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
for network in run_lines('{} network', TINC):
|
||||
run_code('{} -n {} start', TINC, network)
|
||||
|
||||
if ADDON.getSetting('tinc_wizard') == 'true':
|
||||
try:
|
||||
ip = urllib2.urlopen('http://ip.42.pl/raw').read()
|
||||
address = socket.gethostbyaddr(ip)[0]
|
||||
ADDON.setSetting('tinc_address', address)
|
||||
except:
|
||||
pass
|
||||
|
||||
network, mask = '10.0.0.0/8'.split('/')
|
||||
mask = 2 ** (32 - int(mask)) - 1
|
||||
network = struct.unpack('!L', socket.inet_aton(network))[0] & -mask
|
||||
ip = network + random.randint(1, mask - 1)
|
||||
name = format(ip, '08x')
|
||||
subnet = socket.inet_ntoa(struct.pack('!L', ip))
|
||||
ADDON.setSetting('tinc_name', name)
|
||||
ADDON.setSetting('tinc_subnet', subnet)
|
||||
|
||||
port = int(ADDON.getSetting('tinc_port'))
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
try:
|
||||
s.bind(('', port))
|
||||
s.close()
|
||||
except socket.error:
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
s.bind(('', 0))
|
||||
a, port = s.getsockname()
|
||||
s.close()
|
||||
ADDON.setSetting('tinc_port', str(port))
|
||||
|
||||
ADDON.setSetting('tinc_wizard', 'false')
|
||||
run_code('systemctl restart {}'.format(ID))
|
||||
|
||||
Monitor().waitForAbort()
|
||||
Monitor().waitForAbort()
|
||||
|
||||
@@ -1,70 +1,30 @@
|
||||
# Kodi Media Center language file
|
||||
# Addon Name: tinc
|
||||
# Addon id: service.system.tinc
|
||||
# Addon Provider: awiouy at gmail dot com
|
||||
# Addon Provider: Team LibreELEC
|
||||
msgid ""
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30000"
|
||||
msgid "Configuration"
|
||||
msgid "Host"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30001"
|
||||
msgid "Virtual Private Network"
|
||||
msgid "Subnet (private IP address)"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30002"
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30003"
|
||||
msgid "Subnet"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30004"
|
||||
msgid "Mask"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30005"
|
||||
msgid "Mode"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30006"
|
||||
msgid "Subnet Discovery"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30007"
|
||||
msgid "Public Network"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30008"
|
||||
msgid "Address"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30009"
|
||||
msgid "Port"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30010"
|
||||
msgid "Instructions"
|
||||
msgctxt "#30003"
|
||||
msgid "Address (public DNS name)"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30011"
|
||||
msgid "1. Configure local node (see tinc-vpn.org/documentation-1.1)"
|
||||
msgctxt "#30004"
|
||||
msgid "Debug"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30012"
|
||||
msgid "2. Enable port forwarding on your router (see e.g. portforward.com)"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30013"
|
||||
msgid "3. Distribute local host file from userdata/addon_data/service.system.tinc/Host"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30014"
|
||||
msgid "4. Collect remote host files in userdata/addon_data/service.system.tinc/Hosts"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30015"
|
||||
msgid "5. Restart tinc to load remote host files"
|
||||
msgctxt "#30005"
|
||||
msgid "LogLevel"
|
||||
msgstr ""
|
||||
|
||||
@@ -1,24 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<settings>
|
||||
<category label="30000">
|
||||
<setting label="30001" type="lsep" />
|
||||
<setting id="tinc_name" label="30002" type="text" />
|
||||
<setting id="tinc_subnet" label="30003" type="ipaddress" />
|
||||
<setting id="tinc_mask" label="30004" type="labelenum"
|
||||
values="32|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31" />
|
||||
<setting id="tinc_mode" label="30005" type="labelenum"
|
||||
values="router|hub|switch" />
|
||||
<setting id="tinc_subnets" label="30006" type="labelenum"
|
||||
values="default|strict subnets|tunnel server" />
|
||||
<setting label="30007" type="lsep" />
|
||||
<setting id="tinc_address" label="30008" type="text" />
|
||||
<setting id="tinc_port" label="30009" type="number" default="6555" />
|
||||
</category>
|
||||
<category label="30010">
|
||||
<setting label="30011" type="lsep" />
|
||||
<setting label="30012" type="lsep" />
|
||||
<setting label="30013" type="lsep" />
|
||||
<setting label="30014" type="lsep" />
|
||||
<setting label="30015" type="lsep" />
|
||||
</category>
|
||||
<category label="30000">
|
||||
<setting label="30001" type="ipaddress" id="tinc_subnet" default="0.0.0.0"/>
|
||||
<setting label="30002" type="number" id="tinc_port" default="6550"/>
|
||||
<setting label="30003" type="text" id="tinc_address" default=""/>
|
||||
</category>
|
||||
<category label="30004">
|
||||
<setting label="30005" type="select" id="tinc_loglevel" values="0|1|2|3|4|5"/>
|
||||
</category>
|
||||
</settings>
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
<settings>
|
||||
<setting id="tinc_address" value="" />
|
||||
<setting id="tinc_mask" value="32" />
|
||||
<setting id="tinc_mode" value="router" />
|
||||
<setting id="tinc_name" value="" />
|
||||
<setting id="tinc_port" value="6555" />
|
||||
<setting id="tinc_subnet" value="" />
|
||||
<setting id="tinc_subnets" value="default" />
|
||||
<setting id="tinc_wizard" value="true" />
|
||||
<settings version="2">
|
||||
<setting id="tinc_address" default="true"></setting>
|
||||
<setting id="tinc_loglevel" default="true">3</setting>
|
||||
<setting id="tinc_port" default="true">6550</setting>
|
||||
<setting id="tinc_subnet" default="true">0.0.0.0</setting>
|
||||
</settings>
|
||||
|
||||
|
||||
@@ -5,8 +5,7 @@ After=network-online.target
|
||||
Requires=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/bin/sh /storage/.kodi/addons/service.system.tinc/bin/tinc-service
|
||||
ExecStart=/bin/sh /storage/.kodi/addons/service.system.tinc/bin/tinc.start
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
|
||||
@@ -49,8 +49,8 @@ addon() {
|
||||
|
||||
cp $PKG_DIR/addon.xml $ADDON_BUILD/$PKG_ADDON_ID
|
||||
|
||||
# set version (no need to edit xml file on version bump)
|
||||
$SED -e "s|@ADDON_VERSION@|$ADDON_VERSION.$PKG_REV|g" \
|
||||
# set only version (revision will be added by buildsystem)
|
||||
$SED -e "s|@ADDON_VERSION@|$ADDON_VERSION|g" \
|
||||
-i $ADDON_BUILD/$PKG_ADDON_ID/addon.xml
|
||||
|
||||
cp $(get_build_dir tslib)/.install_pkg/usr/bin/* $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
113
|
||||
- update to 4.2.6-7
|
||||
- full transcoding support
|
||||
|
||||
112
|
||||
- update to 4.2.3-20
|
||||
- changed name
|
||||
@@ -46,4 +50,4 @@
|
||||
- fix the XMLTV import script
|
||||
|
||||
100
|
||||
- initial LibreELEC version
|
||||
- initial LibreELEC version
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user