Skip to content

Commit

Permalink
LibreELEC: new distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
lrusak committed Mar 11, 2016
1 parent 0de0a2a commit 308e4fa
Show file tree
Hide file tree
Showing 14 changed files with 435 additions and 0 deletions.
Binary file added distributions/LibreELEC/LibreELEC.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
203 changes: 203 additions & 0 deletions distributions/LibreELEC/options
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
# Name of the Distro to build (full name, without special characters)
DISTRONAME="LibreELEC"

# short project description
DESCRIPTION="LibreELEC is a fast and user-friendly Kodi Entertainment Center distribution."

# Welcome Message for e.g. SSH Server (up to 5 Lines)
GREETING0="##############################################"
GREETING1="# LibreELEC #"
GREETING2="# http://libreelec.tv #"
GREETING3="##############################################"
GREETING4=""

# Root password to integrate in the target system
ROOT_PASSWORD="libreelec"

# Install glibc locales to the build (yes / no)
GLIBC_LOCALES="yes"

# Mediacenter to use (kodi / no)
MEDIACENTER="kodi"

# Skins to install (Confluence)
# Space separated list is supported,
# e.g. SKINS="Confluence"
SKINS="Confluence"

# Default Skin (Confluence)
SKIN_DEFAULT="Confluence"

# install extra subtitle Fonts for KODI (yes / no)
KODI_EXTRA_FONTS="yes"

# build and install PulseAudio support (yes / no)
PULSEAUDIO_SUPPORT="yes"

# build and install espeak support (yes / no)
ESPEAK_SUPPORT="yes"

# build and install with non-free support
# (RAR compression support in KODI) (yes / no)
KODI_NONFREE_SUPPORT="yes"

# build and install with BluRay support (yes / no)
KODI_BLURAY_SUPPORT="yes"

# build and install with BD+ support
# (BD+ decryption support in KODI) (yes / no)
BLURAY_BDPLUS_SUPPORT="yes"

# build and install with AACS support
# (BD decryption support in KODI) (yes / no)
BLURAY_AACS_SUPPORT="yes"

# build and install with DVDCSS support
# (DVD decryption support in KODI) (yes / no)
KODI_DVDCSS_SUPPORT="yes"

# additional drivers to install:
# for a list of additinoal drivers see packages/linux-drivers
# Space separated list is supported,
# e.g. ADDITIONAL_DRIVERS="DRIVER1 DRIVER2"
ADDITIONAL_DRIVERS="RTL8192CU RTL8192DU RTL8192EU RTL8188EU RTL8812AU dvbhdhomerun"

# build and install bluetooth support (yes / no)
BLUETOOTH_SUPPORT="yes"

# build and install with KODI webfrontend (yes / no)
KODI_WEBSERVER_SUPPORT="yes"

# build and install Avahi (Zeroconf) daemon (yes / no)
AVAHI_DAEMON="yes"

# build with UPnP support (yes / no)
KODI_UPNP_SUPPORT="yes"

# build with MySQL support (yes / no)
KODI_MYSQL_SUPPORT="yes"

# build xbmc with sshlib support (yes / no)
KODI_SSHLIB_SUPPORT="yes"

# build xbmc with optical drive support (yes / no)
KODI_OPTICAL_SUPPORT="yes"

# build with AirPlay support (stream videos from iDevices to KODI) (yes / no)
KODI_AIRPLAY_SUPPORT="yes"

# build with AirTunes support (stream music from iDevices to KODI) (yes / no)
KODI_AIRTUNES_SUPPORT="yes"

# build with libnfs support (mounting nfs shares with KODI) (yes / no)
KODI_NFS_SUPPORT="yes"

# build with Samba Client support (mounting SAMBA shares with KODI) (yes / no)
KODI_SAMBA_SUPPORT="yes"

# include initial language addons for Kodi (yes / no)
KODI_LANGUAGE_ADDONS="yes"

# build with NFS support (mounting nfs shares via the OS) (yes / no)
NFS_SUPPORT="yes"

# build with Samba Client support (mounting samba shares via the OS) (yes / no)
SAMBA_SUPPORT="yes"

# build and install Samba Server (yes / no)
SAMBA_SERVER="yes"

# build and install SFTP Server (yes / no)
SFTP_SERVER="yes"

# build and install diskmounter support (udevil)
# this service provide auto mounting support for external drives in the
# mediacenter also automount internally drives at boottime via udev (yes / no)
UDEVIL="yes"

# build and install exFAT fuse support (yes / no)
EXFAT="yes"

# build and install NTFS-3G fuse support (yes / no)
NTFS3G="yes"

# build and install hfs filesystem utilities (yes / no)
HFSTOOLS="yes"

# Windowmanager to use (ratpoison / fluxbox / none)
WINDOWMANAGER="fluxbox"

# Xorg Graphic drivers to use (all / i915,i965,r200,r300,r600,nvidia)
# Space separated list is supported,
# e.g. GRAPHIC_DRIVERS="i915 i965 r300 r600 radeonsi nvidia"
GRAPHIC_DRIVERS="r300 r600 radeonsi i915 i965 nvidia nvidia-legacy"

# build and install remote support (yes / no)
REMOTE_SUPPORT="yes"

# build and install ATV IR remote support (yes / no)
ATVCLIENT_SUPPORT="yes"

# build and install IRServer IR/LCD support (yes / no)
IRSERVER_SUPPORT="yes"

# build and install Joystick support (yes / no)
JOYSTICK_SUPPORT="yes"

# build and install CEC adapter support (yes / no)
CEC_SUPPORT="yes"

# build and install iSCSI support - iscsistart (yes / no)
ISCSI_SUPPORT="yes"

# LCD driver to Use - Possible drivers are ( Comma seperated:
# bayrad,CFontz,CFontz633,CFontzPacket,curses,CwLnx,dm140,
# ea65,EyeboxOne,g15,glcd,glcdlib,glk,hd44780,i2500vfd,
# icp_a106,imon,imonlcd,IOWarrior,irman,irtrans,
# joy,lb216,lcdm001,lcterm,lirc,lis,MD8800,mdm166a,
# ms6931,mtc_s16209x,MtxOrb,mx5000,NoritakeVFD,
# picolcd,pyramid,sed1330,sed1520,serialPOS,
# serialVFD,shuttleVFD,sli,stv5730,SureElec,svga,vlsys_m428
# 'all' compiles all drivers;
# 'all,!xxx,!yyy' de-selects previously selected drivers
# "none" for disable LCD support
LCD_DRIVER="irtrans,imon,imonlcd,mdm166a,MtxOrb,lis,dm140,hd44780,CFontz,SureElec,vlsys_m428,serialVFD,shuttleVFD"

# Support for partitioning and formating disks in initramfs (yes / no)
# This adds support for parted and mkfs.ext3/4 to initramfs for OEM usage
INITRAMFS_PARTED_SUPPORT="no"

# build with swap support (yes / no)
SWAP_SUPPORT="no"

# swap support enabled per default (yes / no)
SWAP_ENABLED_DEFAULT="no"

# swapfile size if SWAP_SUPPORT=yes in MB
SWAPFILESIZE="256"

# build with installer (yes / no)
INSTALLER_SUPPORT="yes"

# Testpackages for development (yes / no)
TESTING="no"

# OEM packages for OEM's (yes / no)
OEM_SUPPORT="no"

# build and install nano text editor (yes / no)
NANO_EDITOR="yes"

# cron support (yes / no)
CRON_SUPPORT="yes"

# Distribution Specific source location
DISTRO_MIRROR="http://sources.openelec.tv/mirror"
DISTRO_SRC="http://sources.openelec.tv/$LIBREELEC_VERSION"

# Addon Server Url
ADDON_SERVER_URL="http://addons.openelec.tv"

# set the addon dirs
ADDON_PATH="$ADDON_VERSION/$PROJECT/$TARGET_ARCH"
ADDON_URL="$ADDON_SERVER_URL/$ADDON_PATH"
Binary file added distributions/LibreELEC/splash/splash-1024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added distributions/LibreELEC/splash/splash-full.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 62 additions & 0 deletions packages/mediacenter/LibreELEC-settings/package.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2016 Stephan Raue ([email protected])
#
# OpenELEC 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.
#
# OpenELEC 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 OpenELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################

PKG_NAME="LibreELEC-settings"
PKG_VERSION="6d8d3b6"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="prop."
PKG_SITE="http://www.libreelec.tv"
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_DEPENDS_TARGET="toolchain Python connman pygobject dbus-python"
PKG_PRIORITY="optional"
PKG_SECTION=""
PKG_SHORTDESC="LibreELEC-settings: Settings dialog for LibreELEC"
PKG_LONGDESC="LibreELEC-settings: is a settings dialog for LibreELEC"

PKG_IS_ADDON="no"
PKG_AUTORECONF="no"

PKG_MAKE_OPTS_TARGET="DISTRONAME=$DISTRONAME ROOT_PASSWORD=$ROOT_PASSWORD"

if [ "$DISPLAYSERVER" = "x11" ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET setxkbmap"
else
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET bkeymaps"
fi

post_makeinstall_target() {
mkdir -p $INSTALL/usr/lib/libreelec
cp $PKG_DIR/scripts/* $INSTALL/usr/lib/libreelec

# # bluetooth is optional
# if [ ! "$BLUETOOTH_SUPPORT" = yes ]; then
# rm -f resources/lib/modules/bluetooth.py
# fi

python -Wi -t -B $ROOT/$TOOLCHAIN/lib/python2.7/compileall.py $INSTALL/usr/share/kodi/addons/service.libreelec.settings/resources/lib/ -f
rm -rf `find $INSTALL/usr/share/kodi/addons/service.libreelec.settings/resources/lib/ -name "*.py"`

python -Wi -t -B $ROOT/$TOOLCHAIN/lib/python2.7/compileall.py $INSTALL/usr/share/kodi/addons/service.libreelec.settings/oe.py -f
rm -rf $INSTALL/usr/share/kodi/addons/service.libreelec.settings/oe.py
}

post_install() {
enable_service backup-restore.service
enable_service factory-reset.service
}
45 changes: 45 additions & 0 deletions packages/mediacenter/LibreELEC-settings/scripts/backup-restore
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2014 Stephan Raue ([email protected])
#
# OpenELEC 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.
#
# OpenELEC 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 OpenELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################

BACKUP_FILE=`ls -1 /storage/.restore/??????????????.tar 2>/dev/null | tail -1`

if [ -f "$BACKUP_FILE" ] ; then
echo -en "please wait.. checking backup file: "
tar tf $BACKUP_FILE &>/dev/null
ret=$?
if [ $ret -eq 0 ] ; then
echo OK
echo -en "restoring.. this may take long time to complete, please wait.. "
rm -rf /storage/.kodi &>/dev/null
rm -rf /storage/.cache &>/dev/null
rm -rf /storage/.config &>/dev/null
tar xf $BACKUP_FILE -C / &>/dev/null
rm -f $BACKUP_FILE &>/dev/null
echo done
echo "rebooting in 5s..."
sleep 5
else
echo FAILED
rm -f $BACKUP_FILE &>/dev/null
echo "rebooting in 30s..."
sleep 30
fi
fi
sync
reboot -f
72 changes: 72 additions & 0 deletions packages/mediacenter/LibreELEC-settings/scripts/factory-reset
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2014 Stephan Raue ([email protected])
#
# OpenELEC 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.
#
# OpenELEC 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 OpenELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################

get_target() {
for arg in $(cat /proc/cmdline); do
case $arg in
disk=*)
disk="${arg#*=}"
case $disk in
LABEL=*)
label="${disk#*=}"
target=`blkid -L $label`
;;
UUID=*)
uuid="${disk#*=}"
target=`blkid -U $uuid`
;;
/*)
target=$disk
;;
esac
;;
esac
done
}

if [ -f /storage/.cache/reset_oe ] ; then
# hard reset
rm -f /storage/.cache/reset_oe
get_target
if [ ! -z $target ] ; then
echo "hard resetting..."
umount /storage
mke2fs -t ext4 -m 0 $target 2>&1 >/dev/null
if [ ! -z $label ] ; then
tune2fs -U random -L $label $target
fi
if [ ! -z $uuid ] ; then
tune2fs -U $uuid $target
fi
echo "done"
sleep 5
fi
elif [ -f /storage/.cache/reset_xbmc ] ; then
# soft reset
rm -f /storage/.cache/reset_xbmc
get_target
if [ ! -z $target ] ; then
echo "soft resetting..."
rm -rf /storage/.??* 2>&1 >/dev/null
echo "done"
sleep 5
fi
fi
sync
reboot -f
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=Restoring Backup
DefaultDependencies=no

[Service]
Type=idle
ExecStart=/usr/lib/libreelec/backup-restore
StandardInput=tty-force
StandardOutput=inherit
StandardError=inherit
Loading

0 comments on commit 308e4fa

Please sign in to comment.