diff options
author | Martin Väth <martin@mvath.de> | 2014-03-30 20:50:28 +0200 |
---|---|---|
committer | Martin Väth <martin@mvath.de> | 2015-10-11 10:49:09 +0200 |
commit | d353bf1d8d9cc7d58c111c47dcb5d5ca13da6c0b (patch) | |
tree | d4bb38c54d6b4397438886ad301ff24236a22a65 /media-tv | |
parent | Bump sundtek-tv, adding zsh completion support (diff) | |
download | mv-d353bf1d8d9cc7d58c111c47dcb5d5ca13da6c0b.tar.gz mv-d353bf1d8d9cc7d58c111c47dcb5d5ca13da6c0b.tar.bz2 mv-d353bf1d8d9cc7d58c111c47dcb5d5ca13da6c0b.zip |
sundtek-tv: Add mediaclient wrapper scripts and sundtek-local.service
Diffstat (limited to 'media-tv')
-rw-r--r-- | media-tv/sundtek-tv/ChangeLog | 8 | ||||
-rw-r--r-- | media-tv/sundtek-tv/files/_mediaclient | 236 | ||||
-rw-r--r-- | media-tv/sundtek-tv/files/mediaclient.video | 31 | ||||
-rw-r--r-- | media-tv/sundtek-tv/files/sundtek-local.service | 11 | ||||
-rw-r--r-- | media-tv/sundtek-tv/sundtek-tv-20140321-r1.ebuild (renamed from media-tv/sundtek-tv/sundtek-tv-20140321.ebuild) | 18 |
5 files changed, 185 insertions, 119 deletions
diff --git a/media-tv/sundtek-tv/ChangeLog b/media-tv/sundtek-tv/ChangeLog index 7cc64873..d94cb847 100644 --- a/media-tv/sundtek-tv/ChangeLog +++ b/media-tv/sundtek-tv/ChangeLog @@ -2,7 +2,13 @@ # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ -*sundtek-tv (17 Feb 2014) +*sundtek-tv-20140321-r1 (17 Feb 2014) + + 30 Mar 2014; Martin Väth <martin@mvath.de>: + Support mediaclient.{video,audio,dvb} wrapper scripts; + provide local systemd service for default settings + +*sundtek-tv-20140321 (17 Feb 2014) 29 Mar 2014; Martin Väth <martin@mvath.de>: Add zsh completion support. Version bump diff --git a/media-tv/sundtek-tv/files/_mediaclient b/media-tv/sundtek-tv/files/_mediaclient index 99670f4a..3d0ed826 100644 --- a/media-tv/sundtek-tv/files/_mediaclient +++ b/media-tv/sundtek-tv/files/_mediaclient @@ -1,119 +1,127 @@ -#compdef mediaclient +#compdef mediaclient mediaclient.video mediaclient.radio mediaclient.dvb local curcontext="$curcontext" state state_descr line typeset -A opt_args -_arguments -C -s -S -A '-*' : \ -'--help[help]' \ -{'(--device)-d+','(-d)--device='}'[DEVICE (video device)]:video device:(/dev/video*)' \ -{'(--enumdevices)-e','(-e)--enumdevices'}'[show up devices]' \ -{'(--mode)-m+','(-m)--mode='}'[MODE (device mode)]:device mode:(DVBT DVBT2 DVBC DVBS DVBS2 ATSC ATV RADIO)' \ -{'(--tuner)-t+','(-t)--tuner'}'[ID (tuner id)]:tuner id:->tunerid)' \ -{'(--setdtvmode)-D+','(-D)--setdtvmode='}'[MODE (dtv mode)]:dtv mode:(DVBT DVBC ATSC)' \ -{'(--listatvstd)-L','(-L)--listatvstd'}'[list analog TV standards]' \ -'--crc=[MODE (crc check for PSI on/off)]:check active:(on off)' \ -{'(--vmode)-v+','(-v)--vmode='}'[MODE (set analog TV mode)]:tv mode:(PAL-BG PAL-DK PAL-I PAL-M NTSC-M Secam-L Secam-LC Secam-K Secam-B Secam-G Secam-H)' \ -'--setvcr=[DEVICE (lock device)]:video device:(/dev/video*)' \ -{'(--inputs)-i','(-i)--inputs'}'[list analog TV inputs]' \ -{'(--size)-s+','(-s)--size='}'[DIM (set scalar size)]:dimension:(720x576)' \ -{'(--Input)-I+','(-I)--Input='}'[INPUT (set TV input)]:input:(Television Composite S-Video)' \ -{'(--frequency)-f+','(-f)--frequency='}'[HZ (frequency)]:frequency:()' \ -'--rawfreq[HZ (raw DVB-S/S2 frequency)]:frequency:()' \ -{'(--listarea)-a','(-a)--listarea'}'[list Area]' \ -{'(--setarea)-A+','(-A)--setarea='}'[AREA (set Area)]:Area:()' \ -{'(--Modulation)-M+','(-M)--Modulation='}'[MODULATION (for DVB-C)]:Modulation:(Q16 Q32 Q64 Q128 Q256)' \ -{'(--Symbolrate)-S+','(-S)--Symbolrate='}'[HZ (Symbolrate for DVB-C)]:Symbolrate:()' \ -{'(--voltage)-V+','(-V)--voltage='}'[VOLTAGE (DVB-S/S2 Polarisation)]:voltage:->voltage' \ -'--band=[BAND (set band)]:band:(C-BAND UNIVERSAL)' \ -{'(--fec)-E','(-E)--fec'}'[forward error connection]' \ -{'(--polarisation)-p+','(-p)--polarisation='}'[DIRECTION (polarisation)]:polarisation:->polarisation' \ -{'(--bandwidth)-b+','(-b)--bandwidth='}'[MHZ (set bandwidth for DVB-T)]:bandwidth:(6 7 8)' \ -{'(--rds)-r','(-r)--rds'}'[get RDS information]' \ -{'(--properties)-C','(-C)--properties'}'[list device properties]' \ -'--loglevel=[LOGLEVEL (set log verbosity)]:loglevel:(off min max)' \ -'--signalreporting=[MODE (set signal mode)]:signal reporting:->signalreporting' \ -'--readsignal=[N (read signalstrength N times)]:signalstrength:()' \ -'--powerlevel=[N (read powerlevel N times)]:powerlevel:()' \ -'--powerlevel=[N (read powerlevel N times)]:powerlevel:()' \ -'--lockstatus[check dvb/atsc channel lock]' \ -'--enable5v=[5V output for DVB-C/T/T2]:enable 5V output:(on off)' \ -'--wssdecoder=[DEVICE (VBI for wss)]:VBI device:(dev/vbi*)' \ -'--dumpvbi=[DEVICE (dump VBI for wss)]:VBI device:(dev/vbi*)' \ -'--wsscallback=[SCRIPT (Aspect ratio change wss)]:aspect ratio script:_files' \ -'--stopwdd[stop background wss server]' \ -'--cc-list[list closed caption]' \ -'--cc-flush[clear closed caption settings]' \ -'--cc-enable[CAP (enable closed caption)]:closed caption:(CC1 CC2 T1 T2)' \ -'--cc-disable[CAP (disable closed caption)]:closed caption:(CC1 CC2 T1 T2)' \ -{'(--pidfilter)-P+','(-P)--pidfilter='}'[MODE (DVB pidfilter on/off)]:pidfilter:(on off)' \ -{'(--addpid)-H+','(-H)--addpid='}'[PIDS (add DVB pids)]:pids:("0x10" 16 "0x10,16")' \ -{'(--removepid)-x+','(-x)--removepid='}'[PIDS (remove DVB pids)]:pids:("0x10" 16 "0x10,16")' \ -{'(--listpids)-w','(-w)--listpids'}'[list filtered DVB pids]' \ -{'(--flushpids)-F+','(-F)--flushpids='}'[flush DVB pidtable]' \ -'--softpidfilter=[MODE (software DVB PID filter)]:pidfilter mode:(on off passthrough)' \ -{'(--internalaudio)-c+','(-c)--internalaudio='}'[MODE (internal audio)]:internal audio:->internalaudio' \ -'--audiothreshold=[N (audio threshold N ms)]:audio threshold:(0 2000)' \ -'--loudness=[N (loudness)]:loudness:(0 15)' \ -'--volume=[N (volume)]:volume:(0 255)' \ -'--treble=[N (treble)]:treble:(0 255)' \ -'--audiomode=[MODE (mono/stereo)]:audio mode:(mono stereo)' \ -{'(--mute)-g+','(-g)--mute='}'[MODE (FM mute)]:FM mute mode:(on off)' \ -'--diseqc-support=[MODE (diseqc)]:diseqc mode:(on off)' \ -'--diseqc=[COMMAND (diseqc)]:diseqc command:(E0 10 38 F0)' \ -'--list-diseqc[list diseqc dish configuration]' \ -'--set-diseqc=[CONFIG (set diseqc dish)]:diseqc dish configuration:(S19.2E)' \ -'--setmini=[SEC_MINI_A/B (set burst tone)]:burst tone:(A B)' \ -{'(--listrc)-l','(-l)--listrc'}'[list rc protocols]' \ -{'(--setrc)-s+','(-s)--setrc='}'[PROTOCOL (set rc)]:protocol:()' \ -'--enablerc=[DEVICE (enable rc polling)]:rc device:(/dev/mediainput*)' \ -'--disablerc=[DEVICE (disable rc polling)]:rc device:(/dev/mediainput*)' \ -'--pollrc[poll raw rc]' \ -'--dumprcmap[dump rc map]' \ -'--setrcmap=[MAP (set rc MAP)]:rc map:_files' \ -'--updaterc=[update rc layout]:rc layout:->rclayout' \ -'--transfermode=[MODE (usb transfer mode)]:transfer mode:(bulk iso)' \ -'--nullpackets=[MODE (usb null packets)]:pass null packets:->nullpackets' \ -'--bulkpackets=[N (usb bulk transfer)]:bulk transfer number:()' \ -'--ts-settle-timemout=[N (usb timeout in ms)]:timeout:(0 4000)' \ -'--disable-dvb=[ADAPTER (disable dvb)]:dvb adapter:(/dev/dvb/adapter*)' \ -'--enable-dvb=[ADAPTER (enable dvb)]:dvb adapter:(/dev/dvb/adapter*)' \ -'--setver=[API (set DVB API]:DVB API:(5.0)' \ -'--vfilter=[MODE (analog deinterlacer)]:deinterlacer:(on off)' \ -'--vfilterid=[ID (analog deinterlacer type)]:deinterlacer id:->deinterlacerid' \ -'--lc[list connected clients]' \ -'--lc=[PID (disconnect client)]:pid:()' \ -'--shutdown[shutdown multimediastack]' \ -'--start=[N (start multimediastack in N sec)]:seconds:(1)' \ -'--systemdcheck[start via systemd]' \ -'--wait-for-devices[start when devices are ready]' \ -'--enablenetwork=[MODE (network listening)]:network mode:(on off)' \ -'--mount=[ADAPTER (create virtual)]:virtual adapter:->createmount' \ -'--unmount=[ADAPTER (delete virtual)]:virtual adapter:(1)' \ -'--lrc=[RC (list remote clients)]:rc clients:(1 192.168.1.2:0)' \ -'--tvdummy[add tv-dummydevice]' \ -'--remove=[N (delete dummy adapter)]:dummy adapter:(1)' \ -'--scan-network[scan for IPTV devices]' \ -'--nettransfermode=[MODE (set transfer mode)]:transfer mode:(tcp udp)' \ -'--nti=[N (increase maximum packet)]:maximum packet:(0 10000)' \ -'--netrecoverymode=[MODE (netrecoverymode)]:net recover mode:(on off)' \ -'--enabledreambox=[DEVICE (connect vtuner)]:vtuner device:(/dev/dvb/adapter*/frontend*)' \ -'--disabledreambox=[DEVICE (disconnect vtuner)]:vtuner device:(/dev/dvb/adapter*/frontend*)' \ -'--nimbus[display dreambox nimbus]' \ -'--avoffset=[N (dreambox AV offset in ms)]:AV PTS offset:()' \ -'--audiooffset=[N (dreambox audio offset in ms)]:Audio PTS offset:()' \ -'--videooffset=[N (dreambox video offset in ms)]:Video PTS offset:()' \ -'--portforward=[N (debugging)]:port:()' \ -'--pipecount=[N (read stdin)]:seconds:(1)' \ -'--cat=[FILE (read FILE)]:file:_files' \ -'--strings=[FILE (strings FILE)]:file:_files' \ -'--lsusb=[DEVICE (print usb ids)]:usb device:(/dev/bus/usb)' \ -'--reset=[DEVICE (reset usb device)]:usb device:(/dev/bus/usb/*)' \ -'--tsscan=[DEVICE (scan channel)]:transponder:(/dev/dvb/adapter*/dvr*)' \ -'--nitscan=[DEVICE (scan NIT)]:transponder:(/dev/dvb/adapter*/dvr*)' \ -'--blindscan=[DEVICE (blindscan)]:transponder:(nim_socket /dev/dvb/adapter*/dvr*)' \ -'--timeout=[N (nitscan timeout in ms)]:timeout:()' \ -'--zf=[N (ZF/IF universal frequesncy)]:frequency:()' \ -'--frontendinfo=[DEVICE (get DVB API)]:dvb device:(/dev/dvb/adapter*/frontend*)' \ -'--createadapter[create dvb loopback]' \ -'--remove=[N (remove dvb loopback)]:loopback device:()' +local service_opts +service_opts=( +'--help[help]' +{'(--enumdevices)-e','(-e)--enumdevices'}'[show up devices]' +{'(--mode)-m+','(-m)--mode='}'[MODE (device mode)]:device mode:(DVBT DVBT2 DVBC DVBS DVBS2 ATSC ATV RADIO)' +{'(--tuner)-t+','(-t)--tuner'}'[ID (tuner id)]:tuner id:->tunerid' +{'(--setdtvmode)-D+','(-D)--setdtvmode='}'[MODE (dtv mode)]:dtv mode:(DVBT DVBC ATSC)' +{'(--listatvstd)-L','(-L)--listatvstd'}'[list analog TV standards]' +'--crc=[MODE (crc check for PSI on/off)]:check active:(on off)' +{'(--vmode)-v+','(-v)--vmode='}'[MODE (set analog TV mode)]:tv mode:(PAL-BG PAL-DK PAL-I PAL-M NTSC-M Secam-L Secam-LC Secam-K Secam-B Secam-G Secam-H)' +'--setvcr=[DEVICE (lock device)]:video device:(/dev/video*)' +{'(--inputs)-i','(-i)--inputs'}'[list analog TV inputs]' +{'(--size)-s+','(-s)--size='}'[DIM (set scalar size)]:dimension:(720x576)' +{'(--Input)-I+','(-I)--Input='}'[INPUT (set TV input)]:input:(Television Composite S-Video)' +{'(--frequency)-f+','(-f)--frequency='}'[HZ (frequency)]:frequency:()' +'--rawfreq[HZ (raw DVB-S/S2 frequency)]:frequency:()' +{'(--listarea)-a','(-a)--listarea'}'[list Area]' +{'(--setarea)-A+','(-A)--setarea='}'[AREA (set Area)]:Area:()' +{'(--Modulation)-M+','(-M)--Modulation='}'[MODULATION (for DVB-C)]:Modulation:(Q16 Q32 Q64 Q128 Q256)' +{'(--Symbolrate)-S+','(-S)--Symbolrate='}'[HZ (Symbolrate for DVB-C)]:Symbolrate:()' +{'(--voltage)-V+','(-V)--voltage='}'[VOLTAGE (DVB-S/S2 Polarisation)]:voltage:->voltage' +'--band=[BAND (set band)]:band:(C-BAND UNIVERSAL)' +{'(--fec)-E','(-E)--fec'}'[forward error connection]' +{'(--polarisation)-p+','(-p)--polarisation='}'[DIRECTION (polarisation)]:polarisation:->polarisation' +{'(--bandwidth)-b+','(-b)--bandwidth='}'[MHZ (set bandwidth for DVB-T)]:bandwidth:(6 7 8)' +{'(--rds)-r','(-r)--rds'}'[get RDS information]' +{'(--properties)-C','(-C)--properties'}'[list device properties]' +'--loglevel=[LOGLEVEL (set log verbosity)]:loglevel:(off min max)' +'--signalreporting=[MODE (set signal mode)]:signal reporting:->signalreporting' +'--readsignal=[N (read signalstrength N times)]:signalstrength:()' +'--powerlevel=[N (read powerlevel N times)]:powerlevel:()' +'--powerlevel=[N (read powerlevel N times)]:powerlevel:()' +'--lockstatus[check dvb/atsc channel lock]' +'--enable5v=[5V output for DVB-C/T/T2]:enable 5V output:(on off)' +'--wssdecoder=[DEVICE (VBI for wss)]:VBI device:(dev/vbi*)' +'--dumpvbi=[DEVICE (dump VBI for wss)]:VBI device:(dev/vbi*)' +'--wsscallback=[SCRIPT (Aspect ratio change wss)]:aspect ratio script:_files' +'--stopwdd[stop background wss server]' +'--cc-list[list closed caption]' +'--cc-flush[clear closed caption settings]' +'--cc-enable[CAP (enable closed caption)]:closed caption:(CC1 CC2 T1 T2)' +'--cc-disable[CAP (disable closed caption)]:closed caption:(CC1 CC2 T1 T2)' +{'(--pidfilter)-P+','(-P)--pidfilter='}'[MODE (DVB pidfilter on/off)]:pidfilter:(on off)' +{'(--addpid)-H+','(-H)--addpid='}'[PIDS (add DVB pids)]:pids:("0x10" 16 "0x10,16")' +{'(--removepid)-x+','(-x)--removepid='}'[PIDS (remove DVB pids)]:pids:("0x10" 16 "0x10,16")' +{'(--listpids)-w','(-w)--listpids'}'[list filtered DVB pids]' +{'(--flushpids)-F+','(-F)--flushpids='}'[flush DVB pidtable]' +'--softpidfilter=[MODE (software DVB PID filter)]:pidfilter mode:(on off passthrough)' +{'(--internalaudio)-c+','(-c)--internalaudio='}'[MODE (internal audio)]:internal audio:->internalaudio' +'--audiothreshold=[N (audio threshold N ms)]:audio threshold:(0 2000)' +'--loudness=[N (loudness)]:loudness:(0 15)' +'--volume=[N (volume)]:volume:(0 255)' +'--treble=[N (treble)]:treble:(0 255)' +'--audiomode=[MODE (mono/stereo)]:audio mode:(mono stereo)' +{'(--mute)-g+','(-g)--mute='}'[MODE (FM mute)]:FM mute mode:(on off)' +'--diseqc-support=[MODE (diseqc)]:diseqc mode:(on off)' +'--diseqc=[COMMAND (diseqc)]:diseqc command:(E0 10 38 F0)' +'--list-diseqc[list diseqc dish configuration]' +'--set-diseqc=[CONFIG (set diseqc dish)]:diseqc dish configuration:(S19.2E)' +'--setmini=[SEC_MINI_A/B (set burst tone)]:burst tone:(A B)' +{'(--listrc)-l','(-l)--listrc'}'[list rc protocols]' +{'(--setrc)-s+','(-s)--setrc='}'[PROTOCOL (set rc)]:protocol:()' +'--enablerc=[DEVICE (enable rc polling)]:rc device:(/dev/mediainput*)' +'--disablerc=[DEVICE (disable rc polling)]:rc device:(/dev/mediainput*)' +'--pollrc[poll raw rc]' +'--dumprcmap[dump rc map]' +'--setrcmap=[MAP (set rc MAP)]:rc map:_files' +'--updaterc=[update rc layout]:rc layout:->rclayout' +'--transfermode=[MODE (usb transfer mode)]:transfer mode:(bulk iso)' +'--nullpackets=[MODE (usb null packets)]:pass null packets:->nullpackets' +'--bulkpackets=[N (usb bulk transfer)]:bulk transfer number:()' +'--ts-settle-timemout=[N (usb timeout in ms)]:timeout:(0 4000)' +'--disable-dvb=[ADAPTER (disable dvb)]:dvb adapter:(/dev/dvb/adapter*)' +'--enable-dvb=[ADAPTER (enable dvb)]:dvb adapter:(/dev/dvb/adapter*)' +'--setver=[API (set DVB API)]:DVB API:(5.0)' +'--vfilter=[MODE (analog deinterlacer)]:deinterlacer:(on off)' +'--vfilterid=[ID (analog deinterlacer type)]:deinterlacer id:->deinterlacerid' +'--lc[list connected clients]' +'--lc=[PID (disconnect client)]:pid:()' +'--shutdown[shutdown multimediastack]' +'--start=[N (start multimediastack in N sec)]:seconds:(1)' +'--systemdcheck[start via systemd]' +'--wait-for-devices[start when devices are ready]' +'--enablenetwork=[MODE (network listening)]:network mode:(on off)' +'--mount=[ADAPTER (create virtual)]:virtual adapter:->createmount' +'--unmount=[ADAPTER (delete virtual)]:virtual adapter:(1)' +'--lrc=[RC (list remote clients)]:rc clients:(1 192.168.1.2:0)' +'--tvdummy[add tv-dummydevice]' +'--remove=[N (delete dummy adapter)]:dummy adapter:(1)' +'--scan-network[scan for IPTV devices]' +'--nettransfermode=[MODE (set transfer mode)]:transfer mode:(tcp udp)' +'--nti=[N (increase maximum packet)]:maximum packet:(0 10000)' +'--netrecoverymode=[MODE (netrecoverymode)]:net recover mode:(on off)' +'--enabledreambox=[DEVICE (connect vtuner)]:vtuner device:(/dev/dvb/adapter*/frontend*)' +'--disabledreambox=[DEVICE (disconnect vtuner)]:vtuner device:(/dev/dvb/adapter*/frontend*)' +'--nimbus[display dreambox nimbus]' +'--avoffset=[N (dreambox AV offset in ms)]:AV PTS offset:()' +'--audiooffset=[N (dreambox audio offset in ms)]:Audio PTS offset:()' +'--videooffset=[N (dreambox video offset in ms)]:Video PTS offset:()' +'--portforward=[N (debugging)]:port:()' +'--pipecount=[N (read stdin)]:seconds:(1)' +'--cat=[FILE (read FILE)]:file:_files' +'--strings=[FILE (strings FILE)]:file:_files' +'--lsusb=[DEVICE (print usb ids)]:usb device:(/dev/bus/usb)' +'--reset=[DEVICE (reset usb device)]:usb device:(/dev/bus/usb/*)' +'--tsscan=[DEVICE (scan channel)]:transponder:(/dev/dvb/adapter*/dvr*)' +'--nitscan=[DEVICE (scan NIT)]:transponder:(/dev/dvb/adapter*/dvr*)' +'--blindscan=[DEVICE (blindscan)]:transponder:(nim_socket /dev/dvb/adapter*/dvr*)' +'--timeout=[N (nitscan timeout in ms)]:timeout:()' +'--zf=[N (ZF/IF universal frequesncy)]:frequency:()' +'--frontendinfo=[DEVICE (get DVB API)]:dvb device:(/dev/dvb/adapter*/frontend*)' +'--createadapter[create dvb loopback]' +#'--remove=[N (remove dvb loopback)]:loopback device:()' +) +case $service in +(*mediaclient) + service_opts+=( +{'(--device)-d+','(-d)--device='}'[DEVICE (video device)]:video device:(/dev/dvb/adapter*/frontend* /dev/radio* /dev/video*)' +); +esac +_arguments -C -s -S -A '-*' : $service_opts local ret=$? case $state in (tunerid) diff --git a/media-tv/sundtek-tv/files/mediaclient.video b/media-tv/sundtek-tv/files/mediaclient.video new file mode 100644 index 00000000..2382c21a --- /dev/null +++ b/media-tv/sundtek-tv/files/mediaclient.video @@ -0,0 +1,31 @@ +#!/bin/sh +Echo() { + printf '%s\n' "${*}" +} +Die() { + Echo "${0##*/}: ${*}" >&2 + exit 1 +} +EchoExec() { + Echo "# ${*}" + exec "${@}" + Die "failed to exec ${1}" +} +mediaclient=`PATH="${PATH}${PATH:+:}/bin:/opt/bin" command -v mediaclient` \ + && [ -n "${mediaclient}" ] || Die 'cannot find mediaclient executable' +case ${0} in +*video*) + regexp='video[0-9]*' + text='video';; +*radio) + regexp='radio[0-9]*' + text='radio';; +*) + regexp='dvb\/adapter[0-9]*\/frontend[0-9]*' + text='adapter';; +esac +regexp='\/dev\/'${regexp} +sedx='/'${regexp}'/{s/^.*\('${regexp}'\).*$/\1/p;q}' +device=`"${mediaclient}" -e | sed -n -e "${sedx}"` +[ -n "${device}" ] || Die "${mediaclient} -e returned no ${text} device" +EchoExec "${mediaclient}" -d "${device}" "${@}" diff --git a/media-tv/sundtek-tv/files/sundtek-local.service b/media-tv/sundtek-tv/files/sundtek-local.service new file mode 100644 index 00000000..c2e298fc --- /dev/null +++ b/media-tv/sundtek-tv/files/sundtek-local.service @@ -0,0 +1,11 @@ +[Unit] +Description=Sundtek MediaTV Local Settings +After=sundtek.service +Wants=sundtek.service + +[Service] +Type=oneshot +ExecStart=/bin/sleep 60 ; /usr/bin/mediaclient.video -c external + +[Install] +WantedBy=multi-user.target diff --git a/media-tv/sundtek-tv/sundtek-tv-20140321.ebuild b/media-tv/sundtek-tv/sundtek-tv-20140321-r1.ebuild index 365a2d16..9a07ac30 100644 --- a/media-tv/sundtek-tv/sundtek-tv-20140321.ebuild +++ b/media-tv/sundtek-tv/sundtek-tv-20140321-r1.ebuild @@ -32,8 +32,9 @@ DEPEND="pax_kernel? ( || ( sys-apps/elfix sys-apps/paxctl ) )" DISABLE_AUTOFORMATTING="true" DOC_CONTENTS="To initialize sundtek drivers during booting call - rc-update add sundtek default # for openrc - systemctl enable sundtek.service # for systemd + rc-update add sundtek default # for openrc + systemctl enable sundtek-local.service # for systemd +You will probably need to adapt sundtek-local.service to your defaults " QA_PREBUILT="opt/bin/* usr/lib*" @@ -59,7 +60,12 @@ Download from Sundtek directly or write your own ebuild" src_unpack() { mkdir "${S}" && cd "${S}" unpack ${A} - cp "${FILESDIR}"/sundtek.initd "${S}" + cp -- \ + "${FILESDIR}"/sundtek.initd \ + "${FILESDIR}"/sundtek-local.service \ + "${FILESDIR}"/_mediaclient \ + "${FILESDIR}"/mediaclient.video \ + "${S}" ! ${develop} || cp "${DISTDIR}/${driverfile}" "${S}/${driverdist}" \ || die "could not copy ${driverfile}" ! use doc || cp "${DISTDIR}/${docfile}" "${S}/${docdist}" \ @@ -140,7 +146,8 @@ src_prepare() { >etc/revdep-rebuild/50-sundtek-tv echo "/${mylibdir}/libmediaclient.so" >etc/ld.so.preload ${develop} && die "Developer mode: Dying after unpacking all" - cp -- "${FILESDIR}"/_mediaclient . + ln -sfn mediaclient.video mediaclient.audio + ln -sfn mediaclient.video mediaclient.dvb epatch_user } @@ -159,6 +166,9 @@ src_install() { dodoc README *.conf ! use doc || dodoc "${docdist}" fi + dobin mediaclient.video + insinto /usr/bin + doins mediaclient.dvb mediaclient.audio insinto /usr/share/zsh/site-functions doins _mediaclient readme.gentoo_create_doc |