diff options
-rw-r--r-- | Makefile | 79 | ||||
-rw-r--r-- | vdr-1.7.22-rsvps.patch | 61 | ||||
-rw-r--r-- | vdr-1.7.35-rsvps.patch (renamed from vdr-1.7.31-rsvps.patch) | 32 |
3 files changed, 62 insertions, 110 deletions
@@ -15,44 +15,52 @@ PLUGIN = vdrtva VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g') -### The C++ compiler and options: - -CXX ?= g++ -CXXFLAGS ?= -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses - ### The directory environment: -VDRDIR = ../../.. -LIBDIR = ../../lib -TMPDIR = /tmp +# Use package data if installed...otherwise assume we're under the VDR source directory: +PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc)) +LIBDIR = $(DESTDIR)$(call PKGCFG,libdir) +LOCDIR = $(DESTDIR)$(call PKGCFG,locdir) +PLGCFG = $(call PKGCFG,plgcfg) +# +TMPDIR ?= /tmp -### Make sure that necessary options are included: +### The compiler options: -include $(VDRDIR)/Make.global +export CFLAGS = $(call PKGCFG,cflags) +export CXXFLAGS = $(call PKGCFG,cxxflags) -### Allow user defined options to overwrite defaults: +### The version number of VDR's plugin API: --include $(VDRDIR)/Make.config +APIVERSION = $(call PKGCFG,apiversion) -### The version number of VDR's plugin API (taken from VDR's "config.h"): +### Allow user defined options to overwrite defaults: -APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h) +-include $(PLGCFG) ### The name of the distribution archive: ARCHIVE = $(PLUGIN)-$(VERSION) PACKAGE = vdr-$(ARCHIVE) +### The name of the shared object file: + +SOFILE = libvdr-$(PLUGIN).so + ### Includes and Defines (add further entries here): -INCLUDES += -I$(VDRDIR)/include +INCLUDES += -DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' +DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' ### The object files (add further files here): OBJS = $(PLUGIN).o +### The main target: + +all: $(SOFILE) i18n + ### Implicit rules: %.o: %.c @@ -70,36 +78,40 @@ $(DEPFILE): Makefile ### Internationalization (I18N): PODIR = po -LOCALEDIR = $(VDRDIR)/locale I18Npo = $(wildcard $(PODIR)/*.po) -I18Ndirs = $(notdir $(foreach file, $(I18Npo), $(basename $(file)))) +I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file)))) +I18Nmsgs = $(addprefix $(LOCDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file)))))) I18Npot = $(PODIR)/$(PLUGIN).pot %.mo: %.po msgfmt -c -o $@ $< $(I18Npot): $(wildcard *.c) - xgettext -C -cTRANSLATORS --no-wrap -F -k -ktr -ktrNOOP --msgid-bugs-address='<see README>' -o $@ $(wildcard *.c) + xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --package-name=vdr-$(PLUGIN) --package-version=$(VERSION) --msgid-bugs-address='<see README>' -o $@ `ls $^` -$(I18Npo): $(I18Npot) - msgmerge -U --no-wrap -F --backup=none -q $@ $< +%.po: $(I18Npot) + msgmerge -U --no-wrap --no-location --backup=none -q -N $@ $< + @touch $@ -i18n: $(I18Nmo) - @mkdir -p $(LOCALEDIR) - for i in $(I18Ndirs); do\ - mkdir -p $(LOCALEDIR)/$$i/LC_MESSAGES;\ - cp $(PODIR)/$$i.mo $(LOCALEDIR)/$$i/LC_MESSAGES/$(PLUGIN).mo;\ - done +$(I18Nmsgs): $(LOCDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo + install -D -m644 $< $@ + +.PHONY: i18n +i18n: $(I18Nmo) $(I18Npot) + +install-i18n: $(I18Nmsgs) ### Targets: -all: libvdr-$(PLUGIN).so i18n +$(SOFILE): $(OBJS) + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ + +install-lib: $(SOFILE) + install -D $^ $(LIBDIR)/$^.$(APIVERSION) -libvdr-$(PLUGIN).so: $(OBJS) - $(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@ - @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) +install: install-lib install-i18n -dist: clean +dist: $(I18Npo) clean @-rm -rf $(TMPDIR)/$(ARCHIVE) @mkdir $(TMPDIR)/$(ARCHIVE) @cp -a * $(TMPDIR)/$(ARCHIVE) @@ -108,4 +120,5 @@ dist: clean @echo Distribution package created as $(PACKAGE).tgz clean: - @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ $(PODIR)/*.mo $(PODIR)/*.pot + @-rm -f $(PODIR)/*.mo $(PODIR)/*.pot + @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ diff --git a/vdr-1.7.22-rsvps.patch b/vdr-1.7.22-rsvps.patch deleted file mode 100644 index c851995..0000000 --- a/vdr-1.7.22-rsvps.patch +++ /dev/null @@ -1,61 +0,0 @@ -diff -u vdr-1.7.22/config.c vdr-1.7/config.c ---- vdr-1.7.22/config.c 2011-12-03 15:21:30.000000000 +0000 -+++ vdr-1.7/config.c 2011-12-14 15:19:34.000000000 +0000 -@@ -416,6 +416,7 @@ - UseSubtitle = 1; - UseVps = 0; - VpsMargin = 120; -+ VpsFallback = 0; - RecordingDirs = 1; - FoldersInTimerMenu = 1; - NumberKeysForChars = 1; -@@ -610,6 +611,7 @@ - else if (!strcasecmp(Name, "UseSubtitle")) UseSubtitle = atoi(Value); - else if (!strcasecmp(Name, "UseVps")) UseVps = atoi(Value); - else if (!strcasecmp(Name, "VpsMargin")) VpsMargin = atoi(Value); -+ else if (!strcasecmp(Name, "VpsFallback")) VpsFallback = atoi(Value); - else if (!strcasecmp(Name, "RecordingDirs")) RecordingDirs = atoi(Value); - else if (!strcasecmp(Name, "FoldersInTimerMenu")) FoldersInTimerMenu = atoi(Value); - else if (!strcasecmp(Name, "NumberKeysForChars")) NumberKeysForChars = atoi(Value); -@@ -707,6 +709,7 @@ - Store("UseSubtitle", UseSubtitle); - Store("UseVps", UseVps); - Store("VpsMargin", VpsMargin); -+ Store("VpsFallback", VpsFallback); - Store("RecordingDirs", RecordingDirs); - Store("FoldersInTimerMenu", FoldersInTimerMenu); - Store("NumberKeysForChars", NumberKeysForChars); -diff -u vdr-1.7.22/config.h vdr-1.7/config.h ---- vdr-1.7.22/config.h 2011-12-03 14:19:52.000000000 +0000 -+++ vdr-1.7/config.h 2011-12-14 15:19:34.000000000 +0000 -@@ -271,6 +271,7 @@ - int UseSubtitle; - int UseVps; - int VpsMargin; -+ int VpsFallback; - int RecordingDirs; - int FoldersInTimerMenu; - int NumberKeysForChars; -diff -u vdr-1.7.22/menu.c vdr-1.7/menu.c ---- vdr-1.7.22/menu.c 2011-12-04 14:52:38.000000000 +0000 -+++ vdr-1.7/menu.c 2011-12-14 15:19:34.000000000 +0000 -@@ -3092,6 +3092,7 @@ - Add(new cMenuEditBoolItem(tr("Setup.Recording$Use episode name"), &data.UseSubtitle)); - Add(new cMenuEditBoolItem(tr("Setup.Recording$Use VPS"), &data.UseVps)); - Add(new cMenuEditIntItem( tr("Setup.Recording$VPS margin (s)"), &data.VpsMargin, 0)); -+ Add(new cMenuEditBoolItem(tr("Setup.Recording$Use running status as VPS fallback"), &data.VpsFallback)); - Add(new cMenuEditBoolItem(tr("Setup.Recording$Mark instant recording"), &data.MarkInstantRecord)); - Add(new cMenuEditStrItem( tr("Setup.Recording$Name instant recording"), data.NameInstantRecord, sizeof(data.NameInstantRecord))); - Add(new cMenuEditIntItem( tr("Setup.Recording$Instant rec. time (min)"), &data.InstantRecordTime, 1, MAXINSTANTRECTIME)); -diff -u vdr-1.7.22/timers.c vdr-1.7/timers.c ---- vdr-1.7.22/timers.c 2011-08-06 14:13:54.000000000 +0100 -+++ vdr-1.7/timers.c 2011-12-14 15:19:34.000000000 +0000 -@@ -430,7 +430,7 @@ - deferred = 0; - - if (HasFlags(tfActive)) { -- if (HasFlags(tfVps) && event && event->Vps()) { -+ if (HasFlags(tfVps) && event && (Setup.VpsFallback || event->Vps())) { - if (Margin || !Directly) { - startTime = event->StartTime(); - stopTime = event->EndTime(); diff --git a/vdr-1.7.31-rsvps.patch b/vdr-1.7.35-rsvps.patch index 21ff388..03396ca 100644 --- a/vdr-1.7.31-rsvps.patch +++ b/vdr-1.7.35-rsvps.patch @@ -1,6 +1,6 @@ -diff -u vdr-1.7.31/config.c vdr-1.7/config.c ---- vdr-1.7.31/config.c 2012-09-15 12:52:03.000000000 +0100 -+++ vdr-1.7/config.c 2012-10-08 09:52:37.091506577 +0100 +diff -ur vdr-1.7.35/config.c vdr-next/config.c +--- vdr-1.7.35/config.c 2012-12-06 09:00:23.000000000 +0000 ++++ vdr-next/config.c 2013-01-02 19:09:42.706358981 +0000 @@ -415,6 +415,7 @@ UseSubtitle = 1; UseVps = 0; @@ -9,7 +9,7 @@ diff -u vdr-1.7.31/config.c vdr-1.7/config.c RecordingDirs = 1; FoldersInTimerMenu = 1; NumberKeysForChars = 1; -@@ -615,6 +616,7 @@ +@@ -617,6 +618,7 @@ else if (!strcasecmp(Name, "UseSubtitle")) UseSubtitle = atoi(Value); else if (!strcasecmp(Name, "UseVps")) UseVps = atoi(Value); else if (!strcasecmp(Name, "VpsMargin")) VpsMargin = atoi(Value); @@ -17,7 +17,7 @@ diff -u vdr-1.7.31/config.c vdr-1.7/config.c else if (!strcasecmp(Name, "RecordingDirs")) RecordingDirs = atoi(Value); else if (!strcasecmp(Name, "FoldersInTimerMenu")) FoldersInTimerMenu = atoi(Value); else if (!strcasecmp(Name, "NumberKeysForChars")) NumberKeysForChars = atoi(Value); -@@ -718,6 +720,7 @@ +@@ -722,6 +724,7 @@ Store("UseSubtitle", UseSubtitle); Store("UseVps", UseVps); Store("VpsMargin", VpsMargin); @@ -25,9 +25,9 @@ diff -u vdr-1.7.31/config.c vdr-1.7/config.c Store("RecordingDirs", RecordingDirs); Store("FoldersInTimerMenu", FoldersInTimerMenu); Store("NumberKeysForChars", NumberKeysForChars); -diff -u vdr-1.7.31/config.h vdr-1.7/config.h ---- vdr-1.7.31/config.h 2012-09-15 12:51:54.000000000 +0100 -+++ vdr-1.7/config.h 2012-10-08 09:52:37.092506509 +0100 +diff -ur vdr-1.7.35/config.h vdr-next/config.h +--- vdr-1.7.35/config.h 2012-12-27 09:56:56.000000000 +0000 ++++ vdr-next/config.h 2013-01-02 19:09:42.707358918 +0000 @@ -286,6 +286,7 @@ int UseSubtitle; int UseVps; @@ -36,10 +36,10 @@ diff -u vdr-1.7.31/config.h vdr-1.7/config.h int RecordingDirs; int FoldersInTimerMenu; int NumberKeysForChars; -diff -u vdr-1.7.31/menu.c vdr-1.7/menu.c ---- vdr-1.7.31/menu.c 2012-09-15 12:45:28.000000000 +0100 -+++ vdr-1.7/menu.c 2012-10-08 09:52:37.096506237 +0100 -@@ -3116,6 +3116,7 @@ +diff -ur vdr-1.7.35/menu.c vdr-next/menu.c +--- vdr-1.7.35/menu.c 2012-12-21 11:11:14.000000000 +0000 ++++ vdr-next/menu.c 2013-01-02 19:09:42.711358667 +0000 +@@ -3126,6 +3126,7 @@ Add(new cMenuEditBoolItem(tr("Setup.Recording$Use episode name"), &data.UseSubtitle)); Add(new cMenuEditBoolItem(tr("Setup.Recording$Use VPS"), &data.UseVps)); Add(new cMenuEditIntItem( tr("Setup.Recording$VPS margin (s)"), &data.VpsMargin, 0)); @@ -47,12 +47,12 @@ diff -u vdr-1.7.31/menu.c vdr-1.7/menu.c Add(new cMenuEditBoolItem(tr("Setup.Recording$Mark instant recording"), &data.MarkInstantRecord)); Add(new cMenuEditStrItem( tr("Setup.Recording$Name instant recording"), data.NameInstantRecord, sizeof(data.NameInstantRecord))); Add(new cMenuEditIntItem( tr("Setup.Recording$Instant rec. time (min)"), &data.InstantRecordTime, 0, MAXINSTANTRECTIME, tr("Setup.Recording$present event"))); -diff -u vdr-1.7.31/timers.c vdr-1.7/timers.c ---- vdr-1.7.31/timers.c 2012-09-15 14:34:03.000000000 +0100 -+++ vdr-1.7/timers.c 2012-10-08 09:52:37.098506102 +0100 +diff -ur vdr-1.7.35/timers.c vdr-next/timers.c +--- vdr-1.7.35/timers.c 2012-12-07 13:14:00.000000000 +0000 ++++ vdr-next/timers.c 2013-01-02 19:09:42.713358543 +0000 @@ -460,7 +460,7 @@ deferred = 0; - + if (HasFlags(tfActive)) { - if (HasFlags(tfVps) && event && event->Vps()) { + if (HasFlags(tfVps) && event && (Setup.VpsFallback || event->Vps())) { |