r310 - in vdr/vdr-plugin-console/trunk/debian: . patches
Thomas Schmidt
pkg-vdr-dvb-changes@lists.alioth.debian.org
Sat, 26 Mar 2005 14:54:39 +0000
Author: tschmidt
Date: 2005-03-26 14:54:39 +0000 (Sat, 26 Mar 2005)
New Revision: 310
Added:
vdr/vdr-plugin-console/trunk/debian/default-message
vdr/vdr-plugin-console/trunk/debian/patches/03_command_from_cli.dpatch
vdr/vdr-plugin-console/trunk/debian/plugin.console.conf
Modified:
vdr/vdr-plugin-console/trunk/debian/changelog
vdr/vdr-plugin-console/trunk/debian/control
vdr/vdr-plugin-console/trunk/debian/install
vdr/vdr-plugin-console/trunk/debian/patches/00list
vdr/vdr-plugin-console/trunk/debian/rules
Log:
vdr-plugin-console:
* Build-Depend on vdr (>=1.2.6-7)
* Added 03_command_from_cli to be able to set the default
command from the commandline interface
* Set the default command in /etc/vdr/plugins/plugin.console.conf
to just display a short text how to configure the plugin
* prepare 0.5.1-16 for release
Modified: vdr/vdr-plugin-console/trunk/debian/changelog
===================================================================
--- vdr/vdr-plugin-console/trunk/debian/changelog 2005-03-25 20:32:48 UTC (rev 309)
+++ vdr/vdr-plugin-console/trunk/debian/changelog 2005-03-26 14:54:39 UTC (rev 310)
@@ -1,11 +1,14 @@
vdr-plugin-console (0.5.1-16) unstable; urgency=low
- * NOT RELEASED YET
-
* Thomas Schmidt <tschmidt@debian.org>
+ - Build-Depend on vdr (>=1.2.6-7)
+ - Added 03_command_from_cli to be able to set the default
+ command from the commandline interface
+ - Set the default command in /etc/vdr/plugins/plugin.console.conf
+ to just display a short text how to configure the plugin
- Changed my email-address to the debian one
- -- Debian VDR Team <pkg-vdr-dvb-devel@lists.alioth.debian.org> Thu, 17 Mar 2005 20:08:33 +0100
+ -- Debian VDR Team <pkg-vdr-dvb-devel@lists.alioth.debian.org> Sat, 26 Mar 2005 15:49:48 +0100
vdr-plugin-console (0.5.1-15) unstable; urgency=low
Modified: vdr/vdr-plugin-console/trunk/debian/control
===================================================================
--- vdr/vdr-plugin-console/trunk/debian/control 2005-03-25 20:32:48 UTC (rev 309)
+++ vdr/vdr-plugin-console/trunk/debian/control 2005-03-26 14:54:39 UTC (rev 310)
@@ -3,7 +3,7 @@
Priority: extra
Maintainer: Debian VDR Team <pkg-vdr-dvb-devel@lists.alioth.debian.org>
Uploaders: Thomas Schmidt <tschmidt@debian.org>
-Build-Depends: debhelper (>> 4.1.16), vdr-dev (>=1.1.16), dpatch (>= 2.0.9)
+Build-Depends: debhelper (>> 4.1.16), vdr-dev (>=1.2.6-7), dpatch (>= 2.0.9)
Standards-Version: 3.6.1
Package: vdr-plugin-console
Added: vdr/vdr-plugin-console/trunk/debian/default-message
===================================================================
--- vdr/vdr-plugin-console/trunk/debian/default-message 2005-03-25 20:32:48 UTC (rev 309)
+++ vdr/vdr-plugin-console/trunk/debian/default-message 2005-03-26 14:54:39 UTC (rev 310)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+echo "The default installation of the console plugin just displays this message.
+
+If you want to start another programm with the console plugin,
+you have to edit /etc/vdr/plugins/plugin.console.conf.
+
+Another alternative to start certain programs is to create the file
+/etc/vdr/plugins/commands.conf and to add entries like this:
+
+Midnight Commander : mc
+IPTraf : iptraf
+
+(Note: This is just the same format as it is used in vdr's commands.conf and
+reccmds.conf, a description of it can be found under \"man 5 vdr\".)"
Property changes on: vdr/vdr-plugin-console/trunk/debian/default-message
___________________________________________________________________
Name: svn:executable
+ *
Modified: vdr/vdr-plugin-console/trunk/debian/install
===================================================================
--- vdr/vdr-plugin-console/trunk/debian/install 2005-03-25 20:32:48 UTC (rev 309)
+++ vdr/vdr-plugin-console/trunk/debian/install 2005-03-26 14:54:39 UTC (rev 310)
@@ -1 +1,5 @@
+debian/default-message usr/share/vdr-plugin-console
+
+debian/plugin.console.conf etc/vdr/plugins
+
libvdr-*.so.* usr/lib/vdr/plugins
Modified: vdr/vdr-plugin-console/trunk/debian/patches/00list
===================================================================
--- vdr/vdr-plugin-console/trunk/debian/patches/00list 2005-03-25 20:32:48 UTC (rev 309)
+++ vdr/vdr-plugin-console/trunk/debian/patches/00list 2005-03-26 14:54:39 UTC (rev 310)
@@ -1,2 +1,3 @@
01_Makefile-fPIC-fix
02_menu.h-fix
+03_command_from_cli
Added: vdr/vdr-plugin-console/trunk/debian/patches/03_command_from_cli.dpatch
===================================================================
--- vdr/vdr-plugin-console/trunk/debian/patches/03_command_from_cli.dpatch 2005-03-25 20:32:48 UTC (rev 309)
+++ vdr/vdr-plugin-console/trunk/debian/patches/03_command_from_cli.dpatch 2005-03-26 14:54:39 UTC (rev 310)
@@ -0,0 +1,115 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 03_command_from_cli.dpatch by Thomas Schmidt <tschmidt@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Added commandline option --command to be able to specify which
+## DP: command should be called when starting the plugin.
+
+@DPATCH@
+diff -urNad vdr-plugin-console-0.5.1/console.c /tmp/dpep.CXpZA5/vdr-plugin-console-0.5.1/console.c
+--- vdr-plugin-console-0.5.1/console.c 2005-03-26 14:54:18.244457384 +0100
++++ /tmp/dpep.CXpZA5/vdr-plugin-console-0.5.1/console.c 2005-03-26 14:54:18.995343232 +0100
+@@ -56,14 +56,32 @@
+
+
+ const char *cPluginConsole::CommandLineHelp(void) {
+-
+- return NULL;
++ // Return a string that describes all known command line options.
++ return " -c prog, --command=prog specify the programm which is\n"
++ " called when you start the plugin\n";
+ }
+
+
+ bool cPluginConsole::ProcessArgs(int argc, char *argv[]) {
+-
+- return true;
++ // Implement command line argument processing here if applicable.
++ static struct option long_options[] = {
++ { "command", required_argument, NULL, 'c' },
++ { NULL, no_argument, NULL, 0 },
++ };
++
++ int c;
++ while ((c = getopt_long(argc, argv, "c:", long_options, NULL)) != -1) {
++ switch (c) {
++ case 'c':
++ fprintf(stderr, "arg: %s\n", optarg);
++ ConsoleCmd = strdup(optarg);
++ break;
++ default:
++ fprintf(stderr, "arg char: %c\n", c);
++ return false;
++ }
++ }
++ return true;
+ }
+
+
+diff -urNad vdr-plugin-console-0.5.1/engine.c /tmp/dpep.CXpZA5/vdr-plugin-console-0.5.1/engine.c
+--- vdr-plugin-console-0.5.1/engine.c 2005-03-26 14:54:18.245457232 +0100
++++ /tmp/dpep.CXpZA5/vdr-plugin-console-0.5.1/engine.c 2005-03-26 14:54:50.518550976 +0100
+@@ -19,6 +19,17 @@
+ #include "i18n.h"
+
+
++// This program will be used to realize a console.
++// Be carefull! If your VDR runs as root, then every
++// user can kill your machine if you don't protect
++// the cnsoles.
++// So the default is "/bin/login".
++
++#ifdef CONSOLE_USE_SHELL_INSTEAD_LOGIN
++const char *ConsoleCmd="/bin/sh";
++#else
++const char *ConsoleCmd="/bin/login";
++#endif
+
+
+
+@@ -1582,9 +1593,9 @@
+
+ int cConsoles::CreateConsole() {
+
+- char* const args[] = { PROG_FOR_CONSOLE, NULL };
++ char* const args[] = { (char*)ConsoleCmd, NULL };
+
+- cVirtualConsole* p = new cVirtualConsole( tr("Console"), PROG_FOR_CONSOLE, args );
++ cVirtualConsole* p = new cVirtualConsole( tr("Console"), ConsoleCmd, args );
+
+ if (p) {
+
+diff -urNad vdr-plugin-console-0.5.1/engine.h /tmp/dpep.CXpZA5/vdr-plugin-console-0.5.1/engine.h
+--- vdr-plugin-console-0.5.1/engine.h 2005-03-26 14:54:18.245457232 +0100
++++ /tmp/dpep.CXpZA5/vdr-plugin-console-0.5.1/engine.h 2005-03-26 14:54:18.996343080 +0100
+@@ -23,21 +23,7 @@
+ #define CONSOLE_DEBUG( xx )
+ //#define CONSOLE_DEBUG( xx ) xx;
+
+-
+-// This program will be used to realize a console.
+-// Be carefull! If your VDR runs as root, then every
+-// user can kill your machine if you don't protect
+-// the cnsoles.
+-// So the default is "/bin/login".
+-
+-#ifdef CONSOLE_USE_SHELL_INSTEAD_LOGIN
+-#define PROG_FOR_CONSOLE "/bin/sh"
+-#else
+-#define PROG_FOR_CONSOLE "/bin/login"
+-#endif
+-
+-
+-
++extern const char *ConsoleCmd;
+
+ // With the small font there are many cells possible
+ #define CONSOLE_MAXCOLS 100
+@@ -47,7 +33,6 @@
+
+
+
+-
+ // define used keys
+
+ #define BS '\010' // Backspace
Property changes on: vdr/vdr-plugin-console/trunk/debian/patches/03_command_from_cli.dpatch
___________________________________________________________________
Name: svn:executable
+ *
Added: vdr/vdr-plugin-console/trunk/debian/plugin.console.conf
===================================================================
--- vdr/vdr-plugin-console/trunk/debian/plugin.console.conf 2005-03-25 20:32:48 UTC (rev 309)
+++ vdr/vdr-plugin-console/trunk/debian/plugin.console.conf 2005-03-26 14:54:39 UTC (rev 310)
@@ -0,0 +1,4 @@
+# Here you can specify which command should be called
+# when the plugin is started, the default just
+# displays a short message
+-c /usr/share/vdr-plugin-console/default-message
Modified: vdr/vdr-plugin-console/trunk/debian/rules
===================================================================
--- vdr/vdr-plugin-console/trunk/debian/rules 2005-03-25 20:32:48 UTC (rev 309)
+++ vdr/vdr-plugin-console/trunk/debian/rules 2005-03-26 14:54:39 UTC (rev 310)
@@ -18,7 +18,9 @@
INSTALL_PROGRAM += -s
endif
-VDR=vdr
+# Set VDR=vdr or VDR=vdrdevel - vdrdevel always uses dpatch
+VDR=$(shell dh_listpackages | grep "^vdr.*-" | head -n 1 | sed -e "s/-.*//")
+
PACKAGE=$(VDR)-plugin-console
VDRDIR=/usr/include/$(VDR)
DVBDIR=/usr/include
@@ -79,16 +81,7 @@
dh_fixperms
dh_installdeb
dh_shlibdeps
-
- # VDR can be customized with quite a lot of different patches, which can make
- # the plugins binary incompatible.
- # Although Debian will not provide different binary packages for VDR, we
- # will include a patchlevel info, which is created at compile time and can
- # be checked before a plugin is loaded.
-
- [ -r $(VDRDIR)/patchlevel ] || echo 'patchlevel=' >> debian/$(PACKAGE).substvars
- [ ! -r $(VDRDIR)/patchlevel ] || cat $(VDRDIR)/patchlevel >> debian/$(PACKAGE).substvars
-
+ /usr/lib/$(VDR)-dev/patchlevel.sh subst
dh_gencontrol
dh_md5sums
dh_builddeb