Hi Klaus, the attached patch makes it possible to specify a default config directory on build, independent from the default video directory. I don't like a setup, where config files and video data are mixed up, so I use a special config dir. It also adds a rule "plugin-install" which calles the target "install" for every plugin. I have added these target to all your example plugins. The purpose is to copy the built library to the directory specified by $(PLUGINLIBDIR) as vdr searches for plugins there. Otherwise, you have to copy these plugin-libs to the specified directory by hand. Maybe, you can consider integrating these changes into the 1.3 release. I think the packagers (rpm, deb) whould also benefit from this patch! CU/all && Mery Christmas! -- Patrick Cernko | mailto:errror@errror.de | http://www.errror.de Quote of the Week: "A weird imagination is most useful to gain full advantage of all the features." (screen(1) man-page)
diff -ur --exclude xine --exclude xine-0.0.3 --exclude xine-0.0.3.orig --exclude Make.config --exclude DVB --exclude transfer.c vdr-1.2.6.orig/Makefile vdr-1.2.6/Makefile --- vdr-1.2.6.orig/Makefile 2003-08-09 13:09:45.000000000 +0200 +++ vdr-1.2.6/Makefile 2003-12-22 13:33:42.000000000 +0100 @@ -23,6 +23,7 @@ PLUGINLIBDIR= $(PLUGINDIR)/lib VIDEODIR = /video +CONFIGDIR = /video DOXYGEN = /usr/bin/doxygen DOXYFILE = Doxyfile @@ -52,6 +53,7 @@ DEFINES += -DVIDEODIR=\"$(VIDEODIR)\" DEFINES += -DPLUGINDIR=\"$(PLUGINLIBDIR)\" +DEFINES += -DCONFIGDIR=\"$(CONFIGDIR)\" ifdef DEBUG_OSD DEFINES += -DDEBUG_OSD @@ -118,16 +120,28 @@ @for i in `ls $(PLUGINDIR)/src | grep -v '[^a-z0-9]'`; do $(MAKE) -C "$(PLUGINDIR)/src/$$i" clean; done @-rm -f $(PLUGINLIBDIR)/* +plugins-install: + for i in `ls $(PLUGINDIR)/src | grep -v '[^a-z0-9]'`; do \ + $(MAKE) -C "$(PLUGINDIR)/src/$$i" install || echo "Plugin $$i has no installation rule!"; \ + done + # Install the files: install: - @cp vdr runvdr $(BINDIR) - @gzip -c vdr.1 > $(MANDIR)/man1/vdr.1.gz - @gzip -c vdr.5 > $(MANDIR)/man5/vdr.5.gz - @if [ ! -d $(VIDEODIR) ]; then\ - mkdir $(VIDEODIR);\ - cp *.conf $(VIDEODIR);\ - fi + mkdir -p $(BINDIR) + cp vdr runvdr $(BINDIR) + mkdir -p $(MANDIR)/man1 + gzip -c vdr.1 > $(MANDIR)/man1/vdr.1.gz + mkdir -p $(MANDIR)/man5 + gzip -c vdr.5 > $(MANDIR)/man5/vdr.5.gz + mkdir -p $(VIDEODIR) + mkdir -p $(CONFIGDIR) + mkdir -p $(CONFIGDIR)/plugins + for conf in *.conf; do \ + if [ ! -f $(CONFIGDIR)/$$conf ]; then \ + cp $$conf $(CONFIGDIR); \ + fi; \ + done # Source documentation: diff -ur --exclude xine --exclude xine-0.0.3 --exclude xine-0.0.3.orig --exclude Make.config --exclude DVB --exclude transfer.c vdr-1.2.6.orig/PLUGINS/src/hello/Makefile vdr-1.2.6/PLUGINS/src/hello/Makefile --- vdr-1.2.6.orig/PLUGINS/src/hello/Makefile 2002-12-13 15:54:14.000000000 +0100 +++ vdr-1.2.6/PLUGINS/src/hello/Makefile 2003-12-22 13:37:30.000000000 +0100 @@ -80,3 +80,7 @@ clean: @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ + +install: all + mkdir -p $(PLUGINLIBDIR) + cp $(LIBDIR)/libvdr-$(PLUGIN).so.$(VDRVERSION) $(PLUGINLIBDIR) diff -ur --exclude xine --exclude xine-0.0.3 --exclude xine-0.0.3.orig --exclude Make.config --exclude DVB --exclude transfer.c vdr-1.2.6.orig/PLUGINS/src/osddemo/Makefile vdr-1.2.6/PLUGINS/src/osddemo/Makefile --- vdr-1.2.6.orig/PLUGINS/src/osddemo/Makefile 2002-12-13 15:54:29.000000000 +0100 +++ vdr-1.2.6/PLUGINS/src/osddemo/Makefile 2003-12-22 13:38:05.000000000 +0100 @@ -80,3 +80,7 @@ clean: @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ + +install: all + mkdir -p $(PLUGINLIBDIR) + cp $(LIBDIR)/libvdr-$(PLUGIN).so.$(VDRVERSION) $(PLUGINLIBDIR) diff -ur --exclude xine --exclude xine-0.0.3 --exclude xine-0.0.3.orig --exclude Make.config --exclude DVB --exclude transfer.c vdr-1.2.6.orig/PLUGINS/src/sky/Makefile vdr-1.2.6/PLUGINS/src/sky/Makefile --- vdr-1.2.6.orig/PLUGINS/src/sky/Makefile 2002-12-13 15:54:24.000000000 +0100 +++ vdr-1.2.6/PLUGINS/src/sky/Makefile 2003-12-22 13:37:53.000000000 +0100 @@ -80,3 +80,7 @@ clean: @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ + +install: all + mkdir -p $(PLUGINLIBDIR) + cp $(LIBDIR)/libvdr-$(PLUGIN).so.$(VDRVERSION) $(PLUGINLIBDIR) diff -ur --exclude xine --exclude xine-0.0.3 --exclude xine-0.0.3.orig --exclude Make.config --exclude DVB --exclude transfer.c vdr-1.2.6.orig/PLUGINS/src/status/Makefile vdr-1.2.6/PLUGINS/src/status/Makefile --- vdr-1.2.6.orig/PLUGINS/src/status/Makefile 2002-12-13 15:54:19.000000000 +0100 +++ vdr-1.2.6/PLUGINS/src/status/Makefile 2003-12-22 13:38:18.000000000 +0100 @@ -80,3 +80,7 @@ clean: @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ + +install: all + mkdir -p $(PLUGINLIBDIR) + cp $(LIBDIR)/libvdr-$(PLUGIN).so.$(VDRVERSION) $(PLUGINLIBDIR) diff -ur --exclude xine --exclude xine-0.0.3 --exclude xine-0.0.3.orig --exclude Make.config --exclude DVB --exclude transfer.c vdr-1.2.6.orig/vdr.c vdr-1.2.6/vdr.c --- vdr-1.2.6.orig/vdr.c 2003-09-14 11:36:54.000000000 +0200 +++ vdr-1.2.6/vdr.c 2003-12-22 13:21:27.000000000 +0100 @@ -96,7 +96,7 @@ int SVDRPport = DEFAULTSVDRPPORT; const char *AudioCommand = NULL; - const char *ConfigDirectory = NULL; + const char *ConfigDirectory = CONFIGDIR; bool DisplayHelp = false; bool DisplayVersion = false; bool DaemonMode = false; @@ -232,8 +232,8 @@ if (DisplayHelp) { printf("Usage: vdr [OPTIONS]\n\n" // for easier orientation, this is column 80| " -a CMD, --audio=CMD send Dolby Digital audio to stdin of command CMD\n" - " -c DIR, --config=DIR read config files from DIR (default is to read them\n" - " from the video directory)\n" + " -c DIR, --config=DIR read config files from DIR (default is\n" + " %s)\n" " -d, --daemon run in daemon mode\n" " -D NUM, --device=NUM use only the given DVB device (NUM = 0, 1, 2...)\n" " there may be several -D options (default: all DVB\n" @@ -261,6 +261,7 @@ " -w SEC, --watchdog=SEC activate the watchdog timer with a timeout of SEC\n" " seconds (default: %d); '0' disables the watchdog\n" "\n", + ConfigDirectory, cSIProcessor::GetEpgDataFileName() ? cSIProcessor::GetEpgDataFileName() : "'-'", DEFAULTPLUGINDIR, DEFAULTSVDRPPORT,
Attachment:
pgp00018.pgp
Description: PGP signature