Merge pull request #801 from awiouy/tigervnc

tigervnc: initial addon
This commit is contained in:
Christian Hewitt 2016-10-07 00:16:42 +04:00 committed by GitHub
commit 42116def46
8 changed files with 120 additions and 0 deletions

View File

@ -0,0 +1,2 @@
100
- Initial addon

View File

@ -0,0 +1,46 @@
################################################################################
# This file is part of LibreELEC - http://www.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/>.
################################################################################
PKG_NAME="tigervnc"
PKG_VERSION="1.7.0"
PKG_ARCH="x86_64"
PKG_LICENSE="GPLv2"
PKG_SITE="http://www.tigervnc.org"
PKG_URL="https://github.com/TigerVNC/tigervnc/archive/v$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain cmake:host libX11 libXext libXtst zlib libjpeg-turbo"
PKG_SECTION="service"
PKG_IS_ADDON="yes"
PKG_ADDON_NAME="TigerVNC"
PKG_ADDON_TYPE="xbmc.service"
PKG_REV="100"
PKG_SHORTDESC="$PKG_ADDON_NAME server"
PKG_LONGDESC="$PKG_ADDON_NAME ($PKG_VERSION) is a high-performance, platform-neutral implementation of Virtual Network Computing, a client/server application that allows users to launch and interact with graphical applications on remote machines"
PKG_CMAKE_OPTS_TARGET="-DBUILD_VIEWER=off"
makeinstall_target() {
: # nothing to do
}
addon() {
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin
cp $PKG_BUILD/.$TARGET_NAME/unix/vncconfig/vncconfig \
$PKG_BUILD/.$TARGET_NAME/unix/vncpasswd/vncpasswd \
$PKG_BUILD/.$TARGET_NAME/unix/x0vncserver/x0vncserver \
$ADDON_BUILD/$PKG_ADDON_ID/bin/
}

View File

@ -0,0 +1 @@
<EFBFBD>u@<40>(<28>8<EFBFBD>

View File

@ -0,0 +1,35 @@
################################################################################
# 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/>.
################################################################################
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()

View File

@ -0,0 +1,13 @@
# Kodi Media Center language file
# Addon Name: tigervnc
# Addon id: service.tigervnc
msgid ""
msgstr ""
msgctxt "#30000"
msgid "Configuration"
msgstr ""
msgctxt "#30001"
msgid "port"
msgstr ""

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<settings>
<category label="30000">
<setting label="30001" id="vnc_port" type="number" default="5900" />
</category>
</settings>

View File

@ -0,0 +1,3 @@
<settings>
<setting id="vnc_port" value="5900" />
</settings>

View File

@ -0,0 +1,14 @@
[Unit]
Description=TigerVNC
After=graphical.target
[Service]
Environment=DISPLAY=:0.0
ExecStart=/storage/.kodi/addons/service.tigervnc/bin/x0vncserver -PasswordFile=/storage/.kodi/addons/service.tigervnc/config/passwd
TimeoutStopSec=1
Restart=always
RestartSec=2
StartLimitInterval=0
[Install]
WantedBy=kodi.target