--- /dev/null
+written by Joerg Bornkessel <hd_brumm@gentoo.org>
+
+diff -Naur setup-0.3.1.orig/config.cpp setup-0.3.1/config.cpp
+--- setup-0.3.1.orig/config.cpp 2006-03-11 18:26:42.912352500 +0100
++++ setup-0.3.1/config.cpp 2006-03-11 18:30:07.597144500 +0100
+@@ -13,7 +13,7 @@
+ #include <sys/types.h>
+ #include <dirent.h>
+ #include "vdr/plugin.h"
+-#include "tinystr.h"
++#include "vdr/tinystr.h"
+ #include "config.h"
+ #include "sysconfig.h"
+ #include "plugins.h"
+@@ -148,7 +148,7 @@
+ - bootLinux=\"/sbin/reboot\" \n\
+ - VDRlibDir=\"/usr/lib/vdr/plugins\" \n\
+ - <plugins sysconfig=\"PLUGINLIST\">\n\
+-- <plugin name=\"setup\" info=\"Minivdr-Setup\" active=\"yes\" />\n\
++- <plugin name=\"setup\" info=\"Gentoo-VDR-Setup\" active=\"yes\" />\n\
+ - <plugin name=\"vdrcd\" param=\"-c /dev/dvd -c /media/dvd -c /media/cdfs\" info=\"VDR CD\"/>\n\
+ - ...\n\
+ - </plugin>\n\
+diff -Naur setup-0.3.1.orig/config.h setup-0.3.1/config.h
+--- setup-0.3.1.orig/config.h 2006-03-11 18:26:42.912352500 +0100
++++ setup-0.3.1/config.h 2006-03-11 18:30:28.766467500 +0100
+@@ -11,7 +11,7 @@
+
+ #ifndef CONFIG_H
+ #define CONFIG_H
+-#include "tinystr.h"
++#include "vdr/tinystr.h"
+ #include "plugins.h"
+ #include "sysconfig.h"
+ #include "menus.h"
+diff -Naur setup-0.3.1.orig/debug.h setup-0.3.1/debug.h
+--- setup-0.3.1.orig/debug.h 2006-03-11 18:26:42.908352250 +0100
++++ setup-0.3.1/debug.h 2006-03-11 18:31:04.176680500 +0100
+@@ -31,6 +31,6 @@
+ #define DEBUG7(p1, p2, p3, p4, p5, p6, p7) esyslog(p1, p2, p3, p4, p5, p6, p7)
+
+ #endif
+-#define DBG_PREFIX "ERROR: Minivdr-Setup"
++#define DBG_PREFIX "ERROR: Gentoo-VDR-Setup"
+
+ #endif /* DEBUG_H */
+diff -Naur setup-0.3.1.orig/getVdrSetupMenu.pl setup-0.3.1/getVdrSetupMenu.pl
+--- setup-0.3.1.orig/getVdrSetupMenu.pl 2006-03-11 18:26:42.912352500 +0100
++++ setup-0.3.1/getVdrSetupMenu.pl 2006-03-11 18:32:11.248872250 +0100
+@@ -35,6 +35,7 @@
+ if (/^\s*#include/)
+ {
+ #printf(OUTPUT $_);
++ s-"(.*)"-<vdr/\1>-;
+ push @headers, $_;
+ }
+ if (/^\s*class\s+\w+MenuSetupBase/)
+diff -Naur setup-0.3.1.orig/i18n.cpp setup-0.3.1/i18n.cpp
+--- setup-0.3.1.orig/i18n.cpp 2006-03-11 18:26:42.912352500 +0100
++++ setup-0.3.1/i18n.cpp 2006-03-11 18:33:13.488762000 +0100
+@@ -12,8 +12,8 @@
+
+ const tI18nPhrase Phrases[] = {
+ {
+- "Setup - designed for minivdr.de (c)",
+- "Setup - designed for minivdr.de (c)",
++ "Setup - VDR",
++ "Setup - VDR",
+ "",
+ "",
+ "",
+@@ -643,8 +643,8 @@
+ },
+
+ {
+- "missing channels/*.conf",
+- "fehlende channels/*.conf",
++ "missing channels.d/*.conf",
++ "fehlende channels.d/*.conf",
+ "",
+ "",
+ "",
+diff -Naur setup-0.3.1.orig/Makefile setup-0.3.1/Makefile
+--- setup-0.3.1.orig/Makefile 2006-03-11 18:26:42.948354750 +0100
++++ setup-0.3.1/Makefile 2006-03-11 18:34:34.861847500 +0100
+@@ -84,9 +84,9 @@
+ $(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@
+ @cp $@ $(LIBDIR)/$@.$(VDRVERSION)
+
+-setupsystemmenu.cpp: ../../../menu.c
++setupsystemmenu.cpp: /usr/share/vdr/setup/menu.c
+ @echo "Extracting class definitions from VDR's menu.c for standard Setup"
+- @./getVdrSetupMenu.pl ../../../menu.c
++ @./getVdrSetupMenu.pl /usr/share/vdr/setup/menu.c
+
+
+ dist: clean
+diff -Naur setup-0.3.1.orig/MANUAL.DE setup-0.3.1/MANUAL.DE
+--- setup-0.3.1.orig/MANUAL.DE 2006-03-11 18:26:42.924353250 +0100
++++ setup-0.3.1/MANUAL.DE 2006-03-11 18:35:32.901474750 +0100
+@@ -206,7 +206,7 @@
+ werden in Form von "*" angezeigt.
+ channellist
+ setup Erlaubt die Auswahl von vordefinierten Kanallisten. Die
+- Kanallisten müssen in den Verzeichnis <vdrdir>/plugins/channels
++ Kanallisten müssen in den Verzeichnis <vdrdir>/plugins/channels.d
+ mit der Endung *.conf abgelegt werden. Das Setup-Plugin linkt
+ dann die ausgewählte Kanalliste nach <vdrdir>/channels.conf
+ networkdriver"
+diff -Naur setup-0.3.1.orig/menus.cpp setup-0.3.1/menus.cpp
+--- setup-0.3.1.orig/menus.cpp 2006-03-11 18:26:42.908352250 +0100
++++ setup-0.3.1/menus.cpp 2006-03-11 18:37:43.905662000 +0100
+@@ -840,7 +840,7 @@
+ *tmp = '\0';
+
+ asprintf(&channelFile, "%s/channels.conf",channelDir);
+- asprintf(&channelDir, "%s/channels",channelDir);
++ asprintf(&channelDir, "%s/channels.d",channelDir);
+
+
+ if( (dirFP = opendir(channelDir))!= NULL)
+diff -Naur setup-0.3.1.orig/menus.h setup-0.3.1/menus.h
+--- setup-0.3.1.orig/menus.h 2006-03-11 18:26:42.912352500 +0100
++++ setup-0.3.1/menus.h 2006-03-11 18:38:27.136363750 +0100
+@@ -13,7 +13,7 @@
+ #define MENUS_H
+ #include <vdr/tools.h>
+ #include "util.h"
+-#include "tinystr.h"
++#include "vdr/tinystr.h"
+ #include "sysconfig.h"
+
+
+diff -Naur setup-0.3.1.orig/setup.cpp setup-0.3.1/setup.cpp
+--- setup-0.3.1.orig/setup.cpp 2006-03-11 18:26:42.924353250 +0100
++++ setup-0.3.1/setup.cpp 2006-03-11 18:44:35.183365250 +0100
+@@ -15,8 +15,8 @@
+ #include "i18n.h"
+
+ static const char *VERSION = "0.3.1";
+-static const char *DESCRIPTION = "Minivdr-Setup";
+-static const char *MAINMENUENTRY = "Minivdr-Setup";
++static const char *DESCRIPTION = "Gentoo-VDR-Setup";
++static const char *MAINMENUENTRY = "Gentoo-VDR-Setup";
+
+ //holds setup configuration
+ cSetupSetup setupSetup;
+diff -Naur setup-0.3.1.orig/setupmenu.cpp setup-0.3.1/setupmenu.cpp
+--- setup-0.3.1.orig/setupmenu.cpp 2006-03-11 18:26:42.924353250 +0100
++++ setup-0.3.1/setupmenu.cpp 2006-03-11 18:47:33.110485000 +0100
+@@ -537,7 +537,7 @@
+ if( e->GetNrOfSelectionValues() == 0 )
+ {
+ char *txt=NULL;
+- asprintf(&txt, "%s:\t%s", nohk(e->GetName()),tr("missing channels/*.conf"));
++ asprintf(&txt, "%s:\t%s", nohk(e->GetName()),tr("missing channels.d/*.conf"));
+ Add(new cOsdItem (txt));
+ free(txt);
+ }
+@@ -699,13 +699,13 @@
+ //#############################################################################################
+
+
+-cSetupMenu::cSetupMenu() : cOsdMenu(tr("Setup - designed for minivdr.de (c)"))
++cSetupMenu::cSetupMenu() : cOsdMenu(tr("Setup - Gentoo-VDR"))
+ {
+ char *configFile=NULL;
+
+ SetCols(20);
+
+- asprintf(&configFile, "%s/setup/minivdr-setup.xml", cPlugin::ConfigDirectory());
++ asprintf(&configFile, "%s/setup/vdr-setup.xml", cPlugin::ConfigDirectory());
+ _config = new Config( configFile );
+ free(configFile);
+
--- /dev/null
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-plugins/vdr-setup/vdr-setup-0.3.1.ebuild,v 1.1 2006/03/11 20:35:57 hd_brummy Exp $
+
+inherit vdr-plugin
+
+DESCRIPTION="Video Disk Recorder Plugin - Create Submenus, Configure VDR on OSD"
+HOMEPAGE="http://www.vdrtools.de/vdrsetup.html"
+SRC_URI="http://www.vdrtools.de/download/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+
+DEPEND=">=media-video/vdr-1.3.44"
+
+S=${WORKDIR}/setup-${PV}
+
+PATCHES="${FILESDIR}/${P}-*.diff"
+
+pkg_setup() {
+ vdr-plugin_pkg_setup
+
+ if [[ ! -f /usr/include/vdr/submenu.h ]] || [[ ! -f /usr/share/vdr/setup/menu.c ]]; then
+ echo
+ eerror "Patched VDR needed"
+ echo
+ einfo "reemerge VDR with USE=\"setup-plugin\" " && die "unpack failed, patched VDR needed"
+ fi
+}
+
+src_install() {
+ vdr-plugin_src_install
+
+ keepdir /etc/vdr/channels.d
+
+ insinto /var/vdr
+ newins ${S}/Examples/sysconfig sysconfig-setup
+ fowners vdr:vdr /var/vdr/sysconfig-setup
+
+ insinto /etc/vdr/plugins/setup
+ doins ${FILESDIR}/vdr-setup.xml
+
+ insinto /etc/vdr/plugins/setup/help
+ doins ${S}/Examples/help/*.hlp
+
+ chown -R vdr:vdr ${D}/etc/vdr
+
+ dodoc MANUAL.DE Examples/*.xml
+}
+
+pkg_preinst() {
+
+ if [[ ! -L ${ROOT}/etc/vdr/channels.conf ]]; then
+ cp ${ROOT}/etc/vdr/channels.conf ${IMAGE}/etc/vdr/channels.d/channels.conf.bak
+ cp ${ROOT}/etc/vdr/channels.conf ${IMAGE}/etc/vdr/channels.d/channels.conf
+ fowners vdr:vdr /etc/vdr/channels.d/{channels.conf,channels.conf.bak}
+ fi
+}
+
+pkg_postinst() {
+ vdr-plugin_pkg_postinst
+
+ echo
+ einfo "Edit /etc/vdr/plugins/setup/*"
+ echo
+ ewarn "Setup-Plugin will change the path of your channels.conf"
+ einfo "You will find a backup copy on /etc/vdr/channels/channels.conf.bak"
+ echo
+}