Merge branch 'sh/master'
authorFlorian Forster <octo@huhu.verplant.org>
Wed, 22 Aug 2007 14:36:10 +0000 (16:36 +0200)
committerFlorian Forster <octo@huhu.verplant.org>
Wed, 22 Aug 2007 14:36:10 +0000 (16:36 +0200)
Conflicts:

configure.in

configure.in
contrib/README
version-gen.sh [new file with mode: 0755]

index 59f3dce..735ea74 100644 (file)
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-AC_INIT(collectd, 4.0.6)
+AC_INIT(collectd, m4_esyscmd(./version-gen.sh))
 AC_CONFIG_SRCDIR(src/collectd.c)
 AC_CONFIG_HEADERS(src/config.h)
 AM_INIT_AUTOMAKE(dist-bzip2)
index ab3c978..cb6df01 100644 (file)
@@ -24,8 +24,19 @@ several PNG files which are graphs of the RRD files found.
 
 collection.cgi
 --------------
-  Sample CGI script that creates graphs on the fly. The Perl module `RRDs' is
-needed (Debian package `librrds-perl').
+  Sample CGI script that creates graphs on the fly. The Perl modules `RRDs'
+(Debian package `librrds-perl'), `URI:Escape' (package liburi-perl),
+`HTML::Entities' (package libhtml-parser-perl) and a CGI capable web server
+(e.g. apache2 or boa) are needed. Simply install the script to a place where
+the webserver will treat it as a CGI script (/usr/lib/cgi-bin/ by default) and
+visit that page in a browser (http://localhost/cgi-bin/collection.cgi by
+default). Please refer to your webserver's documentation for more details.
+
+  Starting with version 4, collection.cgi requires a small config file, which
+should look something like this:
+
+  datadir: "/var/lib/collectd/rrd/"
+  libdir: "/usr/lib/collectd/"
 
 extractDS.px
 ------------
diff --git a/version-gen.sh b/version-gen.sh
new file mode 100755 (executable)
index 0000000..510a3a0
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+DEFAULT_VERSION="4.0.5.git"
+
+VERSION="$( git describe 2> /dev/null | sed -e 's/^collectd-//' )"
+
+if test -z "$VERSION"; then
+       VERSION="$DEFAULT_VERSION"
+fi
+
+VERSION=$( echo "$VERSION" | sed -e 's/-/./g' )
+
+echo -n $VERSION
+