# rc-addon plugin-startup-skript for vdr-radio
#
# This sript is called by gentoo-vdr-scripts on start of VDR
+#
+# Joerg Bornkessel <hd_brummy@astrali.de>
# Set default DIR to the background picture
RADIO_BACKGROUND_DIR=/usr/share/vdr/radio
+# Set default DIR for cache
+RADIO_TMP_DIR=/var/cache/vdr-radio
-plugin_pre_vdr_start() {
+_make_cachedir() {
+ if [ ! -e "${RADIO_TMP_DIR}" ]; then
+ mkdir "${RADIO_TMP_DIR}"
+ chown -R vdr:vdr "${RADIO_TMP_DIR}"
+ fi
+}
- add_plugin_param "-f ${RADIO_BACKGROUND_DIR}"
+_make_cachedir
+
+plugin_pre_vdr_start() {
+ add_plugin_param "-f ${RADIO_BACKGROUND_DIR}"
+ add_plugin_param "-d ${RADIO_TMP_DIR}"
}
+++ /dev/null
-#
-# rc-addon plugin-startup-skript for vdr-radio
-#
-# This sript is called by gentoo-vdr-scripts on start of VDR
-
-# Set default DIR to the background picture
-RADIO_BACKGROUND_DIR=/usr/share/vdr/radio
-RADIO_TMP_DIR=/var/cache/vdr-radio
-
-plugin_pre_vdr_start() {
-
- add_plugin_param "-f ${RADIO_BACKGROUND_DIR}"
- add_plugin_param "-d ${RADIO_TMP_DIR}"
-
-}
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
KEYWORDS="~amd64 ~x86"
IUSE=""
-RDEPEND=">=media-video/vdr-1.7.34"
+RDEPEND="media-video/vdr"
DEPEND="${RDEPEND}"
-VDR_RCADDON_FILE="${FILESDIR}/rc-addon.sh-0.2.0"
+VDR_RCADDON_FILE="${FILESDIR}/rc-addon.sh"
src_install() {
vdr-plugin-2_src_install
- cd "${S}"/config
+ cd "${S}"/config || die "Can't enter source folder"
insinto /usr/share/vdr/radio
doins mpegstill/rtext*
exeinto /usr/share/vdr/radio
doexe scripts/radioinfo*
-
- diropts -m 755 -o vdr -g vdr
- keepdir "/var/cache/vdr-radio"
}