Skip to content
Permalink
Browse files

tvmosaic: initial addon

  • Loading branch information...
awiouy committed Jun 4, 2018
1 parent b7a1c2c commit cdc4d8551b894f3a9d76efc5882bd80bb00f4ba7
@@ -0,0 +1,72 @@
################################################################################
# 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="tvmosaic"
PKG_VERSION="16296"
PKG_SHA256="e25df51ccc939032c48b910f9e9971a2644fd9b1da98ec8bfe6e2245617f6e1a"
PKG_REV="99u"
PKG_ARCH="arm"
PKG_LICENSE="Prop."
PKG_SITE="https://tv-mosaic.com"
PKG_URL="http://78.47.27.219/download/installations/raspberry-linux-arm/tvmosaic-raspberry-linux-arm-1.0.0.tar.gz"
PKG_DEPENDS_TARGET="toolchain"
PKG_SECTION="service"
PKG_SHORTDESC="TV Mosaic"
PKG_LONGDESC="TV Mosaic ($PKG_VERSION) live and recorded TV for Kodi and DLNA clients"
PKG_TOOLCHAIN="manual"

PKG_IS_ADDON="yes"
PKG_ADDON_NAME="TV Mosaic"
PKG_ADDON_TYPE="xbmc.service"
PKG_MAINTAINER="Anton Voyl (awiouy)"

debug_strip() {
: # do not strip executables in addon
}

unpack() {
mkdir -p $PKG_BUILD
tar -xzf $SOURCES/$PKG_NAME/$PKG_SOURCE_NAME -C $PKG_BUILD
tar -xzf $PKG_BUILD/tvmosaic-raspberry-linux-armhf_openelec-*.tar.gz -C $PKG_BUILD
}

addon() {
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin
cp $PKG_BUILD/tvmosaic/tvmosaic_reg \
$PKG_BUILD/tvmosaic/tvmosaic_server \
$PKG_BUILD/tvmosaic/version.dat \
$ADDON_BUILD/$PKG_ADDON_ID/bin

mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/config/shared.inst/RecordedTV \
$ADDON_BUILD/$PKG_ADDON_ID/config/shared.inst/channel_logo \
$ADDON_BUILD/$PKG_ADDON_ID/config/shared.inst/xmltv
cp -r $PKG_BUILD/tvmosaic/data \
$PKG_BUILD/tvmosaic/shared.inst \
$ADDON_BUILD/$PKG_ADDON_ID/config
echo $PKG_REV > $ADDON_BUILD/$PKG_ADDON_ID/config/pkg_rev

mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/lib
cp -L $PKG_BUILD/tvmosaic/lib/libcares.so.2 \
$PKG_BUILD/tvmosaic/lib/libdvbapi.so \
$PKG_BUILD/tvmosaic/lib/libdvben50221.so \
$PKG_BUILD/tvmosaic/lib/libiconv.so.2 \
$PKG_BUILD/tvmosaic/lib/libidn.so.11 \
$PKG_BUILD/tvmosaic/lib/libssh2.so.1 \
$PKG_BUILD/tvmosaic/lib/libucsi.so \
$ADDON_BUILD/$PKG_ADDON_ID/lib
}
@@ -0,0 +1,25 @@
#!/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.tvmosaic

export TVMOSAIC_ROOT_CONFIG_DIR="$ADDON_HOME"

tvmosaic_server -command_line_mode
@@ -0,0 +1,40 @@
#!/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.tvmosaic

export TVMOSAIC_ROOT_CONFIG_DIR="$ADDON_HOME"

pkg_rev() {
cat "$1/pkg_rev" 2> /dev/null
}

if [ "$(pkg_rev $ADDON_DIR/config)" != "$(pkg_rev $ADDON_HOME)" ]; then
cp -r "$ADDON_DIR/config/"* "$ADDON_HOME"
fi

if [ -f "$ADDON_HOME/tvmosaic_configuration.xml" ]; then
tvmosaic_reg -reginstall "$ADDON_HOME/data/common/product_info/tvmosaic.xml" update
else
tvmosaic_reg -preparenewinstall "$ADDON_DIR/bin" "$ADDON_HOME/data" "$ADDON_HOME/shared.inst"
tvmosaic_reg -reginstall "$ADDON_HOME/data/common/product_info/tvmosaic.xml" install
fi

tvmosaic_server
@@ -0,0 +1,13 @@
[Unit]
Description=TV Mosaic Server
Documentation=https://tv-mosaic.com
After=network-online.target
Requires=network-online.target

[Service]
ExecStart=/bin/sh /storage/.kodi/addons/service.tvmosaic/bin/tvmosaic.start
Type=forking
Restart=always

[Install]
WantedBy=kodi.target

0 comments on commit cdc4d85

Please sign in to comment.
You can’t perform that action at this time.