-*.mo
-*.png
+/Makefile
+/build-aux
+/man/*.[0-9]
+/man/*.html
+/missing
+/src/systemd/collecty.service
+/tmp
*.py[co]
-*.tar.gz
+/*.tar.bz2
+/*.tar.gz
+/*.tar.xz
+*.log
+*.cache
+*.gmo
+*.mo
+*~
+Makefile.in
+aclocal.m4
+config.log
+config.status
+configure
+install-sh
+intltool-extract.in
+intltool-merge.in
+intltool-update.in
+stamp-*
+++ /dev/null
-###############################################################################
-# #
-# collecty - A system statistics collection daemon for IPFire #
-# Copyright (C) 2012 IPFire development team #
-# #
-# 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 3 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, see <http://www.gnu.org/licenses/>. #
-# #
-###############################################################################
-
-PACKAGE_NAME = collecty
-PACKAGE_VERSION = 0.0.2
-
-DESTDIR =
-PREFIX = /usr
-BINDIR = $(PREFIX)/bin
-SBINDIR = $(PREFIX)/sbin
-LOCALEDIR = $(PREFIX)/share/locale
-UNITDIR = $(PREFIX)/lib/systemd/system
-
-PYTHON_VER := $(shell python -c "import platform; print '.'.join(platform.python_version_tuple()[:2])")
-PYTHON_DIR = $(DESTDIR)/usr/lib/python$(PYTHON_VER)/site-packages/
-
-###
-# Translation stuff
-###
-# A list of all files that need translation
-TRANSLATION_FILES = $(shell find collecty -type f -name "*.py") collectyd
-
-POT_FILE = po/$(PACKAGE_NAME).pot
-PO_FILES = $(wildcard po/*.po)
-MO_FILES = $(patsubst %.po,%.mo,$(PO_FILES))
-
-.PHONY: all
-all: $(MO_FILES)
-
-.PHONY: pot
-pot: $(POT_FILE)
-
-.PHONY: dist
-dist:
- git archive --format=tar --prefix=$(NAME)-$(VERSION)/ HEAD | gzip -9 \
- > $(NAME)-$(VERSION).tar.gz
-
-.PHONY: install
-install: $(MO_FILES)
- -mkdir -pv $(PYTHON_DIR)
- cp -rvf collecty $(PYTHON_DIR)
-
- -mkdir -pv $(DESTDIR)$(SBINDIR)
- install -v -m 755 collectyd $(DESTDIR)$(SBINDIR)
-
- # Install configuration
- -mkdir -pv $(DESTDIR)/etc/$(PACKAGE_NAME)
- cp -vf example.conf $(DESTDIR)/etc/$(PACKAGE_NAME)/$(PACKAGE_NAME).conf
-
- # Install translation files.
- -mkdir -pv $(DESTDIR)$(LOCALEDIR)
- for file in $(MO_FILES); do \
- lang=$$(basename $${file/.mo/}); \
- mkdir -pv $(DESTDIR)$(LOCALEDIR)/$${lang}/LC_MESSAGES; \
- install -v -m 644 $${file} \
- $(DESTDIR)$(LOCALEDIR)/$${lang}/LC_MESSAGES/$(PACKAGE_NAME).mo; \
- done
-
- # Install systemd unit files.
- mkdir -pv $(DESTDIR)$(UNITDIR)
- install -m 644 -v collecty.service $(DESTDIR)$(UNITDIR)
-
-# Cleanup temporary files.
-.PHONY: clean
-clean:
- rm -f $(MO_FILES)
-
-# Translation stuff.
-$(POT_FILE): $(TRANSLATION_FILES) Makefile
- xgettext --language python -d $(PACKAGE_NAME) -k_ -kN_ \
- -o $@ --add-comments --from-code=UTF-8 $(sort $^)
-
-# Compile gettext dictionaries from translation files.
-%.mo: %.po
- msgfmt -o $@ $<
--- /dev/null
+###############################################################################
+# #
+# collecty - The IPFire statictics collection daemon #
+# Copyright (C) 2015 collecty development team #
+# #
+# 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 3 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, see <http://www.gnu.org/licenses/>. #
+# #
+###############################################################################
+
+ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
+AM_MAKEFLAGS = --no-print-directory
+AUTOMAKE_OPTIONS = color-tests
+
+# remove target it the command fails
+.DELETE_ON_ERROR:
+
+# keep itermediate files
+.SECONDARY:
+
+SUBDIRS = . po
+
+pythondir = $(pyexecdir)
+
+CLEANFILES =
+DISTCLEANFILES =
+EXTRA_DIST =
+INSTALL_DIRS =
+noinst_DATA =
+
+@INTLTOOL_POLICY_RULE@
+
+.PHONY: update-po
+update-po:
+ $(MAKE) -C po update-po
+
+DISTCHECK_CONFIGURE_FLAGS = \
+ --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
+
+# ------------------------------------------------------------------------------
+
+AM_V_XSLT = $(AM_V_XSLT_$(V))
+AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
+AM_V_XSLT_0 = @echo " XSLT " $@;
+
+# ------------------------------------------------------------------------------
+
+dist_doc_DATA = \
+ COPYING
+
+# ------------------------------------------------------------------------------
+
+dist_bin_SCRIPTS = \
+ src/collectyd \
+ src/collecty-client
+
+collecty_PYTHON = \
+ src/collecty/__init__.py \
+ src/collecty/client.py \
+ src/collecty/constants.py \
+ src/collecty/daemon.py \
+ src/collecty/errors.py \
+ src/collecty/i18n.py \
+ src/collecty/ping.py
+
+collectydir = $(pythondir)/collecty
+
+collectyplugins_PYTHON = \
+ src/collecty/plugins/base.py \
+ src/collecty/plugins/cpu.py \
+ src/collecty/plugins/entropy.py \
+ src/collecty/plugins/__init__.py \
+ src/collecty/plugins/interface.py \
+ src/collecty/plugins/latency.py \
+ src/collecty/plugins/loadavg.py \
+ src/collecty/plugins/memory.py
+
+collectypluginsdir = $(collectydir)/plugins
+
+# ------------------------------------------------------------------------------
+
+if ENABLE_MANPAGES
+MANPAGES = \
+ man/collectyd.1
+
+MANPAGES_XML = $(patsubst %.1,%.xml,$(patsubst %.5,%.xml,$(MANPAGES)))
+MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML))
+
+man: $(MANPAGES) $(MANPAGES_HTML)
+
+man_MANS = \
+ $(MANPAGES)
+
+noinst_DATA += \
+ $(MANPAGES_HTML)
+
+CLEANFILES += \
+ $(man_MANS) \
+ $(MANPAGES_HTML)
+
+EXTRA_DIST += \
+ $(MANPAGES_XML) \
+ man/custom-html.xsl
+
+XSLTPROC_FLAGS = \
+ --nonet \
+ --stringparam man.output.quietly 1 \
+ --stringparam funcsynopsis.style ansi \
+ --stringparam man.th.extra1.suppress 1 \
+ --stringparam man.authors.section.enabled 1 \
+ --stringparam man.copyright.section.enabled 1
+
+XSLTPROC_COMMAND_MAN = \
+ $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
+ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
+
+XSLTPROC_COMMAND_HTML = \
+ $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
+
+man/%.1: man/%.xml
+ $(XSLTPROC_COMMAND_MAN)
+
+man/%.5: man/%.xml
+ $(XSLTPROC_COMMAND_MAN)
+
+man/%.html: man/%.xml man/custom-html.xsl
+ $(XSLTPROC_COMMAND_HTML)
+
+endif
+
+# ------------------------------------------------------------------------------
+
+if HAVE_SYSTEMD
+systemdsystemunit_DATA = \
+ src/systemd/collecty.service
+
+CLEANFILES += \
+ $(systemdsystemunit_DATA)
+
+INSTALL_DIRS += \
+ $(systemdsystemunitdir)
+endif
+
+EXTRA_DIST += \
+ src/systemd/collecty.service.in
+
+# ------------------------------------------------------------------------------
+
+substitutions = \
+ '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
+ '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
+ '|configsdir=$(configsdir)|' \
+ '|bindir=$(bindir)|'
+
+SED_PROCESS = \
+ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
+ $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
+ < $< > $@
+
+src/systemd/%: src/systemd/%.in Makefile
+ $(SED_PROCESS)
--- /dev/null
+#!/bin/sh
+
+intltoolize --force --automake
+autoreconf --force --install --symlink
--- /dev/null
+###############################################################################
+# #
+# collecty - The IPFire statictics collection daemon #
+# Copyright (C) 2015 collecty development team #
+# #
+# 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 3 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, see <http://www.gnu.org/licenses/>. #
+# #
+###############################################################################
+
+AC_PREREQ([2.64])
+
+AC_INIT([collecty],
+ [001],
+ [info@ipfire.org],
+ [collecty],
+ [http://git.ipfire.org/?p=oddments/collecty.git;a=summary])
+
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_AUX_DIR([build-aux])
+
+AC_PREFIX_DEFAULT([/usr])
+
+AM_INIT_AUTOMAKE([
+ foreign
+ 1.11
+ -Wall
+ -Wno-portability
+ silent-rules
+ tar-pax
+ subdir-objects
+])
+AM_SILENT_RULES([yes])
+
+IT_PROG_INTLTOOL([0.40.0])
+
+GETTEXT_PACKAGE=collecty
+AC_SUBST(GETTEXT_PACKAGE)
+
+AC_PROG_LN_S
+AC_PROG_MKDIR_P
+AC_PROG_SED
+
+AC_PATH_PROG([XSLTPROC], [xsltproc])
+
+# Python
+AM_PATH_PYTHON([2.7])
+
+save_LIBS="$LIBS"
+
+# pkg-config
+PKG_PROG_PKG_CONFIG
+# This makes sure pkg.m4 is available.
+m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
+
+# ------------------------------------------------------------------------------
+have_manpages=no
+AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-man-pages],
+ [do not install man pages]))
+AS_IF([test "x$enable_manpages" != xno], [have_manpages=yes])
+AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"])
+
+# ------------------------------------------------------------------------------
+
+AC_ARG_WITH([systemd],
+ AS_HELP_STRING([--with-systemd], [Enable systemd support.])
+)
+
+AS_IF([test "x$with_systemd" != "xno"],
+ [PKG_CHECK_MODULES(systemd, [libsystemd-daemon],
+ [have_systemd=yes], [have_systemd=no])],
+ [have_systemd=no]
+)
+
+AS_IF([test "x$have_systemd" = "xyes"],
+ [AC_MSG_CHECKING([for systemd system unit directory])
+ AC_ARG_WITH([systemdsystemunitdir],
+ AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
+ [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]
+ )
+
+ AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
+
+ if test -n "$systemdsystemunitdir" -a "x$systemdsystemunitdir" != xno; then
+ AC_MSG_RESULT([$systemdsystemunitdir])
+ else
+ AC_MSG_ERROR([not found (try --with-systemdsystemunitdir)])
+ fi
+ ],
+ [AS_IF([test "x$with_systemd" = "xyes"],
+ [AC_MSG_ERROR([Systemd support is enabled but no systemd has been found.])
+ ])
+])
+
+AM_CONDITIONAL(HAVE_SYSTEMD, [test "x$have_systemd" = "xyes"])
+
+# ------------------------------------------------------------------------------
+
+AC_CONFIG_FILES([
+ Makefile
+ po/Makefile.in
+])
+
+AC_OUTPUT
+AC_MSG_RESULT([
+ ${PACKAGE_NAME} ${VERSION}
+
+ prefix: ${prefix}
+
+ Systemd support ${have_systemd}
+ Generate man-pages: ${have_manpages}
+])
--- /dev/null
+intltool.m4
+libtool.m4
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
+lt~obsolete.m4
--- /dev/null
+<?xml version="1.0"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS/DTD DocBook XML V4.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+
+<refentry id="collectyd">
+ <refentryinfo>
+ <title>collectyd</title>
+ <productname>collectyd</productname>
+
+ <authorgroup>
+ <author>
+ <contrib>Developer</contrib>
+ <firstname>Michael</firstname>
+ <surname>Tremer</surname>
+ <email>michael.tremer@ipfire.org</email>
+ </author>
+ </authorgroup>
+ </refentryinfo>
+
+ <refmeta>
+ <refentrytitle>collectyd</refentrytitle>
+ <manvolnum>1</manvolnum>
+ </refmeta>
+
+ <refnamediv>
+ <refname>collectyd</refname>
+ <refpurpose>Statistics collection daemon</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>collectyd</command>
+ <arg choice="opt" rep="repeat">OPTIONS</arg>
+ <arg choice="plain">COMMAND</arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ <command>collectyd</command> is a simple and extensible
+ framework for collecting system statistics of IPFire systems.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Options</title>
+
+ <para>
+ The following options are understood:
+ </para>
+
+ <variablelist>
+ <varlistentry>
+ <term>
+ <option>-d</option>
+ </term>
+ <term>
+ <option>--debug</option>
+ </term>
+
+ <listitem>
+ <para>
+ Enables the debugging output.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <option>-h</option>
+ </term>
+ <term>
+ <option>--help</option>
+ </term>
+
+ <listitem>
+ <para>
+ Shows the help message provided by the program and exit.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+
+ <refsect1>
+ <title>Exit Codes</title>
+
+ <para>
+ <command>collectyd</command> will normally exit with code 0.
+ If there has been a problem and the daemon cannot recover from that
+ it will exit with an exit code unequal to zero.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Bugs</title>
+
+ <para>
+ Please report all bugs to the official bugtracker at
+ http://bugs.ipfire.org/.
+ </para>
+ </refsect1>
+</refentry>
--- /dev/null
+<?xml version='1.0'?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"/>
+
+<!-- translate man page references to links to html pages -->
+<xsl:template match="citerefentry">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="refentrytitle"/><xsl:text>.html</xsl:text>
+ </xsl:attribute>
+ <xsl:call-template name="inline.charseq"/>
+ </a>
+</xsl:template>
+
+<!-- add Index link at top of page -->
+<xsl:template name="user.header.content">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:text>index.html</xsl:text>
+ </xsl:attribute>
+ <xsl:text>Index</xsl:text>
+ </a>
+ <hr/>
+</xsl:template>
+
+<!-- Switch things to UTF-8, ISO-8859-1 is soo yesteryear -->
+<xsl:output method="html" encoding="UTF-8" indent="no"/>
+
+</xsl:stylesheet>
--- /dev/null
+POTFILES
+Makefile.in.in
+.intltool-merge-cache
+Makefile
--- /dev/null
+src/collecty/client.py
+src/collecty/constants.py
+src/collecty/daemon.py
+src/collecty/errors.py
+src/collecty/i18n.py
+src/collecty/__init__.py
+src/collecty/ping.py
+src/collecty/plugins/base.py
+src/collecty/plugins/cpu.py
+src/collecty/plugins/entropy.py
+src/collecty/plugins/__init__.py
+src/collecty/plugins/interface.py
+src/collecty/plugins/latency.py
+src/collecty/plugins/loadavg.py
+src/collecty/plugins/memory.py
Description=collecty - A system data collecting daemon
[Service]
-ExecStart=/usr/sbin/collectyd
+ExecStart=@bindir@/collectyd
ExecReload=/bin/kill -HUP $MAINPID
[Install]