From 7577864b401418753075ac88b5aecab0e421fcf6 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Thu, 15 Feb 2018 18:00:51 +0100 Subject: [PATCH] Debian: Packaging for Stretch --- debian/changelog | 6 ++++++ debian/compat | 2 +- debian/control | 2 +- debian/nwho.dirs | 1 + debian/nwho.init | 40 ---------------------------------------- debian/nwho.service | 11 +++++++++++ debian/rules | 43 ++++--------------------------------------- 7 files changed, 24 insertions(+), 81 deletions(-) create mode 100644 debian/nwho.dirs delete mode 100755 debian/nwho.init create mode 100644 debian/nwho.service diff --git a/debian/changelog b/debian/changelog index 8a5651e..76ace9f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +nwho (1.15) stable; urgency=low + + * New upstream version. Packaging for Debian Stretch. + + -- Martin Mares Thu, 15 Feb 2018 18:00:07 +0100 + nwho (1.14) stable; urgency=low * New upstream version. diff --git a/debian/compat b/debian/compat index 7f8f011..f599e28 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -7 +10 diff --git a/debian/control b/debian/control index 367b5e0..b962d40 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: ucw Priority: optional Maintainer: Martin Mares Standards-Version: 2.1.0.0 -Build-Depends: debhelper (>= 7.0) +Build-Depends: debhelper (>= 10.0) Package: nwho Architecture: any diff --git a/debian/nwho.dirs b/debian/nwho.dirs new file mode 100644 index 0000000..439c27b --- /dev/null +++ b/debian/nwho.dirs @@ -0,0 +1 @@ +/var/state/nwho diff --git a/debian/nwho.init b/debian/nwho.init deleted file mode 100755 index 598f878..0000000 --- a/debian/nwho.init +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -# Start/stop the nwho daemon. - -### BEGIN INIT INFO -# Provides: nwho -# Required-Start: $network $local_fs -# Required-Stop: $network $local_fs -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: The network who daemon -# Description: This is Yet Another RWho Replacement utility. It collects information -# about all logged in users on a central server where it can be displayed. -### END INIT INFO - -test -f /usr/sbin/nwhod || exit 0 - -if [ -f /etc/default/nwho ] ; then - . /etc/default/nwho -fi - -case "$1" in -start) echo -n "Starting network who daemon: nwhod" - start-stop-daemon --start --quiet --exec /usr/sbin/nwhod $NWHOSERVER - echo "." - ;; -stop) echo -n "Stopping network who daemon: nwhod" - start-stop-daemon --stop --quiet --exec /usr/sbin/nwhod - [ -z "$NWHOSERVER" ] && rm -f /var/state/nwho/* - echo "." - ;; -restart|reload|force-reload) echo -n "Restarting network who daemon: nwhod" - start-stop-daemon --stop --quiet --exec /usr/sbin/nwhod - start-stop-daemon --start --quiet --exec /usr/sbin/nwhod $NWHOSERVER - echo "." - ;; -*) echo "Usage: /etc/init.d/nwho start|stop|restart|reload|force-reload" - exit 1 - ;; -esac -exit 0 diff --git a/debian/nwho.service b/debian/nwho.service new file mode 100644 index 0000000..2108d5e --- /dev/null +++ b/debian/nwho.service @@ -0,0 +1,11 @@ +[Unit] +Description=Network who service +After=network.target + +[Service] +EnvironmentFile=/etc/default/nwho +ExecStart=/usr/sbin/nwhod -d ${NWHOSERVER} +ExecStopPost=/bin/sh -c 'rm -f /var/state/nwho/*' + +[Install] +WantedBy=multi-user.target diff --git a/debian/rules b/debian/rules index bdc7361..04edf79 100755 --- a/debian/rules +++ b/debian/rules @@ -1,45 +1,10 @@ #!/usr/bin/make -f -# Rules for building of nwho Debian/UCW Package -# (c) 2002--2010 Martin Mares # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -build: build-stamp -build-stamp: - dh_testdir - $(MAKE) - touch build-stamp +%: + dh $@ -clean: - dh_testdir - dh_testroot - rm -f build-stamp - $(MAKE) clean - dh_clean - -binary-indep: build - -binary-arch: build - dh_testdir - dh_testroot - dh_prep - dh_installdirs etc/init.d etc/default usr/bin usr/sbin var/state/nwho - - $(MAKE) ROOT=`pwd`/debian/nwho install - - dh_installchangelogs - dh_installdocs README - dh_installinit - dh_strip - dh_compress - dh_fixperms - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch - -.PHONY: build clean binary-indep binary-arch binary +override_dh_auto_install: + dh_auto_install -- ROOT=debian/nwho -- 2.39.2