]> mj.ucw.cz Git - nwho.git/commitdiff
Debian: Packaging for Stretch
authorMartin Mares <mj@ucw.cz>
Thu, 15 Feb 2018 17:00:51 +0000 (18:00 +0100)
committerMartin Mares <mj@ucw.cz>
Thu, 15 Feb 2018 17:00:51 +0000 (18:00 +0100)
debian/changelog
debian/compat
debian/control
debian/nwho.dirs [new file with mode: 0644]
debian/nwho.init [deleted file]
debian/nwho.service [new file with mode: 0644]
debian/rules

index 8a5651e025dbc67e668a4894ed3b86e0f4251601..76ace9f6e01352b26448e7bad39fcd574394136e 100644 (file)
@@ -1,3 +1,9 @@
+nwho (1.15) stable; urgency=low
+
+  * New upstream version. Packaging for Debian Stretch.
+
+ -- Martin Mares <mj@ucw.cz>  Thu, 15 Feb 2018 18:00:07 +0100
+
 nwho (1.14) stable; urgency=low
 
   * New upstream version.
index 7f8f011eb73d6043d2e6db9d2c101195ae2801f2..f599e28b8ab0d8c9c57a486c89c4a5132dcbd3b2 100644 (file)
@@ -1 +1 @@
-7
+10
index 367b5e04f875983ac3f14114b4aeb5130f7a712e..b962d4000ffb1986b1f3a7e5e6181ac1e71e77c9 100644 (file)
@@ -3,7 +3,7 @@ Section: ucw
 Priority: optional
 Maintainer: Martin Mares <mj@ucw.cz>
 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 (file)
index 0000000..439c27b
--- /dev/null
@@ -0,0 +1 @@
+/var/state/nwho
diff --git a/debian/nwho.init b/debian/nwho.init
deleted file mode 100755 (executable)
index 598f878..0000000
+++ /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 (file)
index 0000000..2108d5e
--- /dev/null
@@ -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
index bdc7361232e1b048d3b15ab023dd39ac508692de..04edf795364bb3356ed42a2b5333cd5052010465 100755 (executable)
@@ -1,45 +1,10 @@
 #!/usr/bin/make -f
-# Rules for building of nwho Debian/UCW Package
-# (c) 2002--2010 Martin Mares <mj@ucw.cz>
 
 # 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