diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /media-plugins/vdr-systeminfo |
reinit the tree, so we can have metadata
Diffstat (limited to 'media-plugins/vdr-systeminfo')
-rw-r--r-- | media-plugins/vdr-systeminfo/Manifest | 13 | ||||
-rw-r--r-- | media-plugins/vdr-systeminfo/files/confd | 19 | ||||
-rw-r--r-- | media-plugins/vdr-systeminfo/files/rc-addon.sh | 12 | ||||
-rw-r--r-- | media-plugins/vdr-systeminfo/files/systeminfo.sh | 114 | ||||
-rw-r--r-- | media-plugins/vdr-systeminfo/files/vdr-systeminfo-0.1.3_vdr-2.3.1.patch | 69 | ||||
-rw-r--r-- | media-plugins/vdr-systeminfo/metadata.xml | 8 | ||||
-rw-r--r-- | media-plugins/vdr-systeminfo/vdr-systeminfo-0.1.1.ebuild | 28 | ||||
-rw-r--r-- | media-plugins/vdr-systeminfo/vdr-systeminfo-0.1.3.ebuild | 39 | ||||
-rw-r--r-- | media-plugins/vdr-systeminfo/vdr-systeminfo-0.1.4.ebuild | 35 |
9 files changed, 337 insertions, 0 deletions
diff --git a/media-plugins/vdr-systeminfo/Manifest b/media-plugins/vdr-systeminfo/Manifest new file mode 100644 index 000000000000..f8f376962228 --- /dev/null +++ b/media-plugins/vdr-systeminfo/Manifest @@ -0,0 +1,13 @@ +AUX confd 353 SHA256 3b3f8337610007fea55999aa8a754778c77cdca77a37d68792de193bda5f4577 SHA512 aad713c22e114f8a2654b6219110c70843fbec4ce6328350d883241ae0c3c6defec380a70f48e5e5aedf6954f5a14237a45b4c9caeda0ea9f81ebac244041713 WHIRLPOOL b6f2d6130e4d79c495d15730eecb56dc7f09d379f20cab90da1a784827f374b2838db4e992cbd501e1b4b71be40be457aa882a73de0905fd8bd0d318520b4ba1 +AUX rc-addon.sh 224 SHA256 441252095184b43aae049083f7fbcf684a5829ab1f2d480b734e54289f092416 SHA512 818e032afe9e5dd6c9275bf2ec0dce38446af6c601f636b21ccd82a2b1f06b3545f548e525749bc365fdd6e4515a7ae2cf5d1394bee7a315c1bb0024dde60d32 WHIRLPOOL cf3a07c510fbb2875944905dd2e617d8c4a9014752f36126503e7ed5d8e55079584bc11828e729717b7733ca2a569f2650f9250b6075b4a2ffdd52578b4cc549 +AUX systeminfo.sh 3108 SHA256 2561140dcf598822d074a1773cf553067ce5947a5689c3b95faca8526d3c2ac0 SHA512 ae5dd5935a66cdb18c663fd19f51e60df29532da4f49abebda4f16f8c53bf65228f9b4fc79e3571bd5519526f6c1e74307aa49c8dc61392c7d92c9ddf5d77cf1 WHIRLPOOL f44088a97ceebee6eb08b6bad179ae32385c3057d62d374976b9fb30c9bf4f01764062f39943cb64c1463e86e7e01e02c935633ae97b808c47bf5322dc7eb2ea +AUX vdr-systeminfo-0.1.3_vdr-2.3.1.patch 1880 SHA256 b0fc44ee738d4f05666bcb36bf23494b057946c848e57972e38e3e50e22c489d SHA512 67213d94e8f3a5e591a71dc559ef85acb254c9edd4f39bdd87384b1bd21ff1e9b2876e0fcbc81eba44c7512ab419a0ed5259d759e243b63a3ffa745c8eaa64d7 WHIRLPOOL fc73a00bad345d370220a791b316cba239b96561f7f5846f8f90b9d6217ad592963d9f6fc920eebacf41195893498605a3b9e2f0046c7668bc4af559193745e0 +DIST vdr-systeminfo-0.1.1.tar.bz2 16816 SHA256 2764e88c07a84e4d42ab318e0cd7ad186b549c9843c6fed8e6aa964658685cc1 SHA512 9f107ebbf79e5ded9ee6a991c5c00236dabbce42d7588eb21b814dbaaf249ee7e681f979d7570031fd6eb1bd286afe3943ae4463dc930b7814f739fef3623e54 WHIRLPOOL 46c0cf77236eab8d2d3e96dd12af2e8ce3806c94ada4813e9818faefdce302dd6b3218e040c60d6d2d7c90d2c30789d223a7443a4b1bde6e12a3f0bc563e5cb0 +DIST vdr-systeminfo-0.1.3.tar.bz2 17234 SHA256 70862fd641b819c1bbf063c4c48e7ac52f05ec7046ba174922ab7ccb4c3b08a0 SHA512 9dd2c32632558dd6061e1aa9b76757bf76e0e781405412791343dd7249348fdf0b65c71d8054f55f8f763a75aa17d39bed96a86e4b06a4475642eab4624954fd WHIRLPOOL b34e2c52e19bc38b08b716da61491d27110f98ab998e07d56987bf5df496fa0d4174f4ac67917426d745eb2c273a400f811ec4c79b0cdf4249d4e07e785cf67f +DIST vdr-systeminfo-0.1.4.tar.bz2 18064 SHA256 eb3ba522b66afbff83b5d52f4400a6b78fb2f416a079f31c0a63b30b490ccc38 SHA512 16b53b0a9b4b4e101bbddf8b02546f04f7cdc27697cc66d0e1051fd8b57c9281e728f5aa552d8d900185e190f922f2e2ac2042ad0fe9c3b01800400bec3856ba WHIRLPOOL 1e526a028e596b1139da92227050f6d419746e6c31f5825a04cbba38ff1e351cc58e1306828ffa6a768c7b67d2e09866114e56fedc0ebffc82060bd0c0dc4c9c +EBUILD vdr-systeminfo-0.1.1.ebuild 573 SHA256 10c7dbeb8b47d7b4add9c72cae533bb4359017932e85cebbaaa4f184f22084f0 SHA512 10b0b6bb586077a80ccf58c99148abf9511b936122b0af5a2ff5425c75a983ef1b0a11f743c6dc6b3c15432536559206783f270732d18114b2bbe313ebe3922c WHIRLPOOL afcc71e3e0293a6aeff1ab167a1cf06a0a545da3e1e3cce50c5fd41d85b8c3d30e7bafc76e4c7afd6a644ea3943517d351fcb15b6ddb24e2fd4dc6c22824f460 +EBUILD vdr-systeminfo-0.1.3.ebuild 826 SHA256 aace24ca4132adf68372d972b5f8ffae6d7204d66d75f351cfb628daaca336cd SHA512 f2f24dfef86f6551979812a6db0f75e04c4d732274a3ff00b3cae12c035c27e3e479f0e633e85ea44a4a16b072d308ba59ec78aaf8b8afcfd4797d4b57ec999f WHIRLPOOL 6ee412fab39be3fc967474294e33e580c42c430caeeb0fcda21f35d50d8c293962a9c5db3de4cb6946570fef1de64494ef86cd906b8313067df3e297b7256826 +EBUILD vdr-systeminfo-0.1.4.ebuild 725 SHA256 98dee65da12eae0f03337d2f3760b7d86b17ae3df19a42d367887d42f98546e2 SHA512 a205fa609c344aa28ecedf14a9871825fd1e0e0783434741162a592ec49b6379766236611ad09f96dc7e17885db7411cb7ceb1e6683032ee2a6789014e55a0b8 WHIRLPOOL e1b34c2eff6b0da079fdeb3f02820494baf21bf792cede889e46aaf1bcd1c500ad41a1a5ad7319df864f9fce40fdd0eff294cf083c120e4bf92b080c8508295c +MISC ChangeLog 3312 SHA256 a5849d66f8b9a0ead382a7fa4c600462d12fb41835e8a9a4138e1622c243c6c9 SHA512 93e6644b22d4ea194dfac472d81fa25c1da87db07145b09ef1be3b417ad3aee845c418258a9bc6dbef2864e5bc8c88d097a95c12386417de753a1616f1ffc156 WHIRLPOOL 84210827961929db74a03e4f5abb7f681075cadcc91e792b5106d8de549e5f7d5b3a6a3645c7916b6508c335ee5c9cbdeb6138c491420beebebd33b44067b012 +MISC ChangeLog-2015 577 SHA256 8ab54eeea1ff5ed293802ae91a4aade96ebfce7eb2b460631c1eea493871bb83 SHA512 0d05227d9cfb3463a200c4b21e9a55d33ebabecf3ec8b2b0acbd96d6c052a0b1b5bb44c86405d28454dc11e9ab4fca47cced3c395eb5390974d0fbad39a3d51c WHIRLPOOL 013d82c35f83196c9c8bce5611586551aa8b3440e2e2d7cbf22121a6f2ae9d764dac8a5e874319ec003380c0ced647fba4889743ae2ddc7ae6abe1b08812504d +MISC metadata.xml 243 SHA256 161359b6e9eddec137a431eea66785e070bbc25fab3ae1b57f900e411fc37fe7 SHA512 f7d6e467a5a96c0afdd42df3c0f3866240defc5bbea5ccddf4c0b1a3c004225af5d46dab67d45a5ac34535391584f3b3727fe79ef6cef1a11413636bbc35cf06 WHIRLPOOL ebf59815181c251040396bb44206b875f6d996abcff030fdbf8355b47d6ea8c4f2669847ea1af194112de469258d7ca09ed77b682924ca495958a65f957dbf39 diff --git a/media-plugins/vdr-systeminfo/files/confd b/media-plugins/vdr-systeminfo/files/confd new file mode 100644 index 000000000000..93dad7854448 --- /dev/null +++ b/media-plugins/vdr-systeminfo/files/confd @@ -0,0 +1,19 @@ +# Global config file for VDR systeminfo plugin + +# I most cases here is no user activity needed +# Yust if you get wrong or no output in OSD of plugin +# you have something to change on next parameter +# Get right parameter by run 'sensors' on Konsole + +CPU_TEMP="temp2" + +MOBO_TEMP="temp1" + +FAN_1="fan2" + +FAN_2="fan1" + +DISK_1="/dev/hda" + +#DISK_2="/dev/hdc" + diff --git a/media-plugins/vdr-systeminfo/files/rc-addon.sh b/media-plugins/vdr-systeminfo/files/rc-addon.sh new file mode 100644 index 000000000000..ea18cf39659d --- /dev/null +++ b/media-plugins/vdr-systeminfo/files/rc-addon.sh @@ -0,0 +1,12 @@ +# +# rc-addon-script for plugin systeminfo +# +# Joerg Bornkessel <hd_brummy@gentoo.org> + +: ${SYSTEMINFO_SCRIPT:=/usr/share/vdr/systeminfo/systeminfo.sh} + +plugin_pre_vdr_start() { + +add_plugin_param "-s ${SYSTEMINFO_SCRIPT}" + +} diff --git a/media-plugins/vdr-systeminfo/files/systeminfo.sh b/media-plugins/vdr-systeminfo/files/systeminfo.sh new file mode 100644 index 000000000000..da2dd07277de --- /dev/null +++ b/media-plugins/vdr-systeminfo/files/systeminfo.sh @@ -0,0 +1,114 @@ +#!/bin/bash +# systeminfo.sh: external data collection script +# This file belongs to the VDR plugin systeminfo +# +# See the main source file 'systeminfo.c' for copyright information and +# how to reach the author. +# +# possible output formats: +# (blanks around tabs only for better reading) +# 1) Name \t Value displays Name and Value +# 2) Name \t Value1 \t Value2 displays Name, Value1 and Value2 +# 3) Name \t total used displays an additional progress bar (percentage) after the values +# 4) s \t Name \t ... defines a static value, this line is only requested during the first cycle +# +# special keywords (they are replaced by the plugin with the actual value): +# CPU% CPU usage in percent +# +# test with: for i in $(seq 1 16); do systeminfo.sh $i;echo;done +# + +PATH=/usr/bin:/bin:/sbin:/usr/sbin + +source /etc/conf.d/vdr.systeminfo + +case "$1" in + 1) # kernel version (static) + KERNEL=$(uname -rm) + echo -ne "s\tLinux Kernel:\t"$KERNEL + ;; + + 2) # distribution release (static) + if test -f /etc/gentoo-release; then + DISTRI="Gentoo" + RELEASE=$(head -n 1 /etc/gentoo-release) + fi + echo -ne "s\tDistribution:\t"$RELEASE + exit + ;; + + 3) # CPU type (static) + CPUTYPE=$(grep 'model name' /proc/cpuinfo | cut -d':' -f 2 | cut -d' ' -f2- | uniq) + echo -ne "s\tCPU Type:\t"$CPUTYPE + ;; + + 4) # current CPU speed + VAR=$(grep 'cpu MHz' /proc/cpuinfo | sed 's/.*: *\([0-9]*\)\.[0-9]*/\1 MHz/') + echo -ne "CPU speed:\t"$VAR + exit + ;; + + 5) # hostname and IP (static) + hostname=$(hostname) + dnsname=$(dnsdomainname) + IP=$(ifconfig eth0 | grep inet | cut -d: -f2 | cut -d' ' -f1) + echo -ne "s\tHostname:\t"${hostname:-<unknown>}"."${dnsname:-<unknown>}"\tIP: "${IP:-N/A} + exit + ;; + + 6) # fan speeds + CPU=$( sensors | grep -i ${FAN_1:=FAN1} | tr -s ' ' | cut -d' ' -f 2) + CASE=$(sensors | grep -i ${FAN_2:=Fan2} | tr -s ' ' | cut -d' ' -f 2) + echo -ne "Fans:\tCPU: "$CPU" rpm\tCase: "$CASE" rpm" + exit + ;; + + 7) # temperature of CPU and mainboard + CPU=$(sensors | grep -i ${CPU_TEMP:=CPU Temp} | tr -s ' ' | cut -d' ' -f 2) + MB=$( sensors | grep -i ${MOBO_TEMP:=M/B Temp} | tr -s ' ' | cut -d' ' -f 2) + echo -ne "Temperatures:\tCPU: "$CPU"\tMB: "$MB + exit + ;; + + 8) # temperature of hard disks + DISK1=$(hddtemp ${DISK_1:=/dev/sda} | cut -d: -f1,3) + DISK2=$(hddtemp ${DISK_2} | cut -d: -f1,3) + echo -ne "\t"$DISK1"\t"$DISK2 + exit + ;; + + 9) # CPU usage + echo -e "CPU time:\tCPU%" + exit + ;; + + 10) # header (static) + echo -ne "s\t\ttotal / free" + exit + ;; + + 11) # video disk usage + VAR=$(df -h | grep hd | grep video | tail -n 1 | tr -s ' ' | cut -d' ' -f 2,4) + echo -ne "Video Disk:\t"$VAR + exit + ;; + + 12) # memory usage + VAR=$( grep -E 'MemTotal|MemFree' /proc/meminfo | cut -d: -f2 | tr -d ' ') + echo -ne "Memory:\t"$VAR + exit + ;; + + 13) # swap usage + VAR=$(grep -E 'SwapTotal|SwapFree' /proc/meminfo | cut -d: -f2 | tr -d ' ') + echo -ne "Swap:\t"$VAR + exit + ;; + test) + echo "" + echo "Usage: systeminfo.sh {1|2|3|4|...}" + echo "" + exit 1 + ;; +esac +exit diff --git a/media-plugins/vdr-systeminfo/files/vdr-systeminfo-0.1.3_vdr-2.3.1.patch b/media-plugins/vdr-systeminfo/files/vdr-systeminfo-0.1.3_vdr-2.3.1.patch new file mode 100644 index 000000000000..4cadb0bc285b --- /dev/null +++ b/media-plugins/vdr-systeminfo/files/vdr-systeminfo-0.1.3_vdr-2.3.1.patch @@ -0,0 +1,69 @@ +compilefix vdr-2.3.1 +http://www.vdr-portal.de/board1-news/board2-vdr-news/p1254237-announce-vdr-developer-version-2-3-1/#post1254237 +Signed-of-by: Joerg Bornkessel <hd_brummy@gentoo.org> (25 Okt 2015) + +--- displayinfo.c 2008-11-09 10:31:23.000000000 +0100 ++++ displayinfo.c 2015-10-14 16:18:28.328868172 +0200 +@@ -224,7 +224,7 @@ + void cInfoLines::Action() + { + int line = 0; +- Lock(); ++ cThread::Lock(); + Clear(); + Unlock(); + cString osdline = NULL; +@@ -236,7 +236,7 @@ + + osdline = PrepareInfoline(++line, &isStatic); + if ((const char*)osdline) { +- Lock(); ++ cThread::Lock(); + Add(new cInfoLine(osdline, isStatic)); + Unlock(); + } +@@ -244,7 +244,7 @@ + while (Running() && NULL != (const char*)osdline && line <= MAX_LINES); + + if (!First()) { +- Lock(); ++ cThread::Lock(); + osdline = tr("Error getting system information"); + Add(new cInfoLine(osdline, true)); + state++; +@@ -252,7 +252,7 @@ + } + else + { +- Lock(); ++ cThread::Lock(); + state++; + Unlock(); + if (Running()) +@@ -260,7 +260,7 @@ + + while (Running()) { + cInfoLine * currentline = NULL; +- Lock(); ++ cThread::Lock(); + if (OsdInitialized) + firstDisplay = false; + currentline = First(); +@@ -274,7 +274,7 @@ + if (!currentline || !currentline->isStatic()) { + osdline = PrepareInfoline(line, &isStatic); + if ((const char*)osdline) { +- Lock(); ++ cThread::Lock(); + currentline->SetStr(osdline); + Unlock(); + } +@@ -283,7 +283,7 @@ + } + while (Running() && NULL != currentline && line <= MAX_LINES); + +- Lock(); ++ cThread::Lock(); + state++; + Unlock(); + diff --git a/media-plugins/vdr-systeminfo/metadata.xml b/media-plugins/vdr-systeminfo/metadata.xml new file mode 100644 index 000000000000..27f419c289c3 --- /dev/null +++ b/media-plugins/vdr-systeminfo/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> +<email>vdr@gentoo.org</email> +<name>Gentoo VDR Project</name> +</maintainer> +</pkgmetadata> diff --git a/media-plugins/vdr-systeminfo/vdr-systeminfo-0.1.1.ebuild b/media-plugins/vdr-systeminfo/vdr-systeminfo-0.1.1.ebuild new file mode 100644 index 000000000000..7aaa686b4ee0 --- /dev/null +++ b/media-plugins/vdr-systeminfo/vdr-systeminfo-0.1.1.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit vdr-plugin-2 + +DESCRIPTION="VDR Plugin: systeminfo" +HOMEPAGE="http://firefly.vdr-developer.org/systeminfo/" +SRC_URI="http://firefly.vdr-developer.org/systeminfo/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="" + +DEPEND=">=media-video/vdr-1.4.7" + +RDEPEND="sys-apps/lm_sensors + app-admin/hddtemp" + +src_install() { + vdr-plugin-2_src_install + + insinto /usr/share/vdr/systeminfo/ + insopts -m0755 + doins "${FILESDIR}"/systeminfo.sh +} diff --git a/media-plugins/vdr-systeminfo/vdr-systeminfo-0.1.3.ebuild b/media-plugins/vdr-systeminfo/vdr-systeminfo-0.1.3.ebuild new file mode 100644 index 000000000000..191ef0061a3e --- /dev/null +++ b/media-plugins/vdr-systeminfo/vdr-systeminfo-0.1.3.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit vdr-plugin-2 + +DESCRIPTION="VDR Plugin: systeminfo" +HOMEPAGE="http://firefly.vdr-developer.org/systeminfo/" +SRC_URI="http://firefly.vdr-developer.org/systeminfo/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND=">=media-video/vdr-1.4.7" + +RDEPEND="sys-apps/lm_sensors + app-admin/hddtemp" + +src_prepare() { + vdr-plugin-2_src_prepare + + if has_version ">=media-video/vdr-2.3.1"; then + epatch "${FILESDIR}/${P}_vdr-2.3.1.patch" + fi + + # Makefile correction, .eclass fails in some Makefiles + sed -e "s:(VDRINCDIR):(VDRDIR)/include:" -i Makefile +} + +src_install() { + vdr-plugin-2_src_install + + insinto /usr/share/vdr/systeminfo/ + insopts -m0755 + doins "${FILESDIR}"/systeminfo.sh +} diff --git a/media-plugins/vdr-systeminfo/vdr-systeminfo-0.1.4.ebuild b/media-plugins/vdr-systeminfo/vdr-systeminfo-0.1.4.ebuild new file mode 100644 index 000000000000..f7811e2baa28 --- /dev/null +++ b/media-plugins/vdr-systeminfo/vdr-systeminfo-0.1.4.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit vdr-plugin-2 + +DESCRIPTION="VDR Plugin: systeminfo" +HOMEPAGE="http://firefly.vdr-developer.org/systeminfo/" +SRC_URI="http://firefly.vdr-developer.org/systeminfo/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND=">=media-video/vdr-2" + +RDEPEND="sys-apps/lm_sensors + app-admin/hddtemp" + +src_prepare() { + vdr-plugin-2_src_prepare + + # Makefile correction, .eclass fails in some Makefiles + sed -e "s:(VDRINCDIR):(VDRDIR)/include:" -i Makefile +} + +src_install() { + vdr-plugin-2_src_install + + insinto /usr/share/vdr/systeminfo/ + insopts -m0755 + doins "${FILESDIR}"/systeminfo.sh +} |