diff --git a/packages/addons/addon-depends/libconfig/package.mk b/packages/addons/addon-depends/libconfig/package.mk new file mode 100644 index 0000000000..0f2db98b35 --- /dev/null +++ b/packages/addons/addon-depends/libconfig/package.mk @@ -0,0 +1,38 @@ +################################################################################# +# 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="libconfig" +PKG_VERSION="1.5" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="LGPL" +PKG_SITE="http://hyperrealm.com/libconfig/libconfig.html" +PKG_URL="https://github.com/hyperrealm/libconfig/archive/v$PKG_VERSION.tar.gz" +PKG_DEPENDS_TARGET="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="lib" +PKG_SHORTDESC="C/C++ Configuration File Library" +PKG_LONGDESC="C/C++ Configuration File Library" + +PKG_IS_ADDON="no" +PKG_AUTORECONF="yes" + +PKG_CONFIGURE_OPTS_TARGET="--enable-static \ + --disable-shared \ + --disable-examples \ + --with-sysroot=$SYSROOT_PREFIX" diff --git a/packages/addons/addon-depends/libconfig/patches/libconfig-0001_fix-include.patch b/packages/addons/addon-depends/libconfig/patches/libconfig-0001_fix-include.patch new file mode 100644 index 0000000000..79b0a2e00f --- /dev/null +++ b/packages/addons/addon-depends/libconfig/patches/libconfig-0001_fix-include.patch @@ -0,0 +1,12 @@ +diff -Naur a/tests/Makefile.am b/tests/Makefile.am +--- a/tests/Makefile.am 2014-03-04 03:04:17.000000000 +0100 ++++ b/tests/Makefile.am 2016-01-22 21:22:38.742833399 +0100 +@@ -3,7 +3,7 @@ + + libconfig_tests_SOURCES = tests.c + +-libconfig_tests_CPPFLAGS = -I$(top_srcdir)/tinytest -I../lib ++libconfig_tests_CPPFLAGS = -I$(top_srcdir)/tinytest -I$(top_srcdir)/lib + + libconfig_tests_LDADD = -L$(top_builddir)/tinytest -ltinytest \ + -L$(top_builddir)/lib/.libs -lconfig diff --git a/packages/addons/addon-depends/libvncserver/package.mk b/packages/addons/addon-depends/libvncserver/package.mk new file mode 100644 index 0000000000..fb858e52fd --- /dev/null +++ b/packages/addons/addon-depends/libvncserver/package.mk @@ -0,0 +1,47 @@ +################################################################################ +# 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="libvncserver" +PKG_VERSION="0.9.10" +PKG_REV="0" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="https://libvnc.github.io/" +PKG_URL="https://github.com/LibVNC/libvncserver/archive/LibVNCServer-$PKG_VERSION.tar.gz" +PKG_SOURCE_DIR="libvncserver-LibVNCServer-$PKG_VERSION" +PKG_DEPENDS_TARGET="toolchain libjpeg-turbo libpng" +PKG_SECTION="libs" +PKG_PRIORITY="optional" +PKG_SHORTDESC="LibVNCServer/LibVNCClient are cross-platform C libraries that allow you to easily implement VNC server or client functionality in your program." +PKG_LONGDESC="LibVNCServer/LibVNCClient are cross-platform C libraries that allow you to easily implement VNC server or client functionality in your program." + +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" + +PKG_MAINTAINER="Lukas Rusak (lrusak at irc.freenode.net)" + +PKG_CONFIGURE_OPTS_TARGET="--disable-shared \ + --enable-static \ + --with-sysroot=$SYSROOT_PREFIX \ + --with-jpeg \ + --with-png \ + --without-sdl \ + --without-gcrypt \ + --without-client-gcrypt \ + --without-gnutls" 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