diff --git a/packages/addons/addon-depends/emby-depends/imagemagick/package.mk b/packages/addons/addon-depends/emby-depends/imagemagick/package.mk new file mode 100644 index 0000000000..6edfc7c271 --- /dev/null +++ b/packages/addons/addon-depends/emby-depends/imagemagick/package.mk @@ -0,0 +1,40 @@ +################################################################################ +# 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="imagemagick" +PKG_VERSION="6.9.4-8" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="http://www.imagemagick.org/script/license.php" +PKG_SITE="http://www.imagemagick.org/" +PKG_URL="http://www.imagemagick.org/download/releases/ImageMagick-$PKG_VERSION.tar.xz" +PKG_SOURCE_DIR="ImageMagick-$PKG_VERSION" +PKG_DEPENDS_TARGET="toolchain libX11" +PKG_PRIORITY="optional" +PKG_SECTION="graphics" +PKG_SHORTDESC="ImageMagick" +PKG_LONGDESC="Software suite to create, edit, compose, or convert bitmap images" + +PKG_IS_ADDON="no" +PKG_AUTORECONF="no" + +PKG_CONFIGURE_OPTS_TARGET="--enable-static \ + --enable-shared \ + --with-quantum-depth=8 \ + --enable-hdri=no \ + --disable-openmp" diff --git a/packages/addons/addon-depends/mono-depends/libgdiplus/package.mk b/packages/addons/addon-depends/mono-depends/libgdiplus/package.mk new file mode 100644 index 0000000000..fc6f86f4ac --- /dev/null +++ b/packages/addons/addon-depends/mono-depends/libgdiplus/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="libgdiplus" +PKG_VERSION="4.2" +PKG_REV="0" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="https://github.com/mono/libgdiplus" +PKG_URL="https://github.com/mono/libgdiplus/archive/$PKG_VERSION.tar.gz" +PKG_DEPENDS_TARGET="toolchain giflib libjpeg-turbo tiff libXext libexif glib cairo" +PKG_SECTION="tools" +PKG_PRIORITY="optional" +PKG_SHORTDESC="libgiplus" +PKG_LONGDESC="An Open Source implementation of the GDI+ API" + +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" +PKG_CONFIGURE_OPTS_TARGET="--enable-shared \ + --with-libgif \ + --with-libjpeg \ + --with-libtiff" diff --git a/packages/addons/addon-depends/mono-depends/mono_sqlite/package.mk b/packages/addons/addon-depends/mono-depends/mono_sqlite/package.mk new file mode 100644 index 0000000000..a579d999db --- /dev/null +++ b/packages/addons/addon-depends/mono-depends/mono_sqlite/package.mk @@ -0,0 +1,32 @@ +################################################################################ +# 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 . +################################################################################ + +. $ROOT/$PACKAGES/databases/sqlite/package.mk + +PKG_NAME="mono_sqlite" +PKG_URL="" +PKG_DEPENDS_TARGET="toolchain sqlite" +PKG_SHORTDESC="sqlite for mono" +PKG_LONGDESC="libsqlite built shared for mono" + +PKG_CONFIGURE_OPTS_TARGET="$PKG_CONFIGURE_OPTS_TARGET --disable-static --enable-shared" + +unpack() { + mkdir -p $PKG_BUILD + cp -r $(get_build_dir sqlite)/* $PKG_BUILD/ +} diff --git a/packages/addons/addon-depends/mono-depends/mono_sqlite/sources/trigger_unpack b/packages/addons/addon-depends/mono-depends/mono_sqlite/sources/trigger_unpack new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/addons/service/emby/changelog.txt b/packages/addons/service/emby/changelog.txt new file mode 100644 index 0000000000..30cf79a734 --- /dev/null +++ b/packages/addons/service/emby/changelog.txt @@ -0,0 +1,2 @@ +8.0.100 +- Initial release diff --git a/packages/addons/service/emby/icon/icon.png b/packages/addons/service/emby/icon/icon.png new file mode 100644 index 0000000000..2674bc985b Binary files /dev/null and b/packages/addons/service/emby/icon/icon.png differ diff --git a/packages/addons/service/emby/package.mk b/packages/addons/service/emby/package.mk new file mode 100644 index 0000000000..703703c99a --- /dev/null +++ b/packages/addons/service/emby/package.mk @@ -0,0 +1,60 @@ +################################################################################ +# 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="emby" +PKG_VERSION="3.0.5972" +PKG_REV="100" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://emby.media" +PKG_URL="https://github.com/MediaBrowser/Emby/releases/download/$PKG_VERSION/Emby.Mono.zip" +PKG_DEPENDS_TARGET="toolchain mono imagemagick" +PKG_PRIORITY="optional" +PKG_SECTION="service" +PKG_SHORTDESC="Emby: a personal media server" +PKG_LONGDESC="Emby ($PKG_VERSION) brings your home videos, music, and photos together, automatically converting and streaming your media on-the-fly to any device" +PKG_MAINTAINER="Anton Voyl (awiouy)" + +PKG_IS_ADDON="yes" +PKG_ADDON_NAME="Emby (beta)" +PKG_ADDON_TYPE="xbmc.service" +PKG_ADDON_PROVIDES="" +PKG_ADDON_REPOVERSION="8.0" +PKG_ADDON_REQUIRES="tools.mono:0.0.0" + +PKG_AUTORECONF="no" + +unpack() { + mkdir -p $PKG_BUILD +} + +make_target() { + : # nop +} + +makeinstall_target() { + : # nop +} + +addon() { + mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/Emby.Mono + unzip -q $ROOT/$SOURCES/$PKG_NAME/$PKG_SOURCE_NAME -d $ADDON_BUILD/$PKG_ADDON_ID/Emby.Mono + + mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/lib + cp -PR $(get_build_dir imagemagick)/.install_pkg/usr/lib/* $ADDON_BUILD/$PKG_ADDON_ID/lib/ +} diff --git a/packages/addons/service/emby/source/bin/emby.start b/packages/addons/service/emby/source/bin/emby.start new file mode 100644 index 0000000000..dbed4da513 --- /dev/null +++ b/packages/addons/service/emby/source/bin/emby.start @@ -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.emby + +chmod +x $ADDON_DIR/bin/* + +mkdir -p $ADDON_HOME + +mono $ADDON_DIR/Emby.Mono/MediaBrowser.Server.Mono.exe -programdata $ADDON_HOME diff --git a/packages/addons/service/emby/source/default.py b/packages/addons/service/emby/source/default.py new file mode 100644 index 0000000000..3999a0eb31 --- /dev/null +++ b/packages/addons/service/emby/source/default.py @@ -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 . +################################################################################ + +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() diff --git a/packages/addons/service/emby/source/system.d/service.emby.service b/packages/addons/service/emby/source/system.d/service.emby.service new file mode 100644 index 0000000000..5859e94281 --- /dev/null +++ b/packages/addons/service/emby/source/system.d/service.emby.service @@ -0,0 +1,13 @@ +[Unit] +Description=Emby - streaming server +Documentation=http://emby.media +After=network.target +Requires=network.target + +[Service] +ExecStart=/bin/sh /storage/.kodi/addons/service.emby/bin/emby.start +Restart=always + +[Install] +WantedBy=kodi.target + diff --git a/packages/addons/tools/mono/changelog.txt b/packages/addons/tools/mono/changelog.txt new file mode 100644 index 0000000000..30cf79a734 --- /dev/null +++ b/packages/addons/tools/mono/changelog.txt @@ -0,0 +1,2 @@ +8.0.100 +- Initial release diff --git a/packages/addons/tools/mono/icon/icon.png b/packages/addons/tools/mono/icon/icon.png new file mode 100644 index 0000000000..68e87967df Binary files /dev/null and b/packages/addons/tools/mono/icon/icon.png differ diff --git a/packages/addons/tools/mono/package.mk b/packages/addons/tools/mono/package.mk new file mode 100644 index 0000000000..2fe396d95a --- /dev/null +++ b/packages/addons/tools/mono/package.mk @@ -0,0 +1,109 @@ +################################################################################ +# 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="mono" +PKG_VERSION="4.0.5.1" +PKG_REV="100" +PKG_ARCH="any" +PKG_LICENSE="MIT" +PKG_SITE="http://www.mono-project.com" +PKG_URL="http://download.mono-project.com/sources/mono/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_SOURCE_DIR="$PKG_NAME-${PKG_VERSION%.*}" +PKG_DEPENDS_TARGET="toolchain mono:host libgdiplus sqlite mono_sqlite zlib" +PKG_PRIORITY="optional" +PKG_SECTION="tools" +PKG_SHORTDESC="Cross platform, open source .NET framework" +PKG_LONGDESC="Mono ($PKG_VERSION) is a software platform designed to allow developers to easily create cross platform applications part of the .NET Foundation" +PKG_MAINTAINER="Anton Voyl (awiouy)" + +PKG_IS_ADDON="yes" +PKG_ADDON_NAME="Mono (beta)" +PKG_ADDON_TYPE="xbmc.python.script" +PKG_ADDON_PROVIDES="" +PKG_ADDON_REPOVERSION="8.0" + +PKG_AUTORECONF="yes" + +prefix="/storage/.kodi/addons/$PKG_SECTION.$PKG_NAME" +configure_opts="--prefix=$prefix \ + --bindir=$prefix/bin \ + --sysconfdir=$prefix/etc \ + --disable-boehm \ + --without-mcs-docs" +PKG_CONFIGURE_OPTS_HOST="$configure_opts --disable-libraries --enable-static" +PKG_CONFIGURE_OPTS_TARGET="$configure_opts --disable-mcs-build" + +pre_configure_host() { + cp -PR ../* . +} + +makeinstall_host() { + : # nop +} + +pre_configure_target() { + cp -PR ../* . +} + +makeinstall_target() { + : # nop +} + +addon() { + mkdir -p "$ADDON_BUILD/$PKG_ADDON_ID" + + make -C "$PKG_BUILD/.$HOST_NAME" install DESTDIR="$ROOT/$ADDON_BUILD/$PKG_ADDON_ID" + make -C "$PKG_BUILD/.$TARGET_NAME" install DESTDIR="$ROOT/$ADDON_BUILD/$PKG_ADDON_ID" + + mv "$ADDON_BUILD/$PKG_ADDON_ID/storage/.kodi/addons/$PKG_SECTION.$PKG_NAME"/* \ + "$ADDON_BUILD/$PKG_ADDON_ID/" + + rm -fr "$ADDON_BUILD/$PKG_ADDON_ID/storage" + rm -fr "$ADDON_BUILD/$PKG_ADDON_ID/include" + rm -fr "$ADDON_BUILD/$PKG_ADDON_ID/share/man" + + $STRIP "$ADDON_BUILD/$PKG_ADDON_ID/bin/mono" + + mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/lib + for p in \ + bigreqsproto \ + cairo \ + inputproto \ + kbproto \ + libexif \ + libpthread-stubs \ + libX11 \ + libXau \ + libxcb \ + libXext \ + pixman \ + xcb-proto \ + xcmiscproto \ + xextproto \ + xproto \ + xtrans \ + libgdiplus \ + mono_sqlite + do + d=$(get_build_dir $p)/.install_pkg/usr/lib + if [ -d $d ] + then + cp -PR $d/* $ADDON_BUILD/$PKG_ADDON_ID/lib/ + fi + done +} diff --git a/packages/addons/tools/mono/source/default.py b/packages/addons/tools/mono/source/default.py new file mode 100644 index 0000000000..67e12970fe --- /dev/null +++ b/packages/addons/tools/mono/source/default.py @@ -0,0 +1,22 @@ +################################################################################ +# 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 . +################################################################################ + +import xbmcgui + +dialog = xbmcgui.Dialog() +dialog.ok('', 'This is a console-only addon')