Index: debian/compat
===================================================================
--- debian/compat	(revision 314)
+++ debian/compat	(revision 314)
@@ -0,0 +1,1 @@
+7
Index: debian/dirs
===================================================================
--- debian/dirs	(revision 314)
+++ debian/dirs	(revision 314)
@@ -0,0 +1,1 @@
+etc/freeDiameter/
Index: debian/docs
===================================================================
--- debian/docs	(revision 314)
+++ debian/docs	(revision 314)
@@ -0,0 +1,3 @@
+INSTALL*
+LICENSE
+README
Index: debian/freediameter-accounting-server.examples
===================================================================
--- debian/freediameter-accounting-server.examples	(revision 314)
+++ debian/freediameter-accounting-server.examples	(revision 314)
@@ -0,0 +1,1 @@
+doc/app_acct.conf.sample
Index: debian/freediameter-accounting-server.install
===================================================================
--- debian/freediameter-accounting-server.install	(revision 314)
+++ debian/freediameter-accounting-server.install	(revision 314)
@@ -0,0 +1,1 @@
+usr/lib/freeDiameter/app_acct.fdx
Index: debian/freediameter-common.install
===================================================================
--- debian/freediameter-common.install	(revision 314)
+++ debian/freediameter-common.install	(revision 314)
@@ -0,0 +1,1 @@
+usr/lib/libfreeDiameter*.so
Index: debian/freediameter-daemon.default
===================================================================
--- debian/freediameter-daemon.default	(revision 314)
+++ debian/freediameter-daemon.default	(revision 314)
@@ -0,0 +1,7 @@
+# Defaults for freediameter initscript
+# sourced by /etc/init.d/freediameter
+# installed at /etc/default/freediameter by the maintainer scripts
+
+# Additional options that are passed to the Daemon.
+# See "freeDiameterd --help" for supported flags.
+DAEMON_OPTS=""
Index: debian/freediameter-daemon.examples
===================================================================
--- debian/freediameter-daemon.examples	(revision 314)
+++ debian/freediameter-daemon.examples	(revision 314)
@@ -0,0 +1,3 @@
+doc/freediameter.conf.sample
+doc/acl_wl.conf.sample
+doc/rt_default.conf.sample
Index: debian/freediameter-daemon.init
===================================================================
--- debian/freediameter-daemon.init	(revision 314)
+++ debian/freediameter-daemon.init	(revision 314)
@@ -0,0 +1,156 @@
+#! /bin/sh
+#
+# skeleton	example file to build /etc/init.d/ scripts.
+#		This file should be used to construct scripts for /etc/init.d.
+#
+#		Written by Miquel van Smoorenburg <miquels@cistron.nl>.
+#		Modified for Debian
+#		by Ian Murdock <imurdock@gnu.ai.mit.edu>.
+#               Further changes by Javier Fernandez-Sanguino <jfs@debian.org>
+#
+# Version:	@(#)skeleton  1.9  26-Feb-2001  miquels@cistron.nl
+#
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/bin/freeDiameterd
+NAME=freediameter
+DESC=freeDiameter daemon
+
+test -x $DAEMON || exit 0
+
+LOGDIR=/var/log/freediameter
+PIDFILE=/var/run/$NAME.pid
+DODTIME=30                  # Time to wait for the server to die, in seconds
+                            # The value is high because we wait for STA answers
+			    # before disconnecting the peers.
+
+# Include freediameter defaults if available
+if [ -f /etc/default/freediameter ] ; then
+    . /etc/default/freediameter
+fi
+
+set -e
+
+running_pid()
+{
+    # Check if a given process pid's cmdline matches a given name
+    pid=$1
+    name=$2
+    [ -z "$pid" ] && return 1
+    [ ! -d /proc/$pid ] &&  return 1
+    cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1`
+    # Is this the expected child?
+    [ "$cmd" != "$name" ] &&  return 1
+    return 0
+}
+
+running()
+{
+# Check if the process is running looking at /proc
+# (works for all users)
+
+    # No pidfile, probably no daemon present
+    [ ! -f "$PIDFILE" ] && return 1
+    # Obtain the pid and check it against the binary name
+    pid=`cat $PIDFILE`
+    running_pid $pid $DAEMON || return 1
+    return 0
+}
+
+force_stop() {
+# Forcefully kill the process
+    [ ! -f "$PIDFILE" ] && return
+    if running ; then
+        kill -15 $pid
+        # Is it really dead?
+        [ -n "$DODTIME" ] && sleep "$DODTIME"s
+        if running ; then
+            kill -9 $pid
+            [ -n "$DODTIME" ] && sleep "$DODTIME"s
+            if running ; then
+                echo "Cannot kill $LABEL (pid=$pid)!"
+                exit 1
+            fi
+        fi
+    fi
+    rm -f $PIDFILE
+    return 0
+}
+
+case "$1" in
+  start)
+        echo -n "Starting $DESC: "
+        start-stop-daemon --start --quiet --pidfile $PIDFILE \
+            --exec $DAEMON -- $DAEMON_OPTS
+        if running ; then
+            echo "$NAME."
+        else
+            echo " ERROR."
+        fi
+        ;;
+  stop)
+        echo -n "Stopping $DESC: "
+        start-stop-daemon --stop --quiet --pidfile $PIDFILE \
+            --exec $DAEMON
+        echo "$NAME."
+        ;;
+  force-stop)
+        echo -n "Forcefully stopping $DESC: "
+        force_stop
+        if ! running ; then
+            echo "$NAME."
+        else
+            echo " ERROR."
+        fi
+        ;;
+  #reload)
+        #
+        # If the daemon can reload its config files on the fly
+        # for example by sending it SIGHUP, do it here.
+        #
+        # If the daemon responds to changes in its config file
+        # directly anyway, make this a do-nothing entry.
+        #
+        # echo "Reloading $DESC configuration files."
+        # start-stop-daemon --stop --signal 1 --quiet --pidfile \
+        #       /var/run/$NAME.pid --exec $DAEMON
+  #;;
+  force-reload)
+        #
+        # If the "reload" option is implemented, move the "force-reload"
+        # option to the "reload" entry above. If not, "force-reload" is
+        # just the same as "restart" except that it does nothing if the
+        # daemon isn't already running.
+        # check wether $DAEMON is running. If so, restart
+        start-stop-daemon --stop --test --quiet --pidfile \
+            /var/run/$NAME.pid --exec $DAEMON \
+            && $0 restart \
+            || exit 0
+        ;;
+  restart)
+    echo -n "Restarting $DESC: "
+        start-stop-daemon --stop --quiet --pidfile \
+            /var/run/$NAME.pid --exec $DAEMON
+        [ -n "$DODTIME" ] && sleep $DODTIME
+        start-stop-daemon --start --quiet --pidfile \
+            /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
+        echo "$NAME."
+        ;;
+  status)
+    echo -n "$LABEL is "
+    if running ;  then
+        echo "running"
+    else
+        echo " not running."
+        exit 1
+    fi
+    ;;
+  *)
+    N=/etc/init.d/$NAME
+    # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
+    echo "Usage: $N {start|stop|restart|force-reload|status|force-stop}" >&2
+    exit 1
+    ;;
+esac
+
+exit 0
Index: debian/freediameter-daemon.install
===================================================================
--- debian/freediameter-daemon.install	(revision 314)
+++ debian/freediameter-daemon.install	(revision 314)
@@ -0,0 +1,3 @@
+usr/bin/freeDiameterd
+usr/lib/freeDiameter/acl_wl.fdx
+usr/lib/freeDiameter/rt_default.fdx
Index: debian/freediameter-debug-tools.examples
===================================================================
--- debian/freediameter-debug-tools.examples	(revision 314)
+++ debian/freediameter-debug-tools.examples	(revision 314)
@@ -0,0 +1,1 @@
+doc/test_app.conf.sample
Index: debian/freediameter-debug-tools.install
===================================================================
--- debian/freediameter-debug-tools.install	(revision 314)
+++ debian/freediameter-debug-tools.install	(revision 314)
@@ -0,0 +1,3 @@
+usr/lib/freeDiameter/dbg_rt.fdx
+usr/lib/freeDiameter/dbg_monitor.fdx
+usr/lib/freeDiameter/test_app.fdx
Index: debian/freediameter-dev.install
===================================================================
--- debian/freediameter-dev.install	(revision 314)
+++ debian/freediameter-dev.install	(revision 314)
@@ -0,0 +1,1 @@
+usr/include/freeDiameter/*
Index: debian/freediameter-dictionary-rfc4005.install
===================================================================
--- debian/freediameter-dictionary-rfc4005.install	(revision 314)
+++ debian/freediameter-dictionary-rfc4005.install	(revision 314)
@@ -0,0 +1,1 @@
+usr/lib/freeDiameter/dict_nasreq.fdx
Index: debian/freediameter-dictionary-rfc4072.install
===================================================================
--- debian/freediameter-dictionary-rfc4072.install	(revision 314)
+++ debian/freediameter-dictionary-rfc4072.install	(revision 314)
@@ -0,0 +1,1 @@
+usr/lib/freeDiameter/dict_eap.fdx
Index: debian/freediameter-radius-gateway.examples
===================================================================
--- debian/freediameter-radius-gateway.examples	(revision 314)
+++ debian/freediameter-radius-gateway.examples	(revision 314)
@@ -0,0 +1,2 @@
+doc/app_radgw.conf.sample
+doc/echodrop.rgwx.conf.sample
Index: debian/freediameter-radius-gateway.install
===================================================================
--- debian/freediameter-radius-gateway.install	(revision 314)
+++ debian/freediameter-radius-gateway.install	(revision 314)
@@ -0,0 +1,2 @@
+usr/lib/freeDiameter/app_radgw.fdx
+usr/lib/freeDiameter/*.rgwx
Index: debian/rules
===================================================================
--- debian/rules	(revision 314)
+++ debian/rules	(revision 314)
@@ -0,0 +1,36 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+#
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+#
+# Modified to make a template file for a multi-binary package with separated
+# build-arch and build-indep targets  by Bill Allombert 2001
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
+
+# Uncomment this to run the tests when the package is built
+# compile_the_tests=-DSKIP_TESTS:BOOL=OFF
+
+%:
+	dh  $@
+
+override_dh_auto_configure:
+	dh_auto_configure -- $(compile_the_tests) \
+		-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
+		-DDEFAULT_CONF_PATH:PATH=/etc/freeDiameter \
+		-DBUILD_APP_ACCT:BOOL=ON \
+		-DBUILD_APP_RADGW:BOOL=ON \
+		-DBUILD_DBG_MONITOR:BOOL=ON \
+		-DBUILD_DBG_RT:BOOL=ON \
+		-DBUILD_TEST_APP:BOOL=ON \
+		-DBUILD_APP_ACCT:BOOL=ON
+		
+
