# HG changeset patch # User nathan # Date 1198930756 -3600 # Node ID bc64e11172f5d331e148a79fc285664c69bfaf2e # Parent 5686936eefc5c702f886c8f2ca60371b80b50fe6 versioning based on hg identify diff -r 5686936eefc5 -r bc64e11172f5 Makefile --- a/Makefile Sat Dec 29 11:30:38 2007 +0100 +++ b/Makefile Sat Dec 29 13:19:16 2007 +0100 @@ -24,9 +24,10 @@ # PLUGIN = premiereepg -### The version number of this plugin (taken from the main source file): +### The version number of this plugin: -VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g') +RELEASE := $(shell grep 'define PLUGIN_RELEASE' version.h | awk '{ print $$3 }' | sed -e 's/[";]//g') +VERSION := $(shell if test -d .hg; then echo -n '$(RELEASE)-'; (hg identify 2>/dev/null || echo -n Unknown) | sed -e 's/ .*//'; else echo -n '$(RELEASE)'; fi) ### The C++ compiler and options: @@ -42,11 +43,12 @@ ### Allow user defined options to overwrite defaults: -include $(VDRDIR)/Make.config +-include Make.config ### The version number of VDR (taken from VDR's "config.h"): -VDRVERSION = $(shell sed -ne '/define VDRVERSION/ s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h) -APIVERSION = $(shell sed -ne '/define APIVERSION/ s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h) +VDRVERSION := $(shell sed -ne '/define VDRVERSION/ s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h) +APIVERSION := $(shell sed -ne '/define APIVERSION/ s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h) ifeq ($(strip $(APIVERSION)),) APIVERSION = $(VDRVERSION) endif @@ -64,7 +66,7 @@ ### The object files (add further files here): -OBJS = $(PLUGIN).o +OBJS = $(PLUGIN).o version.o ifdef DBG CXXFLAGS += -g @@ -81,8 +83,9 @@ MAKEDEP = $(CXX) -MM -MG DEPFILE = .dependencies -$(DEPFILE): Makefile - @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ +DEPFILES = $(subst version.c,,$(OBJS:%.o=%.c) $(OBJS2:%.o=%.c)) +$(DEPFILE): Makefile $(DEPFILES) $(wildcard *.h) + @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(DEPFILES) > $@ -include $(DEPFILE) @@ -119,6 +122,13 @@ i18n: $(I18Nmsgs) +version.c: FORCE + @echo >$@.new "/* this file will be overwritten without warning */"; \ + echo >>$@.new 'const char *PluginVersion =' '"'$(VERSION)'";'; \ + diff $@.new $@ >$@.diff 2>&1; \ + if test -s $@.diff; then mv -f $@.new $@; fi; \ + rm -f $@.new $@.diff; + dist: clean @-rm -rf $(TMPDIR)/$(ARCHIVE) @mkdir $(TMPDIR)/$(ARCHIVE) @@ -129,4 +139,7 @@ clean: @-rm -f $(OBJS) $(DEPFILE) *.so *.tar.gz core* *~ - @-rm -f $(PODIR)/*.mo $(PODIR)/*.pot + @-rm -f version.c + @-rm -f $(PODIR)/*.mo + +FORCE: diff -r 5686936eefc5 -r bc64e11172f5 po/de_DE.po --- a/po/de_DE.po Sat Dec 29 11:30:38 2007 +0100 +++ b/po/de_DE.po Sat Dec 29 13:19:16 2007 +0100 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: VDR 1.5.9\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-08-27 17:31+0200\n" +"POT-Creation-Date: 2007-12-29 13:17+0100\n" "PO-Revision-Date: 2007-08-27 16:22+0200\n" "Last-Translator: Stefan Huelswitt \n" "Language-Team: \n" @@ -15,9 +15,6 @@ "Content-Type: text/plain; charset=ISO-8859-15\n" "Content-Transfer-Encoding: 8bit\n" -msgid "Parses extended Premiere EPG data" -msgstr "Liest erweiterte Premiere EPG Daten ein" - msgid "PremiereEPG" msgstr "PremiereEPG" @@ -56,3 +53,6 @@ msgid "years" msgstr "Jahre" + +msgid "Parses extended Premiere EPG data" +msgstr "Liest erweiterte Premiere EPG Daten ein" diff -r 5686936eefc5 -r bc64e11172f5 po/fr_FR.po --- a/po/fr_FR.po Sat Dec 29 11:30:38 2007 +0100 +++ b/po/fr_FR.po Sat Dec 29 13:19:16 2007 +0100 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: VDR 1.5.9\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-12-16 15:00+0200\n" +"POT-Creation-Date: 2007-12-29 13:17+0100\n" "PO-Revision-Date: 2007-12-16 15:00+0200\n" "Last-Translator: Patrice Staudt \n" "Language-Team: \n" @@ -15,9 +15,6 @@ "Content-Type: text/plain; charset=ISO-8859-15\n" "Content-Transfer-Encoding: 8bit\n" -msgid "Parses extended Premiere EPG data" -msgstr "Lis les informations EPG étandue de Premiere" - msgid "PremiereEPG" msgstr "PremiereEPG" @@ -56,3 +53,6 @@ msgid "years" msgstr "ans" + +msgid "Parses extended Premiere EPG data" +msgstr "Lis les informations EPG étandue de Premiere" diff -r 5686936eefc5 -r bc64e11172f5 premiereepg.c --- a/premiereepg.c Sat Dec 29 11:30:38 2007 +0100 +++ b/premiereepg.c Sat Dec 29 13:19:16 2007 +0100 @@ -32,6 +32,7 @@ #include #include #include +#include "version.h" #if APIVERSNUM < 10401 #error You need at least VDR API version 1.4.1 for this plugin @@ -57,9 +58,6 @@ #define PMT_SCAN_TIMEOUT 10 // seconds #define PMT_SCAN_IDLE 300 // seconds -static const char *VERSION = "0.0.8"; -static const char *DESCRIPTION = trNOOP("Parses extended Premiere EPG data"); - // --- cSetupPremiereEpg ------------------------------------------------------- const char *optPats[] = { @@ -740,6 +738,8 @@ // --- cPluginPremiereEpg ------------------------------------------------------ +static const char *DESCRIPTION = trNOOP("Parses extended Premiere EPG data"); + class cPluginPremiereEpg : public cPlugin { private: struct { @@ -748,7 +748,7 @@ } epg[MAXDVBDEVICES]; public: cPluginPremiereEpg(void); - virtual const char *Version(void) { return VERSION; } + virtual const char *Version(void) { return PluginVersion; } virtual const char *Description(void) { return tr(DESCRIPTION); } virtual bool Start(void); virtual void Stop(void); diff -r 5686936eefc5 -r bc64e11172f5 version.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/version.c Sat Dec 29 13:19:16 2007 +0100 @@ -0,0 +1,2 @@ +/* this file will be overwritten without warning */ +const char *PluginVersion = "0.0.8-5686936eefc5+"; diff -r 5686936eefc5 -r bc64e11172f5 version.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/version.h Sat Dec 29 13:19:16 2007 +0100 @@ -0,0 +1,33 @@ +/* + * PremiereEpg plugin to VDR (C++) + * + * (C) 2005-2007 Stefan Huelswitt + * + * This code is base on the commandline tool premiereepg2vdr + * (C) 2004-2005 by Axel Katzur software@katzur.de + * but has been rewritten from scratch + * + * This code is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This code is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Or, point your browser to http://www.gnu.org/copyleft/gpl.html + */ + +#ifndef ___VERSION_H +#define ___VERSION_H + +#define PLUGIN_RELEASE "0.0.8" + +extern const char *PluginVersion; + +#endif //___VERSION_H