--- ./Makefile.orig	2005-08-27 19:33:06.000000000 -0400
+++ ./Makefile	2007-06-18 10:43:00.000000000 +0200
@@ -5,7 +5,7 @@
 DESTDIR=/
 PYTHON=python
 
-prefix=/usr
+prefix=@@PREFIX@@
 bindir=$(prefix)/bin
 
 all:
--- ./smart/const.py.jbj	2005-08-27 19:28:52.000000000 -0400
+++ ./smart/const.py	2005-08-27 19:30:30.000000000 -0400
@@ -64,9 +64,9 @@
 
 BLOCKSIZE = 16384
 
-DISTROFILE  = "/usr/lib/smart/distro.py"
-PLUGINSDIR  = "/usr/lib/smart/plugins/"
-DATADIR     = "/var/lib/smart/"
+DISTROFILE  = "@@PREFIX@@/lib/smart/distro.py"
+PLUGINSDIR  = "@@PREFIX@@/lib/smart/plugins/"
+DATADIR     = "@@PREFIX@@/var/lib/smart/"
 USERDATADIR = "~/.smart/"
 CONFFILE    = "config"
 
--- ./smart/plugins/detectsys.py.orig	2010-12-03 23:08:06.000000000 +0100
+++ ./smart/plugins/detectsys.py	2007-06-18 10:43:26.000000000 +0200
@@ -24,7 +24,7 @@
 
 def detectRPMSystem():
     dir = os.path.join(sysconf.get("rpm-root", "/"),
-                       sysconf.get("rpm-dbpath", "var/lib/rpm"))
+                       sysconf.get("rpm-dbpath", "@@PREFIX@@/var/lib/rpm"))
     file = os.path.join(dir, "Packages")
     if os.path.exists(file):
         for alias in sysconf.keys("channels"):
@@ -38,7 +38,7 @@
 
 def detectDEBSystem():
     dir = os.path.join(sysconf.get("deb-root", "/"),
-                       sysconf.get("deb-admindir", "var/lib/dpkg"))
+                       sysconf.get("deb-admindir", "@@PREFIX@@/var/lib/dpkg"))
     file = os.path.join(dir, "status")
     if os.path.exists(file):
         for alias in sysconf.keys("channels"):
@@ -53,7 +53,7 @@
 def detectSLACKSystem():
     dir = os.path.join(sysconf.get("slack-root", "/"),
                        sysconf.get("slack-packages-dir",
-                                   "var/log/packages"))
+                                   "@@PREFIX@@/var/log/packages"))
     if os.path.isdir(dir):
         for alias in sysconf.keys("channels"):
             if sysconf.get(("channels", alias, "type")) == "slack-sys":
@@ -67,7 +67,7 @@
 def detectARCHSystem():
     dir = os.path.join(sysconf.get("arch-root", "/"),
                        sysconf.get("arch-packages-dir",
-                                   "var/lib/pacman"))
+                                   "@@PREFIX@@/var/lib/pacman"))
     if os.path.isdir(dir):
         for alias in sysconf.keys("channels"):
             if sysconf.get(("channels", alias, "type")) == "arch-sys":
--- ./smart/backends/rpm/base.py.orig	2011-10-09 10:50:25.000000000 +0200
+++ ./smart/backends/rpm/base.py	2007-06-18 20:53:43.000000000 +0200
@@ -55,7 +55,7 @@
         getTS.ts = rpm.ts(getTS.root)
         if not sysconf.get("rpm-check-signatures", False):
             getTS.ts.setVSFlags(rpm._RPMVSF_NOSIGNATURES)
-        rpm_dbpath = sysconf.get("rpm-dbpath", "var/lib/rpm")
+        rpm_dbpath = sysconf.get("rpm-dbpath", "@@PREFIX@@/var/lib/rpm")
         dbdir = os.path.join(getTS.root, rpm_dbpath)
         if not os.path.isdir(dbdir):
             try:
--- ./smart/channels/rpm_sys.py.orig	2010-12-03 23:08:06.000000000 +0100
+++ ./smart/channels/rpm_sys.py	2007-06-18 20:53:33.000000000 +0200
@@ -33,7 +33,7 @@
     def fetch(self, fetcher, progress):
         getTS() # Make sure the db exists.
         path = os.path.join(sysconf.get("rpm-root", "/"),
-                            sysconf.get("rpm-dbpath", "var/lib/rpm"),
+                            sysconf.get("rpm-dbpath", "@@PREFIX@@/var/lib/rpm"),
                             "Packages")
         digest = os.path.getmtime(path)
         if digest == self._digest:
--- ./smart/channels/deb_sys.py.orig	2010-12-03 23:08:06.000000000 +0100
+++ ./smart/channels/deb_sys.py	2008-01-28 11:55:32.000000000 +0100
@@ -32,14 +32,14 @@
 
     def fetch(self, fetcher, progress):
         path = os.path.join(sysconf.get("deb-root", "/"),
-                            sysconf.get("deb-admindir", "var/lib/dpkg"),
+                            sysconf.get("deb-admindir", "@@PREFIX@@/var/lib/dpkg"),
                             "status")
         digest = os.path.getmtime(path)
         if digest == self._digest:
             return True
         self.removeLoaders()
         filelistspath = os.path.join(sysconf.get("deb-root", "/"),
-                            sysconf.get("deb-admindir", "var/lib/dpkg"),
+                            sysconf.get("deb-admindir", "@@PREFIX@@/var/lib/dpkg"),
                             "info")
         changelogpath = os.path.join(sysconf.get("deb-root", "/"),
                             "usr/share/doc")
--- ./smart/plugins/channelsync.py.orig	2007-08-07 18:56:17.000000000 +0200
+++ ./smart/plugins/channelsync.py	2008-01-28 15:08:12.000000000 +0100
@@ -23,7 +23,7 @@ from smart.channel import *
 from smart import *
 import os
 
-CHANNELSDIR = "/etc/smart/channels/"
+CHANNELSDIR = "@@PREFIX@@/etc/smart/channels/"
 
 def syncChannels(channelsdir, force=None):
 
--- ./smart/plugins/aptchannelsync.py.orig	2011-10-09 10:50:25.000000000 +0200
+++ ./smart/plugins/aptchannelsync.py	2008-01-28 15:08:04.000000000 +0100
@@ -35,8 +35,8 @@
 from smart import *
 
 
-APT_SOURCES_DIR = "/etc/apt/sources.list.d/"
-APT_SOURCES = "/etc/apt/sources.list"
+APT_SOURCES_DIR = "@@PREFIX@@/etc/apt/sources.list.d/"
+APT_SOURCES = "@@PREFIX@@/etc/apt/sources.list"
 
 
 def _loadSourcesList(filename):