From 45e0a21e3d59eb0c1d6083d6bf7f22faf412b338 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Mon, 14 Dec 2009 02:37:08 +0100 Subject: [PATCH] Update debian/rules; Add post{inst,rm}; Bump Standards-Version; Add adduser to Depends; Add debian/uanytun.default; Update changelog for release 0.3.2. --- debian/changelog | 6 ++++++ debian/control | 4 ++-- debian/copyright | 2 +- debian/postinst | 14 ++++++++++++++ debian/postrm | 17 +++++++++++++++++ debian/rules | 16 ++++++++-------- debian/uanytun.default | 10 ++++++++++ src/include.mk | 8 +++++--- 8 files changed, 63 insertions(+), 14 deletions(-) create mode 100755 debian/postinst create mode 100755 debian/postrm create mode 100644 debian/uanytun.default diff --git a/debian/changelog b/debian/changelog index 19f618a..e8cd3c2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +uanytun (0.3.2-1) unstable; urgency=low + + * New Upstream Version + + -- Michael Prokop Mon, 14 Dec 2009 02:45:47 +0100 + uanytun (0.3-1) unstable; urgency=low * Initial release (Closes: #531082) diff --git a/debian/control b/debian/control index c37d60b..f7e8cd3 100644 --- a/debian/control +++ b/debian/control @@ -3,14 +3,14 @@ Section: net Priority: extra Maintainer: Michael Prokop Build-Depends: debhelper (>= 5), asciidoc, docbook-xsl, libgcrypt11-dev, xsltproc -Standards-Version: 3.8.1 +Standards-Version: 3.8.3 Homepage: http://www.anytun.org/ Vcs-git: git://git.grml.org/uanytun.git Vcs-Browser: http://git.grml.org/?p=uanytun.git Package: uanytun Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} +Depends: ${shlibs:Depends}, ${misc:Depends}, adduser Description: tiny implementation of the secure anycast tunneling protocol uAnytun is a tiny implementation of SATP (Secure Anycast Tunneling Protocol). Unlike Anytun which is a full featured implementation diff --git a/debian/copyright b/debian/copyright index 2e01164..d1d4289 100644 --- a/debian/copyright +++ b/debian/copyright @@ -5,7 +5,7 @@ It was downloaded from Upstream Author: Christian Pointner -Copyright: 2007-2008 Christian Pointner +Copyright: 2007-2009 Christian Pointner License: diff --git a/debian/postinst b/debian/postinst new file mode 100755 index 0000000..8b783fe --- /dev/null +++ b/debian/postinst @@ -0,0 +1,14 @@ +#!/bin/sh +# postinst script for uanytun + +set -e + +if [ -x "/etc/init.d/uanytun" ]; then + update-rc.d uanytun defaults >/dev/null +fi + +if [ "$1" = "configure" ]; then + adduser --quiet --system --group --no-create-home --home /var/run/uanytun uanytun +fi + +#DEBHELPER# diff --git a/debian/postrm b/debian/postrm new file mode 100755 index 0000000..345ff3c --- /dev/null +++ b/debian/postrm @@ -0,0 +1,17 @@ +#!/bin/sh +# postrm script for uanytun + +set -e + +if [ "$1" = "purge" ] ; then + update-rc.d uanytun remove >/dev/null || exit $? + + if [ -x "$(command -v deluser)" -a -x "$(command -v delgroup)" ]; then + deluser --quiet --system uanytun || true + delgroup --quiet --system uanytun || true + else + echo "Not removing uanytun user and group: adduser package not found." >&2 + fi +fi + +#DEBHELPER# diff --git a/debian/rules b/debian/rules index 512ff1c..1c7bb80 100755 --- a/debian/rules +++ b/debian/rules @@ -30,23 +30,23 @@ clean: dh_testroot rm -f build-stamp configure-stamp - # workarounds: - touch src/include.mk - rm -f src/tun.c - cd src && $(MAKE) clean && cd .. cd doc && $(MAKE) clean && cd .. + # drop leftover file: + rm -f src/tun.c + dh_clean install: build dh_testdir dh_testroot - dh_installdirs usr/sbin usr/share/uanytun/examples/config + dh_installdirs etc/init.d usr/sbin usr/share/uanytun/examples/config # Add here commands to install the package into debian/uanytun. - install -m 755 src/uanytun debian/uanytun/usr/sbin/ - cp -a etc/uanytun/* debian/uanytun/usr/share/uanytun/examples/config/ + install -m 755 src/uanytun debian/uanytun/usr/sbin/ + cp -a etc/uanytun/* debian/uanytun/usr/share/uanytun/examples/config/ + install etc/init.d/uanytun debian/uanytun/etc/init.d/ # Build architecture-independent files here. binary-indep: install @@ -59,7 +59,7 @@ binary-arch: install dh_installchangelogs ChangeLog dh_installdocs dh_installexamples - dh_installinit etc/init.d/uanytun + dh_installinit dh_installman doc/uanytun.8 dh_link dh_strip diff --git a/debian/uanytun.default b/debian/uanytun.default new file mode 100644 index 0000000..5e05210 --- /dev/null +++ b/debian/uanytun.default @@ -0,0 +1,10 @@ +# Defaults for uanytun initscript +# sourced by /etc/init.d/uanytun + +# Note: chroot is tricky and not reliable yet. Use it only +# if you know what you're doing. +#CHROOTDIR='/var/run/uanytun' +#DAEMONOPTS="--chroot $CHROOTDIR --username nobody" + +# Additional options that are passed to the Daemon. +DAEMONOPTS="--username uanytun" diff --git a/src/include.mk b/src/include.mk index 83a992b..ed02033 100644 --- a/src/include.mk +++ b/src/include.mk @@ -6,9 +6,11 @@ TARGET := Linux CC := gcc CFLAGS := -g -O2 LDFLAGS := -g -Wall -O2 -lgcrypt +STRIP := strip +INSTALL := install +PREFIX := /usr/local SBINDIR := /usr/local/sbin -MANDIR := /usr/local/share/man ETCDIR := /usr/local/etc -USERNAME := uanytun -USERHOME := /var/run/uanytun +MANDIR := /usr/local/share/man +EXAMPLESDIR := /usr/local/share/examples -- 2.1.4