summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeine_Ahnung <dirk-vdr@gmx.de>2013-02-27 16:54:53 +0100
committerKeine_Ahnung <dirk-vdr@gmx.de>2013-02-27 16:54:53 +0100
commitb557752369a35ddf6cd8b8f06f19636aa2feb730 (patch)
tree709b29f3b3123b2bb368ef44c780dcbdc9a4866e
parent593168e7418e0eccfa597a893c9f8d73b0db8ce0 (diff)
downloadvdr-plugin-uactivity-b557752369a35ddf6cd8b8f06f19636aa2feb730.tar.gz
vdr-plugin-uactivity-b557752369a35ddf6cd8b8f06f19636aa2feb730.tar.bz2
new versionsnumer system for git checkouts
-rw-r--r--Makefile.1.67
-rw-r--r--Makefile.1.7.x7
-rw-r--r--[-rwxr-xr-x]script/vdr-uactivity0
-rw-r--r--uactivity.c2
-rw-r--r--version1
5 files changed, 12 insertions, 5 deletions
diff --git a/Makefile.1.6 b/Makefile.1.6
index fcd7593..af6c6cc 100644
--- a/Makefile.1.6
+++ b/Makefile.1.6
@@ -13,7 +13,10 @@ PLUGIN = uactivity
### The version number of this plugin (taken from the main source file):
-VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g')
+VERSION = $(shell [ -d .git ] && git describe --tags --dirty| sed 's/^v//' || cat version)
+ifeq ($(strip $(VERSION)),)
+ $(error VERSION is undefined)
+endif
### The C++ compiler and options:
@@ -55,7 +58,7 @@ PACKAGE = vdr-$(ARCHIVE)
INCLUDES += -I$(VDRDIR)/include
-DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' -DUACTIVITY_COMMAND='"$(PLUGIN_UACTIVITY_COMMAND)"'
+DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' -DUACTIVITY_COMMAND='"$(PLUGIN_UACTIVITY_COMMAND)"' -DPLUGIN_VERSION='"$(VERSION)"'
### The object files (add further files here):
diff --git a/Makefile.1.7.x b/Makefile.1.7.x
index 6c2c777..b22528e 100644
--- a/Makefile.1.7.x
+++ b/Makefile.1.7.x
@@ -11,7 +11,10 @@ PLUGIN = uactivity
### The version number of this plugin (taken from the main source file):
-VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g')
+VERSION = $(shell [ -d .git ] && git describe --tags --dirty| sed 's/^v//' || cat version)
+ifeq ($(strip $(VERSION)),)
+ $(error VERSION is undefined)
+endif
### The directory environment:
@@ -61,7 +64,7 @@ SOFILE = libvdr-$(PLUGIN).so
INCLUDES +=
-DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' -DUACTIVITY_COMMAND='"$(PLUGIN_UACTIVITY_COMMAND)"'
+DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' -DUACTIVITY_COMMAND='"$(PLUGIN_UACTIVITY_COMMAND)"' -DPLUGIN_VERSION='"$(VERSION)"'
### The object files (add further files here):
diff --git a/script/vdr-uactivity b/script/vdr-uactivity
index c758939..c758939 100755..100644
--- a/script/vdr-uactivity
+++ b/script/vdr-uactivity
diff --git a/uactivity.c b/uactivity.c
index f5f5cf9..5e9516e 100644
--- a/uactivity.c
+++ b/uactivity.c
@@ -17,7 +17,7 @@
#define STRINGIFY(x) STRINGIFYX(x)
#define WATCHDOG 0
-static const char *VERSION = "0.0.1pre";
+static const char *VERSION = PLUGIN_VERSION;
static const char *DESCRIPTION = trNOOP("running shellscipts based upton user aktivity changes");
class cPluginUactivity : public cPlugin {
diff --git a/version b/version
new file mode 100644
index 0000000..670ae3e
--- /dev/null
+++ b/version
@@ -0,0 +1 @@
+0.0.1-git \ No newline at end of file