Update debian/rules; Add post{inst,rm}; Bump Standards-Version; Add adduser to Depend...
authorMichael Prokop <mika@debian.org>
Mon, 14 Dec 2009 01:37:08 +0000 (02:37 +0100)
committerMichael Prokop <mika@debian.org>
Mon, 14 Dec 2009 01:48:34 +0000 (02:48 +0100)
debian/changelog
debian/control
debian/copyright
debian/postinst [new file with mode: 0755]
debian/postrm [new file with mode: 0755]
debian/rules
debian/uanytun.default [new file with mode: 0644]
src/include.mk

index 19f618a..e8cd3c2 100644 (file)
@@ -1,3 +1,9 @@
+uanytun (0.3.2-1) unstable; urgency=low
+
+  * New Upstream Version
+
+ -- Michael Prokop <mika@debian.org>  Mon, 14 Dec 2009 02:45:47 +0100
+
 uanytun (0.3-1) unstable; urgency=low
 
   * Initial release (Closes: #531082)
 uanytun (0.3-1) unstable; urgency=low
 
   * Initial release (Closes: #531082)
index c37d60b..f7e8cd3 100644 (file)
@@ -3,14 +3,14 @@ Section: net
 Priority: extra
 Maintainer: Michael Prokop <mika@debian.org>
 Build-Depends: debhelper (>= 5), asciidoc, docbook-xsl, libgcrypt11-dev, xsltproc
 Priority: extra
 Maintainer: Michael Prokop <mika@debian.org>
 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
 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                                                                                                                 
 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                                                                                                                 
index 2e01164..d1d4289 100644 (file)
@@ -5,7 +5,7 @@ It was downloaded from <http://www.anytun.org/>
 
 Upstream Author: Christian Pointner <equinox@anytun.org>
 
 
 Upstream Author: Christian Pointner <equinox@anytun.org>
 
-Copyright: 2007-2008 Christian Pointner
+Copyright: 2007-2009 Christian Pointner
 
 License:
 
 
 License:
 
diff --git a/debian/postinst b/debian/postinst
new file mode 100755 (executable)
index 0000000..8b783fe
--- /dev/null
@@ -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 (executable)
index 0000000..345ff3c
--- /dev/null
@@ -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#
index 512ff1c..1c7bb80 100755 (executable)
@@ -30,23 +30,23 @@ clean:
        dh_testroot
        rm -f build-stamp configure-stamp
 
        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 ..
 
        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_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.
 
        # 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
 
 # Build architecture-independent files here.
 binary-indep: install
@@ -59,7 +59,7 @@ binary-arch: install
        dh_installchangelogs ChangeLog
        dh_installdocs
        dh_installexamples
        dh_installchangelogs ChangeLog
        dh_installdocs
        dh_installexamples
-       dh_installinit etc/init.d/uanytun
+       dh_installinit
        dh_installman doc/uanytun.8
        dh_link
        dh_strip
        dh_installman doc/uanytun.8
        dh_link
        dh_strip
diff --git a/debian/uanytun.default b/debian/uanytun.default
new file mode 100644 (file)
index 0000000..5e05210
--- /dev/null
@@ -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"
index 83a992b..ed02033 100644 (file)
@@ -6,9 +6,11 @@ TARGET := Linux
 CC := gcc
 CFLAGS := -g -O2
 LDFLAGS := -g -Wall -O2 -lgcrypt
 CC := gcc
 CFLAGS := -g -O2
 LDFLAGS := -g -Wall -O2 -lgcrypt
+STRIP := strip
+INSTALL := install
 
 
+PREFIX := /usr/local
 SBINDIR := /usr/local/sbin
 SBINDIR := /usr/local/sbin
-MANDIR := /usr/local/share/man
 ETCDIR := /usr/local/etc
 ETCDIR := /usr/local/etc
-USERNAME := uanytun
-USERHOME := /var/run/uanytun
+MANDIR := /usr/local/share/man
+EXAMPLESDIR := /usr/local/share/examples