diff --git a/packages/addons/service/dispmanx_vnc/changelog.txt b/packages/addons/service/dispmanx_vnc/changelog.txt new file mode 100644 index 0000000000..9455e1f3c8 --- /dev/null +++ b/packages/addons/service/dispmanx_vnc/changelog.txt @@ -0,0 +1,2 @@ +8.0.100 +- Initial addon diff --git a/packages/addons/service/dispmanx_vnc/icon/icon.png b/packages/addons/service/dispmanx_vnc/icon/icon.png new file mode 100644 index 0000000000..1d64bb4783 Binary files /dev/null and b/packages/addons/service/dispmanx_vnc/icon/icon.png differ diff --git a/packages/addons/service/dispmanx_vnc/package.mk b/packages/addons/service/dispmanx_vnc/package.mk new file mode 100644 index 0000000000..38c5effadb --- /dev/null +++ b/packages/addons/service/dispmanx_vnc/package.mk @@ -0,0 +1,57 @@ +################################################################################ +# 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 . +################################################################################ + +PKG_NAME="dispmanx_vnc" +PKG_ADDON_NAME="Raspberry Pi VNC" +PKG_VERSION="78e6673" +PKG_REV="100" +PKG_ARCH="arm" +PKG_LICENSE="OSS" +PKG_SITE="https://github.com/patrikolausson/dispmanx_vnc" +PKG_URL="https://github.com/patrikolausson/dispmanx_vnc/archive/$PKG_VERSION.tar.gz" +PKG_DEPENDS_TARGET="toolchain libvncserver bcm2835-bootloader libconfig" +PKG_PRIORITY="optional" +PKG_SECTION="service/system" +PKG_SHORTDESC="VNC Server for Raspberry PI using dispmanx" +PKG_LONGDESC="VNC Server for Raspberry PI using dispmanx" + +PKG_IS_ADDON="yes" +PKG_ADDON_TYPE="xbmc.service" +PKG_ADDON_PROVIDES="" +PKG_ADDON_PROJECTS="RPi RPi2" +PKG_ADDON_REPOVERSION="8.0" + +PKG_AUTORECONF="no" + +PKG_MAINTAINER="Anton Voyl (awiouy at gmail dot com)" + +pre_make_target() { + export SYSROOT_PREFIX +} + +makeinstall_target() { + : # nop +} + +addon() { + mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin + cp -p $PKG_BUILD/dispmanx_vncserver $ADDON_BUILD/$PKG_ADDON_ID/bin + + mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/config + cp $PKG_DIR/source/config/dispmanx_vncserver.conf $ADDON_BUILD/$PKG_ADDON_ID/config/ +} diff --git a/packages/addons/service/dispmanx_vnc/patches/dispmanx_vnc-0001_fix-cross-compile.patch b/packages/addons/service/dispmanx_vnc/patches/dispmanx_vnc-0001_fix-cross-compile.patch new file mode 100644 index 0000000000..344c283d61 --- /dev/null +++ b/packages/addons/service/dispmanx_vnc/patches/dispmanx_vnc-0001_fix-cross-compile.patch @@ -0,0 +1,20 @@ +diff -Naur a/Makefile b/Makefile +--- a/Makefile 2016-01-22 20:52:21.000000000 +0100 ++++ b/Makefile 2016-01-22 21:29:34.601124600 +0100 +@@ -1,9 +1,11 @@ +-CXX = g++ +-CXXFLAGS = -Wall -std=c++11 -O3 -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM ++CXX ?= g++ ++CXXFLAGS += -Wall -std=c++11 -O3 -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM + +-INCLUDES = -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux +-LIB_PATHS = -L/opt/vc/lib/ +-LIBS = -lGLESv2 -lEGL -lopenmaxil -lbcm_host -lvcos -lvchiq_arm -lpthread -lrt -lvncserver -lconfig++ ++SYSROOT_PREFIX ?= ++ ++INCLUDES = -I$(SYSROOT_PREFIX)/usr/include/ -I$(SYSROOT_PREFIX)/usr/include/interface/vcos/pthreads -I$(SYSROOT_PREFIX)/usr/include/interface/vmcs_host/linux ++LIB_PATHS = -L$(SYSROOT_PREFIX)/usr/lib/ ++LIBS = -lGLESv2 -lEGL -lopenmaxil -lbcm_host -lvcos -lvchiq_arm -lpthread -lrt -lconfig++ -lz -lssl -lcrypto -lresolv -lvncserver -ljpeg -lpng16 + + SOURCES = main.cpp \ + UFile.cpp \ diff --git a/packages/addons/service/dispmanx_vnc/source/bin/dispmanx_vncserver-service b/packages/addons/service/dispmanx_vnc/source/bin/dispmanx_vncserver-service new file mode 100755 index 0000000000..aed9147e3d --- /dev/null +++ b/packages/addons/service/dispmanx_vnc/source/bin/dispmanx_vncserver-service @@ -0,0 +1,27 @@ +#!/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 . +################################################################################ +. /etc/profile +oe_setup_addon service.system.dispmanx_vnc + +if [ ! -f "$ADDON_HOME/dispmanx_vncserver.conf" ]; then + cp $ADDON_DIR/config/dispmanx_vncserver.conf $ADDON_HOME/ +fi + +/bin/sleep 10 +dispmanx_vncserver --config-file="$ADDON_HOME/dispmanx_vncserver.conf" diff --git a/packages/addons/service/dispmanx_vnc/source/config/dispmanx_vncserver.conf b/packages/addons/service/dispmanx_vnc/source/config/dispmanx_vncserver.conf new file mode 100644 index 0000000000..8d7d5b9cbf --- /dev/null +++ b/packages/addons/service/dispmanx_vnc/source/config/dispmanx_vncserver.conf @@ -0,0 +1,9 @@ +relative = false; +port = 5900; +screen = 0; +unsafe = false; +fullscreen = true; +multi-threaded = false; +password = ""; +frame-rate = 15; +downscale = false; diff --git a/packages/addons/service/dispmanx_vnc/source/default.py b/packages/addons/service/dispmanx_vnc/source/default.py new file mode 100644 index 0000000000..1a91d91ede --- /dev/null +++ b/packages/addons/service/dispmanx_vnc/source/default.py @@ -0,0 +1,17 @@ +################################################################################ +# 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 . +################################################################################ diff --git a/packages/addons/service/dispmanx_vnc/source/system.d/service.system.dispmanx_vnc.service b/packages/addons/service/dispmanx_vnc/source/system.d/service.system.dispmanx_vnc.service new file mode 100644 index 0000000000..70e616d79a --- /dev/null +++ b/packages/addons/service/dispmanx_vnc/source/system.d/service.system.dispmanx_vnc.service @@ -0,0 +1,13 @@ +[Unit] +Description=dispmanx_vnc +After=kodi.service + +[Service] +ExecStart=/bin/sh /storage/.kodi/addons/service.system.dispmanx_vnc/bin/dispmanx_vncserver-service +TimeoutStopSec=1 +Restart=always +RestartSec=2 +StartLimitInterval=0 + +[Install] +WantedBy=kodi.target