Add lcdproc ebuild with systemd service files

This commit is contained in:
layman 2018-01-27 15:43:55 +01:00
parent 9f2cc363cb
commit a872d708e1
7 changed files with 304 additions and 0 deletions

View File

@ -0,0 +1,7 @@
AUX 0.5.1-LCDd.initd 533 SHA256 207eaa9062964ec0fb721da792ed0d2f10db3a31a1d7663097679b7d414ed243 SHA512 66e6ac519ca9919dc1321cdfbac3c8a54be681f534dcdfd06b5ec90c859a14694c6a6925983c3be58f2aa8d6391028fd8d978d7641710a23394ae87dca892900 WHIRLPOOL 477970861962397f2fdee2e8627b7643f72e2b58f99f38419b607fb125270005eba9aad4949df4365d2ef8952f9fc9d1aef2a2d6381d01cf34090ecb6534fbba
AUX 0.5.2-r2-lcdproc.initd 382 SHA256 f319107966798b460742a5b113c583907edf7a81702a2078411fb9294c392584 SHA512 9dc7667af52a2e95a28ee07c7646a124b46019643df19becc8f129da553a70b40c534b6c73057c73238efd232e98f02372d55a92135fccd9c297d776c53d3767 WHIRLPOOL 1bb58fe2228829d87f5e89510cdf32a7e9089ba31e7e5c32f0d55f4dffece9084fe4c7cbc18e74eb8780c9766208c942e859ab808f6833cd5c161dadee14994c
AUX LCDd.service 167 SHA256 04b4bd6248a60c79bb2bc9e7380c230c28526951b3bd106cb33aa48c9119726b SHA512 ddb78352932e19311febc4d5721e1e0904e7b17b03d63a67d17a57a0ecb85dc17c3445edd374dfc33a666b281e6d5a72609df01537afe8ab43080aaa951d5cdd WHIRLPOOL fb0ee3c6da550794414fc75bcab71856d4ce637df162fd2ce3dbd554d1715c2a8f2337d4eda321444a53f8e333ada9522e7f2cf476a19e5f4fc3018f6aadd809
AUX lcdproc.service 203 SHA256 6e50a732c09638d5202c965461d1a6afed65877a207bec0b17f77a40bf3e9e93 SHA512 4ddd09a10c0a95c8606f891e655db7ce99cde1dbdc0e63a0ac4a5b37daf2f950fc90b7749b0feba186477aeaae2b818438dc62cbb13b1aeb2bb5ff4a662b3b6d WHIRLPOOL aff082ee062f2b5260c47095e1e5d45843d876f3a0be94bd0690470d33b0dc3ab6d7ee8cf64f1271424de54f9c3d9f270cc155ac54be3b3bc0f62641713f73d6
DIST lcdproc-0.5.7.tar.gz 1047394 SHA256 843007d377adc856529ed0c7c42c9a7563043f06b1b73add0372bba3a3029804 SHA512 bd8d176347d8e5e5a4679757b582f766c72b28bac6a73b8bdf1b5f2da9b9f4b6117f1091817eb75cf5b347bf288405744dffb87601a0a858944311cb1ee8660d WHIRLPOOL 9a597c02bbedd59988f748834aee7e1bd23bfe1a8501ed4492b25624803f9aac4c33e2b3852a810fcd49f9c3ebd429e66134d48d50e881324c05b9f1dd4c0f72
EBUILD lcdproc-0.5.7.ebuild 6226 SHA256 2558fbaed32e1d5db5cd353bcc0a5e801fdc61f9d5e1b54723ac261d10aab6a4 SHA512 866636b3c0579a3b12155322817e139e1d63d4e94621b9c0a2d5f28097d3f63f6e93536428d827321dd716f18949ea9860b10706972d58dcd37198bea9ede26a WHIRLPOOL 199b08c78750417a46abc61384122689e757ff34e087cfd80330a7e5c7f7be152734e908de6f2d5af5e7a3bd2390b4134fe967207c814a4a0e265a74407c2f4d
MISC metadata.xml 1423 SHA256 7027ed33246ccb25e12a50718490c0b825c7a95e8021dd97f99259107937be47 SHA512 b62797738fd47a23fd83c31a027b1636374183488075e9c2073419ca6c08960c60d0bc6108c7148a144852dd45cad5ddd457879249331426f9594fac43cef306 WHIRLPOOL 3a8e8db071d8e62e0048505fdbf3882249d00f2d36fb92620d09240f9edf1a7a1f7fd731ec94f48ba74860c574ceff05dd66200a43fbeaf10a803ff3be2c5382

View File

@ -0,0 +1,21 @@
#!/sbin/openrc-run
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
depend() {
use net
use g15daemon
}
start() {
ebegin "Starting LCDd"
start-stop-daemon --start --quiet -m --pidfile /var/run/LCDd.pid \
--background --exec /usr/sbin/LCDd -- -s 1 -f
eend $? "Failed to start LCDd. Did you remember to set a driver in /etc/LCDd.conf? See syslog for details."
}
stop() {
ebegin "Stopping LCDd"
start-stop-daemon --stop --quiet --pidfile /var/run/LCDd.pid
eend $?
}

View File

@ -0,0 +1,21 @@
#!/sbin/openrc-run
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
depend(){
use LCDd
after ntp-client
}
start() {
ebegin "Starting lcdproc"
start-stop-daemon --start --background \
--exec /usr/bin/lcdproc
eend $?
}
stop() {
ebegin "Stopping lcdproc"
start-stop-daemon --stop --exec /usr/bin/lcdproc
eend $?
}

View File

@ -0,0 +1,12 @@
[Unit]
Description = LCD Display daemon
[Service]
Type = forking
ExecStart = /usr/sbin/LCDd
Restart = always
RestartSec = 60
[Install]
WantedBy = multi-user.target

View File

@ -0,0 +1,13 @@
[Unit]
Description = Display system info on LCD
After = LCDd.service
[Service]
ExecStart = /usr/bin/lcdproc
Restart = always
RestartSec = 60
[Install]
WantedBy = multi-user.target
Also = LCDd.service

View File

@ -0,0 +1,201 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit multilib versionator systemd
MY_PV=$(replace_version_separator 3 '-')
MY_P=${PN}-${MY_PV}
S=${WORKDIR}/${MY_P}
DESCRIPTION="Client/Server suite to drive all kinds of LCD (-like) devices"
HOMEPAGE="http://lcdproc.org/"
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
IUSE="debug doc ftdi hid irman joystick lirc nfs png samba seamless-hbars systemd truetype usb"
# The following array holds the USE_EXPANDed keywords
IUSE_LCD_DEVICES=(ncurses bayrad cfontz cfontzpacket
cwlinux eyeboxone g15 graphlcd glk
hd44780 icpa106 imon imonlcd iowarrior
lb216 lcdm001 lcterm
md8800 mdm166a ms6931 mtcs16209x mtxorb noritakevfd
pyramid sdeclcd sed1330 sed1520 serialvfd sli
stv5730 SureElec svga t6963 text tyan
ula200 vlsys_m428 xosd ea65 picolcd serialpos
i2500vfd irtrans lis shuttlevfd )
# Iterate through the array and add the lcd_devices_* that we support
NUM_DEVICES=${#IUSE_LCD_DEVICES[@]}
index=0
while [ "${index}" -lt "${NUM_DEVICES}" ] ; do
IUSE="${IUSE} lcd_devices_${IUSE_LCD_DEVICES[${index}]}"
let "index = ${index} + 1"
done
REQUIRED_USE="lcd_devices_mdm166a? ( hid )"
RDEPEND="
ftdi? ( dev-embedded/libftdi:0 )
hid? ( >=dev-libs/libhid-0.2.16 )
irman? ( media-libs/libirman )
lirc? ( app-misc/lirc )
png? ( media-libs/libpng:0 )
truetype? ( media-libs/freetype:2 )
usb? ( virtual/libusb:0 )
lcd_devices_graphlcd? ( app-misc/graphlcd-base app-misc/glcdprocdriver dev-libs/serdisplib )
lcd_devices_g15? ( dev-libs/libg15 dev-libs/libg15render )
lcd_devices_ncurses? ( sys-libs/ncurses:= )
lcd_devices_svga? ( media-libs/svgalib )
lcd_devices_ula200? ( dev-embedded/libftdi:0 )
lcd_devices_xosd? ( x11-libs/xosd x11-libs/libX11 x11-libs/libXext )
lcd_devices_cfontzpacket? ( virtual/libusb:0 )
lcd_devices_cwlinux? ( virtual/libusb:0 )
lcd_devices_pyramid? ( virtual/libusb:0 )
lcd_devices_picolcd? ( virtual/libusb:0 )
lcd_devices_i2500vfd? ( dev-embedded/libftdi:0 )
lcd_devices_lis? ( dev-embedded/libftdi:0 virtual/libusb:0 )
lcd_devices_shuttlevfd? ( virtual/libusb:0 )"
DEPEND="${RDEPEND}
doc? ( app-text/xmlto
app-text/docbook-xml-dtd:4.5 )"
RDEPEND="${RDEPEND}
lcd_devices_g15? ( app-misc/g15daemon )"
pkg_setup() {
if [ -n "${LCDPROC_DRIVERS}" ] ; then
ewarn "Setting the drivers to compile via LCDPROC_DRIVERS is not supported anymore."
ewarn "Please use LCD_DEVICES now and see emerge -pv output for the options."
fi
}
src_prepare() {
sed -i "37s:server/drivers:/usr/$(get_libdir)/lcdproc:" LCDd.conf || die
einfo "Patching LCDd.conf to use DriverPath=/usr/$(get_libdir)/lcdproc/"
default
}
src_configure() {
# This array contains the driver names required by configure --with-drivers=
# The positions must be the same as the corresponding use_expand flags
local DEVICE_DRIVERS=(curses bayrad CFontz CFontzPacket
CwLnx EyeboxOne g15 glcd,glcdlib glk
hd44780 icp_a106 imon imonlcd IOWarrior
lb216 lcdm001 lcterm
MD8800 mdm166a ms6931 mtc_s16209x MtxOrb NoritakeVFD
pyramid sdeclcd sed1330 sed1520 serialVFD sli
stv5730 SureElec svga t6963 text tyan
ula200 vlsys_m428 xosd ea65 picolcd serialPOS
i2500vfd irtrans lis shuttleVFD )
# Generate comma separated list of drivers
COMMA_DRIVERS=""
FIRST_DRIVER=""
local index=0
while [ "${index}" -lt "${NUM_DEVICES}" ] ; do
if use "lcd_devices_${IUSE_LCD_DEVICES[${index}]}" ; then
append-driver "${DEVICE_DRIVERS[${index}]}"
fi
let "index = ${index} + 1"
done
# Append the not-lcd-drivers (input)
use lirc && append-driver "lirc"
use irman && append-driver "irman"
use joystick && append-driver "joy"
if [ -z "${COMMA_DRIVERS}" ] ; then
ewarn "You are compiling LCDd without support for any LCD drivers at all."
else
# Patch the config to contain a driver that is actually installed instead of the default
elog "Compiling the following drivers for LCDd: ${COMMA_DRIVERS}"
elog "Setting Driver=${FIRST_DRIVER} in LCDd.conf"
sed -i "53s:curses:${FIRST_DRIVER}:" LCDd.conf || die
fi
local EXTRA_CONF
if use lcd_devices_cfontzpacket || use lcd_devices_cwlinux || use lcd_devices_pyramid || \
use lcd_devices_picolcd || use lcd_devices_lis || use lcd_devices_shuttlevfd ; then
EXTRA_CONF="--enable-libusb"
else
EXTRA_CONF="$(use_enable usb libusb)"
fi
if use lcd_devices_ula200 || use lcd_devices_i2500vfd || use lcd_devices_lis ; then
EXTRA_CONF="${EXTRA_CONF} --enable-libftdi"
else
EXTRA_CONF="${EXTRA_CONF} $(use_enable ftdi libftdi)"
fi
econf --enable-extra-charmaps \
$(use_enable debug) \
$(use_enable nfs stat-nfs) \
$(use_enable png libpng) \
$(use_enable samba stat-smbfs ) \
$(use_enable seamless-hbars) \
$(use_enable truetype freetype) \
${EXTRA_CONF} \
"--enable-drivers=${COMMA_DRIVERS}"
}
src_compile() {
default
if use doc; then
ebegin "Creating user documentation"
cd "${S}"/docs/lcdproc-user
xmlto html --skip-validation lcdproc-user.docbook
eend $?
ebegin "Creating dev documentation"
cd "${S}"/docs/lcdproc-dev
xmlto html --skip-validation lcdproc-dev.docbook
eend $?
fi
}
append-driver() {
[[ -z $* ]] && return 0
if [ -z "${COMMA_DRIVERS}" ] ; then
# First in the list
COMMA_DRIVERS="$*"
FIRST_DRIVER="$*"
else
# Second, third, ... include a comma at the front
COMMA_DRIVERS="${COMMA_DRIVERS},$*"
fi
return 0
}
src_install() {
emake DESTDIR="${D}" install
# move example clients installed to /usr/bin
rm -f "${D}"/usr/bin/{tail,lcdmetar,iosock,fortune,x11amp}.pl
insinto /usr/share/lcdproc/clients
doins clients/examples/*.pl
doins clients/metar/*.pl
newinitd "${FILESDIR}/0.5.1-LCDd.initd" LCDd
newinitd "${FILESDIR}/0.5.2-r2-lcdproc.initd" lcdproc
if use systemd; then
systemd_dounit "${FILESDIR}"/LCDd.service
systemd_dounit "${FILESDIR}"/lcdproc.service
fi
dodoc README CREDITS ChangeLog INSTALL TODO
if use doc; then
insinto /usr/share/doc/${PF}/lcdproc-user
doins docs/lcdproc-user/*.html
insinto /usr/share/doc/${PF}/lcdproc-dev
doins docs/lcdproc-dev/*.html
fi
}

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>xmw@gentoo.org</email>
<name>Michael Weber</name>
</maintainer>
<longdescription lang="en">
LCDproc 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, CrystalFontz, 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.
</longdescription>
<use>
<flag name="hid">Enable HID support using libhid</flag>
<flag name="irman">Enable support for IRMan (<pkg>media-libs/libirman</pkg>)</flag>
<flag name="nfs">Adds support for NFS file system</flag>
<flag name="seamless-hbars">Try to avoid gaps in horizontal bars</flag>
<flag name="ftdi">Enable support for FTDI connections in some selected LCD_DEVICES (currently hd44780)</flag>
<flag name="lcd_devices_sdeclcd">Enable support for VLSYS M428 display</flag>
<flag name="lcd_devices_vlsys_m428">Enable support for VLSYS M428 display</flag>
</use>
<upstream>
<remote-id type="sourceforge">lcdproc</remote-id>
</upstream>
</pkgmetadata>