--- Misc/Portable.h.orig	2013-06-26 23:44:44.000000000 +0200
+++ Misc/Portable.h	2013-08-23 15:43:42.000000000 +0200
@@ -161,20 +161,20 @@
 #endif
 
 #if defined(LINUX) || defined(BSD) || defined(SUNOS)
-#define WORKDIR            "/var/lib/dibbler"
+#define WORKDIR            "@@PREFIX@@/var/lib/dibbler"
 #define DEFAULT_SCRIPT     ""
-#define CLNTCONF_FILE      "/etc/dibbler/client.conf"
-#define SRVCONF_FILE       "/etc/dibbler/server.conf"
-#define RELCONF_FILE       "/etc/dibbler/relay.conf"
+#define CLNTCONF_FILE      "@@PREFIX@@/etc/dibbler/client.conf"
+#define SRVCONF_FILE       "@@PREFIX@@/etc/dibbler/server.conf"
+#define RELCONF_FILE       "@@PREFIX@@/etc/dibbler/relay.conf"
 #define RESOLVCONF_FILE    "/etc/resolv.conf"
 #define NTPCONF_FILE       "/etc/ntp.conf"
-#define RADVD_FILE         "/etc/dibbler/radvd.conf"
-#define CLNTPID_FILE       "/var/lib/dibbler/client.pid"
-#define SRVPID_FILE        "/var/lib/dibbler/server.pid"
-#define RELPID_FILE        "/var/lib/dibbler/relay.pid"
-#define CLNTLOG_FILE       "/var/log/dibbler/dibbler-client.log"
-#define SRVLOG_FILE        "/var/log/dibbler/dibbler-server.log"
-#define RELLOG_FILE        "/var/log/dibbler/dibbler-relay.log"
+#define RADVD_FILE         "@@PREFIX@@/etc/dibbler/radvd.conf"
+#define CLNTPID_FILE       "@@PREFIX@@/var/lib/dibbler/client.pid"
+#define SRVPID_FILE        "@@PREFIX@@/var/lib/dibbler/server.pid"
+#define RELPID_FILE        "@@PREFIX@@/var/lib/dibbler/relay.pid"
+#define CLNTLOG_FILE       "@@PREFIX@@/var/log/dibbler/dibbler-client.log"
+#define SRVLOG_FILE        "@@PREFIX@@/var/log/dibbler/dibbler-server.log"
+#define RELLOG_FILE        "@@PREFIX@@/var/log/dibbler/dibbler-relay.log"
 #define NULLFILE           "/dev/null"
 
 /* those defines were initially used on Linux only, but hopefully 
--- Misc/Portable.h.in.orig	2013-06-26 19:59:48.000000000 +0200
+++ Misc/Portable.h.in	2013-08-23 15:38:26.000000000 +0200
@@ -161,20 +161,20 @@
 #endif
 
 #if defined(LINUX) || defined(BSD) || defined(SUNOS)
-#define WORKDIR            "/var/lib/dibbler"
+#define WORKDIR            "@@PREFIX@@/var/lib/dibbler"
 #define DEFAULT_SCRIPT     ""
-#define CLNTCONF_FILE      "/etc/dibbler/client.conf"
-#define SRVCONF_FILE       "/etc/dibbler/server.conf"
-#define RELCONF_FILE       "/etc/dibbler/relay.conf"
+#define CLNTCONF_FILE      "@@PREFIX@@/etc/dibbler/client.conf"
+#define SRVCONF_FILE       "@@PREFIX@@/etc/dibbler/server.conf"
+#define RELCONF_FILE       "@@PREFIX@@/etc/dibbler/relay.conf"
 #define RESOLVCONF_FILE    "/etc/resolv.conf"
 #define NTPCONF_FILE       "/etc/ntp.conf"
-#define RADVD_FILE         "/etc/dibbler/radvd.conf"
-#define CLNTPID_FILE       "/var/lib/dibbler/client.pid"
-#define SRVPID_FILE        "/var/lib/dibbler/server.pid"
-#define RELPID_FILE        "/var/lib/dibbler/relay.pid"
-#define CLNTLOG_FILE       "/var/log/dibbler/dibbler-client.log"
-#define SRVLOG_FILE        "/var/log/dibbler/dibbler-server.log"
-#define RELLOG_FILE        "/var/log/dibbler/dibbler-relay.log"
+#define RADVD_FILE         "@@PREFIX@@/etc/dibbler/radvd.conf"
+#define CLNTPID_FILE       "@@PREFIX@@/var/lib/dibbler/client.pid"
+#define SRVPID_FILE        "@@PREFIX@@/var/lib/dibbler/server.pid"
+#define RELPID_FILE        "@@PREFIX@@/var/lib/dibbler/relay.pid"
+#define CLNTLOG_FILE       "@@PREFIX@@/var/log/dibbler/dibbler-client.log"
+#define SRVLOG_FILE        "@@PREFIX@@/var/log/dibbler/dibbler-server.log"
+#define RELLOG_FILE        "@@PREFIX@@/var/log/dibbler/dibbler-relay.log"
 #define NULLFILE           "/dev/null"
 
 /* those defines were initially used on Linux only, but hopefully 
--- Port-bsd/lowlevel-bsd.c.orig	2013-06-26 19:59:48.000000000 +0200
+++ Port-bsd/lowlevel-bsd.c	2013-08-23 15:45:56.000000000 +0200
@@ -492,7 +493,7 @@
     uint32_t ret;
     FILE *file;
 
-    strcpy(filename, "/var/lib/dibbler/AAA/AAA-SPI");
+    strcpy(filename, "@@PREFIX@@/var/lib/dibbler/AAA/AAA-SPI");
 
     if (stat(filename, &st))
         return 0;
@@ -510,10 +511,10 @@
 char * getAAAKeyFilename(uint32_t SPI) {
     static char filename[1024];
     if (SPI != 0)
-        snprintf(filename, 1024, "%s%s%x", "/var/lib/dibbler/AAA/", "AAA-key-",
+        snprintf(filename, 1024, "%s%s%x", "@@PREFIX@@/var/lib/dibbler/AAA/", "AAA-key-",
             SPI);
     else
-        strcpy(filename, "/var/lib/dibbler/AAA/AAA-key");
+        strcpy(filename, "@@PREFIX@@/var/lib/dibbler/AAA/AAA-key");
     return filename;
 }
 
--- doc/examples/client.conf.orig	2013-05-28 09:21:19.000000000 +0200
+++ doc/examples/client.conf	2013-05-28 09:22:35.000000000 +0200
@@ -21,7 +21,7 @@
 log-level 7
 
 # Uncomment this line to run script every time response is received
-# script "/var/lib/dibbler/client-notify.sh"
+# script "@@PREFIX@@/var/lib/dibbler/client-notify.sh"
 
 
 # Current Dibbler release adds obtained addresses with /64 prefix. Although
--- doc/examples/server.conf.orig	2013-05-28 09:22:46.000000000 +0200
+++ doc/examples/server.conf	2013-05-28 09:23:26.000000000 +0200
@@ -12,7 +12,7 @@
 log-mode short
 
 # Uncomment this line to call script every time a response is sent
-#script "/var/lib/dibbler/server-notify.sh"
+#script "@@PREFIX@@/var/lib/dibbler/server-notify.sh"
 
 # set preference of this server to 0 (higher = more prefered)
 preference 0
--- doc/man/dibbler-client.8.orig	2013-05-28 09:25:31.000000000 +0200
+++ doc/man/dibbler-client.8	2013-05-28 09:26:21.000000000 +0200
@@ -76,8 +76,8 @@
 More examples can be found in the User's Guide.
 
 .SH FILES
-All files are created in the /var/lib/dibbler directory. Dibbler
-client reads /var/lib/dibbler/client.conf file. During operation,
+All files are created in the @@PREFIX@@/var/lib/dibbler directory. Dibbler
+client reads @@PREFIX@@/var/lib/dibbler/client.conf file. During operation,
 Dibbler saves various file in that directory. After reception of the
 DNS servers or domain informations, they are added to the
 /etc/resolv.conf file. After shutdown, that information is removed
--- doc/man/dibbler-server.8.orig	2013-05-28 09:26:29.000000000 +0200
+++ doc/man/dibbler-server.8	2013-05-28 09:26:58.000000000 +0200
@@ -79,8 +79,8 @@
 More examples can be found in the User's Guide.
 
 .SH FILES
-All files are created in the /var/lib/dibbler directory. Dibbler
-server reads /var/lib/dibbler/server.conf file. During operation,
+All files are created in the @@PREFIX@@/var/lib/dibbler directory. Dibbler
+server reads @@PREFIX@@/var/lib/dibbler/server.conf file. During operation,
 Dibbler saves various file in that directory.  Log file is named client.log.
 
 .SH STANDARDS
--- doc/man/dibbler-relay.8.orig	2013-05-28 09:27:06.000000000 +0200
+++ doc/man/dibbler-relay.8	2013-05-28 09:27:47.000000000 +0200
@@ -93,9 +93,9 @@
 .fi
 
 .SH FILES
-All files are created in the /var/lib/dibbler directory. During operation,
+All files are created in the @@PREFIX@@/var/lib/dibbler directory. During operation,
 Dibbler saves various file in that directory. Dibbler relay reads
-/etc/dibbler/relay.conf file. Log file is named client.log.
+@@PREFIX@@/etc/dibbler/relay.conf file. Log file is named client.log.
 
 .SH STANDARDS
 This implementation aims at conformance to the following standards:
--- scripts/notify-scripts/client-notify-bsd.sh.orig	2013-05-28 09:36:48.000000000 +0200
+++ scripts/notify-scripts/client-notify-bsd.sh	2013-05-28 09:37:52.000000000 +0200
@@ -4,7 +4,7 @@
 # This script was tested on OpenBSD, but it is likely to work on other BSDs as well.
 
 version="v0.2.3-openbsd"
-LOGFILE=/var/lib/dibbler/client-notify-bsd.log
+LOGFILE=@@PREFIX@@/var/lib/dibbler/client-notify-bsd.log
 
 # uncomment this to get full list of available variables
 set >> $LOGFILE
@@ -71,7 +71,7 @@
 
 if [ -n "$PREFIX1" ]; then
     echo "Prefix ${PREFIX1} (operation $1) to client $REMOTE_ADDR on inteface $IFACE/$IFINDEX" >> $LOGFILE
-    PREFIXIFACE=`cat /etc/dibbler/client.conf | grep -i downlink | grep -v -e '^#' | awk -F" " '{ print $2; }' | sed 's/\"//g'`
+    PREFIXIFACE=`cat @@PREFIX@@/etc/dibbler/client.conf | grep -i downlink | grep -v -e '^#' | awk -F" " '{ print $2; }' | sed 's/\"//g'`
     ifconfig $PREFIXIFACE inet6 "$PREFIX1"1 prefixlen $PREFIX1LEN
 fi
 
--- scripts/notify-scripts/server-notify.sh.orig	2013-05-28 09:38:03.000000000 +0200
+++ scripts/notify-scripts/server-notify.sh	2013-05-28 09:38:19.000000000 +0200
@@ -6,7 +6,7 @@
 #
 # Many parameters will be passed as environment variables
 
-LOGFILE=/var/lib/dibbler/server-notify.log
+LOGFILE=@@PREFIX@@/var/lib/dibbler/server-notify.log
 
 echo "---$1--------" >> $LOGFILE
 date >> $LOGFILE
