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)
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
------------
--- /dev/null
+#!/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
+