From a7df28415a4645293835c79d15201539376be11d Mon Sep 17 00:00:00 2001 From: Mark Schouten Date: Mon, 17 Aug 2015 15:12:12 +0200 Subject: [PATCH] Add files to create a Debian-package --- Makefile | 13 +++++++++++++ debian/changelog | 5 +++++ debian/compat | 1 + debian/control | 13 +++++++++++++ debian/postinst | 37 +++++++++++++++++++++++++++++++++++++ debian/rules | 7 +++++++ 6 files changed, 76 insertions(+) create mode 100644 Makefile create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/postinst create mode 100755 debian/rules diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..39ff98b --- /dev/null +++ b/Makefile @@ -0,0 +1,13 @@ +PREFIX=${CURDIR}/debian/librenms-agent + +install: + mkdir -p $(PREFIX)/usr/lib/check_mk_agent/plugins + mkdir -p $(PREFIX)/usr/lib/check_mk_agent/local + cp -r agent-local/* $(PREFIX)/usr/lib/check_mk_agent/plugins/ + mkdir -p $(PREFIX)/usr/bin + install -m 0750 check_mk_agent $(PREFIX)/usr/bin/check_mk_agent + mkdir -p $(PREFIX)/etc/xinet.d + install -m 0644 check_mk_xinetd $(PREFIX)/etc/xinet.d/check_mk + +clean: + rm -rf $(CURDIR)/build diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..edfd4b7 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +librenms-agent (1.0) stable; urgency=low + + - Initial package release + + -- Mark Schouten Mon, 17 Aug 2015 15:00:00 +0200 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +7 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..69e20f8 --- /dev/null +++ b/debian/control @@ -0,0 +1,13 @@ +Source: librenms-agent +Section: misc +Priority: extra +Maintainer: Mark Schouten +Build-Depends: debhelper (>= 5) +Standards-Version: 3.9.1 + +Package: librenms-agent +Architecture: all +Pre-Depends: xinetd +Suggests: php-cli, php-mysql, libwww-perl, curl, dmidecode, netcat, ipmitool, lm-sensors, python-memcache, python-urllib3, rrdtool, libdbd-pg-perl +Description: Install the LibreNMS Unix Agent + Install the LibreNMS Unix Agent. Please note that the suggested packages are required for some of the plugins diff --git a/debian/postinst b/debian/postinst new file mode 100644 index 0000000..9c3782c --- /dev/null +++ b/debian/postinst @@ -0,0 +1,37 @@ +#!/bin/sh +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package +# + +case "$1" in + configure) + [ -x /usr/sbin/service ] && service xinetd restart + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..edfc650 --- /dev/null +++ b/debian/rules @@ -0,0 +1,7 @@ +#!/usr/bin/make -f + +#export DH_VERBOSE=1 + +%: + dh $@ +