$NetBSD$

--- setup.py.orig	2006-08-16 10:45:41.000000000 +0000
+++ setup.py
@@ -116,17 +116,13 @@ class my_install_scripts (install_script
 class my_install(install):
     def finalize_options(self):
         ### if no prefix is given, configuration should go to /etc or in {prefix}/etc otherwise
-        if self.prefix:
-            self.conf_prefix = self.prefix + "/etc/prewikka"
-        else:
-            self.conf_prefix = "/etc/prewikka"
-
+        self.conf_prefix = os.environ["PKG_SYSCONFDIR"]
         install.finalize_options(self)
 
     def install_conf(self):
         self.mkpath((self.root or "") + self.conf_prefix)
         for file in self.distribution.conf_files:
-            dest = (self.root or "") + self.conf_prefix + "/" + os.path.basename(file)
+            dest = (self.root or "") + self.prefix + "/" + os.environ["EXAMPLEDIR"] + "/" + os.path.basename(file)
             if os.path.exists(dest):
                 dest += "-dist"
             self.copy_file(file, dest)
