-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #837 from awiouy/lcdd
lcdd: initial addon
- Loading branch information
Showing
27 changed files
with
185 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
100 | ||
- Initial addon |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
################################################################################ | ||
# 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 <http://www.gnu.org/licenses/>. | ||
################################################################################ | ||
|
||
PKG_NAME="lcdd" | ||
PKG_VERSION="0.5.7-cvs20140217" | ||
PKG_REV="100" | ||
PKG_ARCH="any" | ||
PKG_LICENSE="GPL" | ||
PKG_SITE="http://lcdproc.org/" | ||
PKG_URL="$DISTRO_SRC/lcdproc-$PKG_VERSION.tar.xz" | ||
PKG_SOURCE_DIR="lcdproc-$PKG_VERSION" | ||
PKG_DEPENDS_TARGET="toolchain freetype libftdi1 libhid libusb netbsd-curses serdisplib" | ||
PKG_SECTION="service" | ||
PKG_SHORTDESC="LCDproc: Software to display system information from your Linux/*BSD box on a LCD" | ||
PKG_LONGDESC="LCDproc ($PKG_VERSION) is a piece of software that displays real-time system information from your Linux/*BSD box on a LCD. The server supports several serial devices: Matrix Orbital, Crystal Fontz, Bayrad, LB216, LCDM001 (kernelconcepts.de), Wirz-SLI, Cwlinux(.com) and PIC-an-LCD; and some devices connected to the LPT port: HD44780, STV5730, T6963, SED1520 and SED1330. Various clients are available that display things like CPU load, system load, memory usage, uptime, and a lot more." | ||
PKG_AUTORECONF="yes" | ||
|
||
PKG_IS_ADDON="yes" | ||
PKG_ADDON_NAME="LCDproc" | ||
PKG_ADDON_TYPE="xbmc.service" | ||
|
||
PKG_CONFIGURE_OPTS_TARGET="--with-ft-prefix=$SYSROOT_PREFIX/usr \ | ||
--enable-libusb \ | ||
--enable-libftdi \ | ||
--disable-libX11 \ | ||
--enable-libhid \ | ||
--disable-libpng \ | ||
--enable-drivers=all \ | ||
--enable-seamless-hbars" | ||
|
||
pre_make_target() { | ||
# dont build parallel | ||
MAKEFLAGS=-j1 | ||
} | ||
|
||
addon() { | ||
drivers="none|$(cat $ROOT/$PKG_BUILD/.$TARGET_NAME/config.log | sed -n "s|^DRIVERS=' \(.*\)'|\1|p" | sed "s|.so||g" | tr ' ' '|')" | ||
|
||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/config | ||
|
||
cp -PR $PKG_DIR/resources $ADDON_BUILD/$PKG_ADDON_ID | ||
|
||
cp -PR $PKG_BUILD/.install_pkg/etc/LCDd.conf $ADDON_BUILD/$PKG_ADDON_ID/config/ | ||
cp -PR $PKG_BUILD/.install_pkg/usr/lib $ADDON_BUILD/$PKG_ADDON_ID/lib/ | ||
cp -PR $PKG_BUILD/.install_pkg/usr/sbin $ADDON_BUILD/$PKG_ADDON_ID/bin/ | ||
|
||
cp -L $(get_build_dir serdisplib)/.install_pkg/usr/lib/libserdisp.so.1 $ADDON_BUILD/$PKG_ADDON_ID/lib/ | ||
|
||
sed -e "s|^DriverPath=.*$|DriverPath=/storage/.kodi/addons/service.lcdd/lib/lcdproc/|" \ | ||
-e "s|^#Foreground=.*$|Foreground=no|" \ | ||
-e "s|^#ServerScreen=.*$|ServerScreen=blank|" \ | ||
-e "s|^#Backlight=.*$|Backlight=open|" \ | ||
-e "s|^#Heartbeat=.*$|Heartbeat=open|" \ | ||
-e "s|^#TitleSpeed=.*$|TitleSpeed=4|" \ | ||
-e "s|^#Hello=\" Welcome to\"|Hello=\"Welcome to\"|" \ | ||
-e "s|^#Hello=\" LCDproc!\"|Hello=\"$DISTRONAME\"|" \ | ||
-e "s|^#GoodBye=\"Thanks for using\"|GoodBye=\"Thanks for using\"|" \ | ||
-e "s|^#GoodBye=\" LCDproc!\"|GoodBye=\"$DISTRONAME\"|" \ | ||
-e "s|^#normal_font=.*$|normal_font=/usr/share/fonts/liberation/LiberationMono-Bold.ttf|" \ | ||
-i $ADDON_BUILD/$PKG_ADDON_ID/config/LCDd.conf | ||
|
||
sed -e "s/@DRIVERS@/$drivers/" \ | ||
-i $ADDON_BUILD/$PKG_ADDON_ID/resources/settings.xml | ||
|
||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8" standalone="yes"?> | ||
<settings> | ||
<category label="30000"> | ||
<setting label="30001" id="LCD_DRIVER" type="select" values="@DRIVERS@" default="none" /> | ||
</category> | ||
</settings> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/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 <http://www.gnu.org/licenses/>. | ||
################################################################################ | ||
|
||
. /etc/profile | ||
oe_setup_addon service.lcdd | ||
|
||
if [ -z "$LCD_DRIVER" -o "$LCD_DRIVER" == "none" ]; then | ||
exit 0 | ||
fi | ||
|
||
LCDCONF=$ADDON_HOME/LCDd.conf | ||
|
||
if [ ! -f $LCDCONF ]; then | ||
if [ -f /storage/.cache/LCDd.conf ]; then | ||
mv /storage/.cache/LCDd.conf $LCDCONF | ||
else | ||
cp $ADDON_DIR/config/LCDd.conf $LCDCONF | ||
fi | ||
fi | ||
|
||
LCDd -f -c $LCDCONF -d $LCD_DRIVER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <http://www.gnu.org/licenses/>. | ||
################################################################################ | ||
|
||
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() |
11 changes: 11 additions & 0 deletions
11
packages/addons/service/lcdd/source/resources/language/English/strings.po
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Kodi Media Center language file | ||
msgid "" | ||
msgstr "" | ||
|
||
msgctxt "#30000" | ||
msgid "Configuration" | ||
msgstr "" | ||
|
||
msgctxt "#30001" | ||
msgid "LCD driver" | ||
msgstr "" |
14 changes: 14 additions & 0 deletions
14
packages/addons/service/lcdd/source/system.d/service.lcdd.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[Unit] | ||
Description=LCDProc | ||
After=multi-user.target | ||
|
||
[Service] | ||
ExecStart=/bin/sh /storage/.kodi/addons/service.lcdd/bin/lcdd.start | ||
TimeoutStopSec=1s | ||
Restart=on-failure | ||
RestartSec=5 | ||
StartLimitInterval=30 | ||
StartLimitBurst=5 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.