File setup_py.diff of Package cobbler.import4280

--- setup.py
+++ setup.py	2011/03/03 16:06:19
@@ -97,15 +97,23 @@
     spool_koan  = "/var/spool/koan"
 
     # www paths
-    wwwpath  = "/var/www/cobbler"
-    if os.path.exists("/etc/SuSE-release"):
-        wwwconf  = "/etc/apache2/conf.d"
+    www_prefix = "/var/www/"
+    if os.path.exists("/srv/www"):
+        www_prefix = "/srv/www/"
+
+    wwwpath  = www_prefix + "cobbler"
+    wwwcon   = www_prefix + "cobbler_webui_content"
+
+    if os.path.exists("/etc/apache2"):
+        wwwconf   = "/etc/apache2/conf.d"
+        dj_config = "/etc/apache2/vhosts.d/"
     elif os.path.exists("/etc/debian_version"):
-        wwwconf  = "/etc/apache2/conf.d"
+        wwwconf   = "/etc/apache2/conf.d"
+        dj_config = "/etc/httpd/vhosts.d/"
     else:
-        wwwconf  = "/etc/httpd/conf.d"
+        wwwconf   = "/etc/httpd/conf.d"
+        dj_config = "/etc/httpd/vhosts.d/"
 
-    wwwcon   = "/var/www/cobbler_webui_content"
     vw_localmirror = wwwpath + "/localmirror"
     vw_kickstarts  = wwwpath + "/kickstarts"
     vw_kickstarts_sys  = wwwpath + "/kickstarts_sys"
@@ -131,14 +139,12 @@
     logpath6 = "/var/log/koan"
     logpath7 = logpath + "/tasks"
 
-    # django content
-    dj_config    = "/etc/httpd/conf.d/"
     dj_templates = "/usr/share/cobbler/web/cobbler_web/templates"
     dj_webui     = "/usr/share/cobbler/web/cobbler_web"
     dj_webui2    = "/usr/share/cobbler/web/cobbler_web/templatetags"
     dj_webui_proj= "/usr/share/cobbler/web"
     dj_sessions  = "/var/lib/cobbler/webui_sessions"
-    dj_js        = "/var/www/cobbler_webui_content/"
+    dj_js        = www_prefix + "/cobbler_webui_content/"
 
     setup(
         name="cobbler",
@@ -166,7 +172,7 @@
             # miscellaneous config files
             (rotpath,  ['config/cobblerd_rotate']),
             (wwwconf,  ['config/cobbler.conf']),
-            (wwwconf,  ['config/cobbler_wsgi.conf']),
+#            (wwwconf,  ['config/cobbler_wsgi.conf']),
             (libpath,  ['config/cobbler_hosts']),
             (etcpath,  ['config/modules.conf']),
             (etcpath,  ['config/users.digest']),
@@ -266,6 +272,9 @@
             (pxepath,  ['templates/pxelocal.template']),
             (pxepath,  ['templates/pxelocal_ia64.template']),
             (pxepath,  ['templates/pxelocal_s390x.template']),
+            (pxepath,  ['templates/pxe/efidefault.template']),
+            (pxepath,  ['templates/pxe/grubprofile.template']),
+            (pxepath,  ['templates/pxe/grubsystem.template']),
 
             # templates for power management
             (powerpath, ['templates/power_apc_snmp.template']),
openSUSE Build Service is sponsored by