From caebe508c74eb096ae6d8574d0c075bc62ada09b Mon Sep 17 00:00:00 2001 From: Sven Velt Date: Mon, 5 Dec 2016 16:30:31 +0100 Subject: [PATCH] First try for Debian packaging --- .gitignore | 5 +++++ debian/changelog | 5 +++++ debian/compat | 1 + debian/control | 25 +++++++++++++++++++++++++ debian/copyright | 30 ++++++++++++++++++++++++++++++ debian/dirs | 5 +++++ debian/docs | 0 debian/rules | 31 +++++++++++++++++++++++++++++++ debian/source/format | 1 + 9 files changed, 103 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/dirs create mode 100644 debian/docs create mode 100755 debian/rules create mode 100644 debian/source/format diff --git a/.gitignore b/.gitignore index 75ec6e7..bc53efb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,8 @@ *.pyc .*.swp +debian/files +debian/*.log +debian/*.substvars +debian/mymonplugins + diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..f1f046b --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +mymonplugins (0.9~rc2-1) unstable; urgency=low + + * Initial release + + -- Sven Velt Sat, 03 Dec 2016 14:25:44 +0100 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..658d9b7 --- /dev/null +++ b/debian/control @@ -0,0 +1,25 @@ +Source: mymonplugins +Section: net +Priority: extra +Maintainer: Sven Velt +Build-Depends: debhelper (>= 8.0.0) +Standards-Version: 3.9.3 +Homepage: https://gogs.velt.biz/velt.biz/MyMonPlugins/wiki +Vcs-Git: https://gogs.velt.biz/velt.biz/MyMonPlugins.git +Vcs-Browser: https://gogs.velt.biz/velt.biz/MyMonPlugins + +Package: mymonplugins +Architecture: all +Depends: ${misc:Depends}, python, python2.7 +Description: "My Monitoring Plugins" collection (former "teamix Monitoring-Plugins") + Plugins which were written by Sven Velt: + - check_apaches.py + - check_collectd.py + - check_cups.py + - check_iface-dns.py + - check_livestatus_latency.py + - check_naf.py + - check_nagiostats.py + - check_netconnections.py + - check_sensors.py + - check_zypper.sh diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..98f130b --- /dev/null +++ b/debian/copyright @@ -0,0 +1,30 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: MyMonPlugins +Source: https://gogs.velt.biz/velt.biz/MyMonPlugins/wiki + +Files: * +Copyright: 2015- Sven Velt + 2010-2015 by Sven Velt and team(ix) GmbH, Nuernberg, Germany +License: GPL-2.0+ + +Files: debian/* +Copyright: 2016 Sven Velt +License: GPL-2.0+ + +License: GPL-2.0+ + This package 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 package 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 + . + On Debian systems, the complete text of the GNU General + Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". + diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 0000000..f483ecf --- /dev/null +++ b/debian/dirs @@ -0,0 +1,5 @@ +usr/lib/nagios/plugins +usr/share/mymonplugins +etc/pnp4nagios/templates.d +etc/pnp4nagios/check_commands + diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..e69de29 diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..7fab13e --- /dev/null +++ b/debian/rules @@ -0,0 +1,31 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +export DH_VERBOSE=1 +export DH_OPTIONS + + +%: + dh $@ + + +override_dh_install: + cp -a $(CURDIR)/monitoringplugin.py $(CURDIR)/debian/mymonplugins/usr/lib/nagios/plugins/ + + cp -a $(CURDIR)/check_apaches.py $(CURDIR)/debian/mymonplugins/usr/lib/nagios/plugins/ + cp -a $(CURDIR)/check_collectd.py $(CURDIR)/debian/mymonplugins/usr/lib/nagios/plugins/ + cp -a $(CURDIR)/check_cups.py $(CURDIR)/debian/mymonplugins/usr/lib/nagios/plugins/ + cp -a $(CURDIR)/check_iface-dns.py $(CURDIR)/debian/mymonplugins/usr/lib/nagios/plugins/ + cp -a $(CURDIR)/check_livestatus_latency.py $(CURDIR)/debian/mymonplugins/usr/lib/nagios/plugins/ + cp -a $(CURDIR)/check_naf.py $(CURDIR)/debian/mymonplugins/usr/lib/nagios/plugins/ + cp -a $(CURDIR)/check_nagiostats.py $(CURDIR)/debian/mymonplugins/usr/lib/nagios/plugins/ + cp -a $(CURDIR)/check_netconnections.py $(CURDIR)/debian/mymonplugins/usr/lib/nagios/plugins/ + cp -a $(CURDIR)/check_sensors.py $(CURDIR)/debian/mymonplugins/usr/lib/nagios/plugins/ + cp -a $(CURDIR)/check_zypper.sh $(CURDIR)/debian/mymonplugins/usr/lib/nagios/plugins/ + + cp -a $(CURDIR)/commands.cfg $(CURDIR)/debian/mymonplugins/usr/share/mymonplugins/ + cp -a $(CURDIR)/PNP $(CURDIR)/debian/mymonplugins/usr/share/mymonplugins/ + + ln -s /usr/share/mymonplugins/PNP/templates $(CURDIR)/debian/mymonplugins/etc/pnp4nagios/templates.d/mymonplugins + ln -s /usr/share/mymonplugins/PNP/check_commands/check_naf.cfg $(CURDIR)/debian/mymonplugins/etc/pnp4nagios/check_commands/ + diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt)