summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobi Oetiker <tobi@oetiker.ch>2011-09-28 23:17:26 +0200
committerTobi Oetiker <tobi@oetiker.ch>2011-09-28 23:17:26 +0200
commit4b3cafae64c7c562cbec2231488f63d912f269ca (patch)
tree5d9a5e9415dbb1720a5ab6766d59317c771a556d
parent039861d743c2993959aca1a3e52045e8f6073d0a (diff)
downloadsmokeping-4b3cafae64c7c562cbec2231488f63d912f269ca.tar.gz
smokeping-4b3cafae64c7c562cbec2231488f63d912f269ca.tar.xz
added automake support
-rw-r--r--CHANGES6
-rw-r--r--Makefile.am29
-rw-r--r--bin/Makefile.am18
-rw-r--r--configure.ac81
-rw-r--r--doc/Makefile.am116
-rw-r--r--etc/Makefile.am21
-rw-r--r--htdocs/Makefile.am31
-rw-r--r--lib/Makefile.am35
8 files changed, 337 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index 34ec6e7..9301598 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,9 @@
+2011/09/28 -- released version 2.5.2
+
+* added automake support
+
+* fixed strftime to POSIX::strftime in Smokeping.pm -- reported by Joe Colin
+
2011/09/26 -- released version 2.5.1
* fixed version number in modules
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..86927a3
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,29 @@
+# Copyright (C) 2011 Tobias Oetiker
+#
+# This program 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 program 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.
+
+AUTOMAKE_OPTIONS = foreign
+
+SUBDIRS = bin doc etc htdocs lib
+
+EXTRA_DIST = setup/build-perl-modules.sh setup/sdbs.inc
+
+dist-hook:
+ svn info >DIST_REVISION
+ cp DIST_REVISION $(distdir)/
+
+# date >DIST_REVISION
+# git branch -vv >>DIST_REVISION
+
diff --git a/bin/Makefile.am b/bin/Makefile.am
new file mode 100644
index 0000000..81a47df
--- /dev/null
+++ b/bin/Makefile.am
@@ -0,0 +1,18 @@
+# Copyright (C) 2011 Tobias Oetiker
+#
+# This program 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 program 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.
+
+
+dist_bin_SCRIPTS = smokeinfo smokeping smokeping_cgi tSmoke
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..888da27
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,81 @@
+# Copyright (C) 2011 Tobi Oetiker
+#
+# This program 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 program 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.
+
+#
+
+
+AC_INIT([smokeping],[2.5.2],[tobi@oetiker.ch])
+AC_PREREQ([2.59])
+AC_CONFIG_AUX_DIR(conftools)
+AC_CANONICAL_HOST
+AM_INIT_AUTOMAKE(1.9)
+AM_MAINTAINER_MODE
+
+AC_PREFIX_DEFAULT( /opt/smokeping-$PACKAGE_VERSION )
+
+AC_PATH_PROG(PERL, perl, no)
+AC_PATH_PROG(SED, sed, no)
+AC_PATH_PROG(GREP, grep, no)
+AC_PATH_PROG(ECHO, echo, no)
+AC_PATH_PROG(LN, ln, no)
+AC_PATH_PROG(CP, cp, no)
+AC_PATH_PROG(RM, rm, no)
+AC_PATH_PROG(RMDIR, rmdir, no)
+AC_PATH_PROG(MKDIR, mkdir, no)
+AC_PATH_PROG(FIND, find, no)
+
+
+AC_ARG_ENABLE(pkgonly,
+ [AC_HELP_STRING([--enable-pkgonly],
+ [Skip all checking])])
+AC_SUBST(enable_pkgonly)
+
+
+PERLLIBDIRS=
+
+PERLOPTS=
+AC_ARG_WITH(perl-inc,[ --with-perl-inc=[DIRS] Additional space-separated Perl library paths], [PERLINC=$withval])
+AC_ARG_VAR(PERLINC, [[] Additional space-separated Perl library paths])
+if test ! -z "$PERLINC"; then
+ for d in $PERLINC; do
+ PERLOPTS="${PERLOPTS} -I${d}"
+ perllibdirs=${perllibdirs}"\,\'"${d}"\'"
+ done
+fi
+AC_SUBST(PERLOPTS)
+
+AC_SUBST(PERLLIBDIRS, [${perllibdirs}])
+
+
+# Check the necessary Perl modules
+
+if test "$enable_pkgonly" != yes; then
+ for module in RRDs FCGI CGI CGI::Fast Config::Grammar Digest::HMAC_MD5; do
+ AC_MSG_CHECKING([presence of $module])
+ if ${PERL} ${PERLOPTS} -e 'use '$module; then
+ AC_MSG_RESULT([Ok])
+ else
+ AC_MSG_ERROR([Perl cannot find $module ($PERLOPTS)]);
+ fi
+ done
+fi
+
+
+AC_CONFIG_FILES([Makefile bin/Makefile doc/Makefile htdocs/Makefile etc/Makefile lib/Makefile])
+
+AC_SUBST(VERSION)
+
+AC_OUTPUT
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 0000000..38a9543
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,116 @@
+# Copyright (C) 2011 Tobias Oetiker
+#
+# This program 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 program 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.
+
+
+AUTOMAKE_OPTIONS = foreign
+
+# section 7
+
+DOCS = smokeping_extend.pod smokeping_install.pod smokeping_master_slave.pod smokeping_upgrade.pod
+
+# section 5
+DOCSCONFIG = smokeping_config.pod smokeping_examples.pod
+
+#PM := ../lib/Smokeping.pm ../lib/Smokeping/Examples.pm ../lib/Smokeping/RRDtools.pm
+
+EXTRA_DIST = $(DOCS)
+
+PODPROBE := $(wildcard ../lib/Smokeping/probes/*.pm)
+PODMATCH := $(wildcard ../lib/Smokeping/matchers/*.pm)
+PODSORT := $(wildcard ../lib/Smokeping/sorters/*.pm)
+
+DOCSBASE = $(subst .pod,,$(DOCS))
+
+MODBASE = $(subst .pm,,$(subst ../lib/Smokeping/probes/,Smokeping_probes_,$(PODPROBE))) \
+ $(subst .pm,,$(subst ../lib/Smokeping/matchers/,Smokeping_matchers_,$(PODMATCH))) \
+ $(subst .pm,,$(subst ../lib/Smokeping/sorters/,Smokeping_sorters_,$(PODSORT)))
+
+PROGBASE = smokeping smokeping_cgi tSmoke
+
+DOCSCONFIGBASE = smokeping_config
+
+MAN3 = $(addsuffix .3,$(MODBASE))
+MAN5 = $(addsuffix .5,$(DOCSCONFIGBASE))
+MAN7 = $(addsuffix .7,$(DOCSBASE))
+MAN1 = $(addsuffix .1,$(PROGBASE))
+
+POD2MAN = pod2man --release=$(VERSION) --center=SmokePing $<
+
+# we go to this trouble to ensure that MAKEPOD only uses modules in the installation directory
+MAKEPOD= $(PERL) $(PERLOPTS) -I../lib -mSmokeping -e 'Smokeping::main()' -- --makepod
+GENEX= $(PERL) $(PERLOPTS) -I../lib -mSmokeping -e 'Smokeping::main()' -- --gen-examples
+
+%.7: %.pod
+ $(POD2MAN) --section 7 > $@
+%.5: %.pod
+ $(POD2MAN) --section 5 > $@
+
+Smokeping.3: ../lib/Smokeping.pm
+ $(POD2MAN) --section 3 > $@
+
+Smokeping_Examples.3: ../lib/Smokeping/Examples.pm
+ $(POD2MAN) --section 3 > $@
+
+Smokeping_RRDtools.3: ../lib/Smokeping/RRDtools.pm
+ $(POD2MAN) --section 3 > $@
+
+Smokeping_probes_%.pod: ../lib/Smokeping/probes/%.pm
+ $(MAKEPOD) Smokeping::probes::$* > $@
+
+Smokeping_probes_%.3: Smokeping_probes_%.pod
+ $(POD2MAN) --section 3 > $@
+
+Smokeping_matchers_%.3: ../lib/Smokeping/matchers/%.pm
+ $(POD2MAN) --section 3 > $@
+
+Smokeping_sorters_%.3: ../lib/Smokeping/sorters/%.pm
+ $(POD2MAN) --section 3 > $@
+
+smokeping.1: ../bin/smokeping
+ $(POD2MAN) --section 1 > $@
+
+smokeping_cgi.1: ../bin/smokeping_cgi
+ $(POD2MAN) --section 1 > $@
+
+tSmoke.1: ../bin/tSmoke
+ $(POD2MAN) --section 1 > $@
+
+smokeping_config.pod: ../lib/Smokeping.pm
+ $(MAKEPOD) > $@
+
+smokeping_examples.pod: ../lib/Smokeping/Examples.pm ../etc/config.dist
+ $(MKDIR) -p examples
+ $(GENEX)
+
+clean-local:
+ -$(RM) -r *.[1357] smokeping_examples.pod smokeping_config.pod examples
+
+iman1dir = $(DESTDIR)$(mandir)/man1
+iman1_DATA = $(MAN1)
+
+iman3dir = $(DESTDIR)$(mandir)/man3
+iman3_DATA = $(MAN3)
+
+iman5dir = $(DESTDIR)$(mandir)/man5
+iman5_DATA = $(MAN5)
+
+iman7dir = $(DESTDIR)$(mandir)/man7
+iman7_DATA = $(MAN7)
+
+EXAMPLES := $(wildcard examples/config.*)
+
+etcdir = $(DESTDIR)$(sysconfdir)/examples
+etc_DATA = $(EXAMPLES)
diff --git a/etc/Makefile.am b/etc/Makefile.am
new file mode 100644
index 0000000..c38d88a
--- /dev/null
+++ b/etc/Makefile.am
@@ -0,0 +1,21 @@
+# Copyright (C) 2011 Tobias Oetiker
+#
+# This program 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 program 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.
+
+
+EXTRA_DIST = basepage.html.dist config.dist smokemail.dist smokeping_secrets.dist tmail.dist
+
+etcdir = $(DESTDIR)$(sysconfdir)
+etc_DATA = $(EXTRA_DIST)
diff --git a/htdocs/Makefile.am b/htdocs/Makefile.am
new file mode 100644
index 0000000..b402eec
--- /dev/null
+++ b/htdocs/Makefile.am
@@ -0,0 +1,31 @@
+# Copyright (C) 2010 Stanislav Sinyagin
+# Copyright (C) 2011 Tobias Oetiker
+#
+# This program 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 program 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.
+
+JS = cropper/smokeping-zoom.js cropper/lib/unittest.js cropper/lib/slider.js cropper/lib/controls.js \
+ cropper/lib/sound.js cropper/lib/dragdrop.js \
+ cropper/lib/prototype.js cropper/lib/effects.js \
+ cropper/lib/builder.js cropper/lib/scriptaculous.js \
+ cropper/cropper.uncompressed.js cropper/cropper.js
+
+CGI = smokeping.fcgi.dist smokeping.cgi.dist
+
+EXTRA_DIST = $(JS) $(CGI)
+
+jsdir = $(DESTDIR)$(prefix)/htdocs
+nobase_js_DATA = $(JS)
+js_SCRIPTS = $(CGI)
+
diff --git a/lib/Makefile.am b/lib/Makefile.am
new file mode 100644
index 0000000..666252d
--- /dev/null
+++ b/lib/Makefile.am
@@ -0,0 +1,35 @@
+# Copyright (C) 2010 Stanislav Sinyagin
+# Copyright (C) 2011 Tobias Oetiker
+#
+# This program 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 program 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.
+
+#
+AUTOMAKE_OPTIONS = foreign
+
+
+PM := $(wildcard *.pm)
+
+SP := $(wildcard Smokeping/*.pm)
+
+SORT := $(wildcard Smokeping/sorters/*.pm)
+
+PROBE := $(wildcard Smokeping/probes/*.pm)
+
+MATCH := $(wildcard Smokeping/matchers/*.pm)
+
+EXTRA_DIST = $(PM) $(SP) $(SORT) $(PROBE) $(MATCH)
+
+perllibdir = $(DESTDIR)$(prefix)/lib
+nobase_perllib_DATA = $(EXTRA_DIST)