1 | # Copyright 1999-2005 Gentoo Foundation |
1 | # Copyright 1999-2005 Gentoo Foundation |
2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/Attic/vdr-plugin.eclass,v 1.11 2005/12/10 10:59:59 zzam Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/Attic/vdr-plugin.eclass,v 1.13 2006/03/04 17:43:51 zzam Exp $ |
4 | # |
4 | # |
5 | # Author: |
5 | # Author: |
6 | # Matthias Schwarzott <zzam@gentoo.org> |
6 | # Matthias Schwarzott <zzam@gentoo.org> |
7 | |
7 | |
8 | # vdr-plugin.eclass |
8 | # vdr-plugin.eclass |
… | |
… | |
41 | # |
41 | # |
42 | # This file is sourced by the startscript when plugin is activated in /etc/conf.d/vdr |
42 | # This file is sourced by the startscript when plugin is activated in /etc/conf.d/vdr |
43 | # It could be used for special startup actions for this plugins, or to create the |
43 | # It could be used for special startup actions for this plugins, or to create the |
44 | # plugin command line options from a nicer version of a conf.d file. |
44 | # plugin command line options from a nicer version of a conf.d file. |
45 | |
45 | |
46 | inherit eutils flag-o-matic |
46 | inherit base eutils flag-o-matic |
47 | |
47 | |
48 | # Name of the plugin stripped from all vdrplugin-, vdr- and -cvs pre- and postfixes |
48 | # Name of the plugin stripped from all vdrplugin-, vdr- and -cvs pre- and postfixes |
49 | VDRPLUGIN="${PN/#vdrplugin-/}" |
49 | VDRPLUGIN="${PN/#vdrplugin-/}" |
50 | VDRPLUGIN="${VDRPLUGIN/#vdr-/}" |
50 | VDRPLUGIN="${VDRPLUGIN/#vdr-/}" |
51 | VDRPLUGIN="${VDRPLUGIN/%-cvs/}" |
51 | VDRPLUGIN="${VDRPLUGIN/%-cvs/}" |
… | |
… | |
105 | |
105 | |
106 | while [ "$1" ]; do |
106 | while [ "$1" ]; do |
107 | |
107 | |
108 | case "$1" in |
108 | case "$1" in |
109 | unpack) |
109 | unpack) |
110 | unpack ${A} |
110 | base_src_unpack |
111 | ;; |
111 | ;; |
112 | patchmakefile) |
112 | patchmakefile) |
113 | cd ${S} |
113 | cd ${S} |
114 | |
114 | |
115 | ebegin "Patching Makefile" |
115 | ebegin "Patching Makefile" |
… | |
… | |
181 | |
181 | |
182 | for f in ${FILESDIR}/confd-${PV} ${FILESDIR}/confd; do |
182 | for f in ${FILESDIR}/confd-${PV} ${FILESDIR}/confd; do |
183 | if [[ -f "${f}" ]]; then |
183 | if [[ -f "${f}" ]]; then |
184 | insinto /etc/conf.d |
184 | insinto /etc/conf.d |
185 | newins "${f}" vdr.${VDRPLUGIN} |
185 | newins "${f}" vdr.${VDRPLUGIN} |
|
|
186 | VDR_PLUGIN_CONFIG_FILE_INSTALLED=1 |
186 | break |
187 | break |
187 | fi |
188 | fi |
188 | done |
189 | done |
189 | |
190 | |
190 | for f in ${FILESDIR}/rc-addon-${PV}.sh ${FILESDIR}/rc-addon.sh; do |
191 | for f in ${FILESDIR}/rc-addon-${PV}.sh ${FILESDIR}/rc-addon.sh; do |
… | |
… | |
202 | einfo "The vdr plugin ${VDRPLUGIN} has now been installed." |
203 | einfo "The vdr plugin ${VDRPLUGIN} has now been installed." |
203 | einfo "To activate execute the following command:" |
204 | einfo "To activate execute the following command:" |
204 | einfo |
205 | einfo |
205 | einfo " emerge --config ${PN}" |
206 | einfo " emerge --config ${PN}" |
206 | einfo |
207 | einfo |
|
|
208 | if [[ -n "${VDR_PLUGIN_CONFIG_FILE_INSTALLED}" ]]; then |
|
|
209 | einfo "And have a look at the config-file" |
|
|
210 | einfo "/etc/conf.d/vdr.${VDRPLUGIN}" |
|
|
211 | einfo |
|
|
212 | fi |
207 | } |
213 | } |
208 | |
214 | |
209 | vdr-plugin_pkg_postrm() { |
215 | vdr-plugin_pkg_postrm() { |
210 | remove_vdrplugindb |
216 | remove_vdrplugindb |
211 | } |
217 | } |