Parcourir la source

extra: Added initial Debian package for nagbot

/etc/nagbot/config.template
/usr/local/bin/nagios-fifo.pl
/usr/local/bin/nagios-irssi.pl
/usr/local/bin/tailgrep
/usr/local/bin/tc-14.pl
/usr/share/doc/nagbot/INSTALL
/usr/share/doc/nagbot/README.md
/usr/share/doc/nagbot/changelog.gz
/usr/share/doc/nagbot/copyright
/var/lib/nagbot/.irssi/config -> /etc/nagbot/config
/var/lib/nagbot/C3PO
/var/lib/nagbot/C3PO.dat
/var/lib/nagbot/fortunes
/var/lib/nagbot/fortunes.dat
/var/lib/nagbot/quotes
Sebastien Badia il y a 10 ans
Parent
commit
ec5e4c2e0c

+ 5 - 0
extras/debian/changelog

@@ -0,0 +1,5 @@
+nagbot (1.0.0) unstable; urgency=low
+
+  * Initial release.
+
+ -- Sebastien Badia <seb@sebian.fr>  Wed, 29 Jan 2014 17:48:39 +0100

+ 1 - 0
extras/debian/compat

@@ -0,0 +1 @@
+7

+ 22 - 0
extras/debian/control

@@ -0,0 +1,22 @@
+Source: nagbot
+Section: net
+Priority: extra
+Maintainer: Sebastien Badia <seb@sebian.fr>
+Uploaders: Gaetan Ryckeboer <gaetan@ryckeboer.org>
+Build-Depends: debhelper (>= 7.0.50~)
+Standards-Version: 3.9.5
+Vcs-Git: git://code.ffdn.org/asr/nagios-irssi.git
+Vcs-Browser: https://code.ffdn.org/asr/nagios-irssi.git
+Homepage: https://code.ffdn.org/asr/nagios-irssi.git
+
+Package: nagbot
+Architecture: all
+Depends: irssi, perl, screen | tmux
+         ${misc:Depends}
+Recommends: nagios
+Description: IRC bot that announces Nagios status
+ An IRC (Internet Relay Chat) bot that reads Nagios status information and
+ emits alerts to an IRC channel. It can filter alerts based on severity
+ (CRITICAL, HARD, SOFT, and/or UNKNOWN) or by regular expression. It can
+ connect to IRC servers protected by password or SSL, and can optionally set
+ the topic to the current Nagios status.

+ 22 - 0
extras/debian/copyright

@@ -0,0 +1,22 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: nagios-irssi
+Source: https://code.ffdn.org/asr/nagios-irssi
+
+Files: *
+Copyright: 2014 Gaétan Ryckeboer <gaetan@ryckeboer.org>
+License: GPL-3+
+
+Files: debian/*
+Copyright: 2014 Sebastien Badia <seb@sebian.fr>
+License: GPL-3+
+Comment: the Debian packaging is licensed under the same terms as the original package.
+
+License: GPL-3+
+ The files hereby included are free software; you can distribute them
+ 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.
+ .
+ On Debian systems, the full text of the GNU General Public
+ License version 3 can be found in the file
+ `/usr/share/common-licenses/GPL-3'.

+ 3 - 0
extras/debian/nagbot.dirs

@@ -0,0 +1,3 @@
+var/lib/nagbot/.irssi/
+etc/nagbot/
+usr/local/bin/

+ 2 - 0
extras/debian/nagbot.docs

@@ -0,0 +1,2 @@
+INSTALL
+README.md

+ 3 - 0
extras/debian/nagbot.install

@@ -0,0 +1,3 @@
+etc/config.template etc/nagbot/
+bin/* usr/local/bin/
+var/* var/lib/nagbot/

+ 1 - 0
extras/debian/nagbot.links

@@ -0,0 +1 @@
+etc/nagbot/config var/lib/nagbot/.irssi/config

+ 31 - 0
extras/debian/nagbot.postinst

@@ -0,0 +1,31 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "configure" ]; then
+
+  USER="nagbot"
+
+  # Create the "nagbot" user
+  if ! getent passwd ${USER} > /dev/null 2>&1
+  then
+    adduser --quiet --system --group --home /var/lib/${USER} \
+      --no-create-home \
+      --shell /bin/false \
+      --gecos "${USER} daemon" ${USER}
+  fi
+
+  # Create the "nagbot" group if it is missing and set the primary group
+  # of the "nagbot" user to this group.
+  if ! getent group ${USER} > /dev/null 2>&1
+  then
+    addgroup --quiet --system ${USER}
+    usermod -g ${USER} ${USER}
+  fi
+
+  chown -R ${USER}. /etc/${USER} /var/lib/${USER}
+  chmod 0750 /etc/${USER}
+
+fi
+
+#DEBHELPER#

+ 23 - 0
extras/debian/nagbot.postrm

@@ -0,0 +1,23 @@
+#!/bin/sh
+
+set -e
+
+if [ "${1}" = "purge" ] ; then
+
+  USER="nagbot"
+
+  # Del user nagbot (and backup home)
+  if (which deluser && getent passwd ${USER}) > /dev/null 2>&1; then
+    deluser --system --quiet --backup-to /var/lib ${USER} || true
+  fi
+
+  # Del group nagbot
+  if (which delgroup && getent group ${USER}) > /dev/null 2>&1; then
+    delgroup --system --quiet ${USER} || true
+  fi
+
+  rm -rf /var/lib/${USER}
+
+fi
+
+#DEBHELPER#

+ 7 - 0
extras/debian/rules

@@ -0,0 +1,7 @@
+#!/usr/bin/make -f
+#export DH_VERBOSE=1
+
+%:
+	dh $@
+
+override_dh_usrlocal:

+ 1 - 0
extras/debian/source/format

@@ -0,0 +1 @@
+3.0 (native)

+ 2 - 0
extras/debian/watch

@@ -0,0 +1,2 @@
+version=3
+https://code.ffdn.org/asr/nagios-irssi/releases .*/(\d\.\d\.\d)\.tar\.gz