File pisg-0.73-systemdirs.patch of Package pisg

Index: pisg
===================================================================
--- pisg.orig
+++ pisg
@@ -29,11 +29,8 @@ sub main
     # If the script was executed as ./pisg - then we just remove
     # everything after the last slash, if it was executed as 'perl pisg'
     # we assume that we are executing in the current dir.
-    if ($script_dir =~ m/\/[^\/]*$/) {
-        $script_dir =~ s/\/[^\/]*$//;
-    } else {
-        $script_dir = ".";
-    }
+# use shared datadir
+    $script_dir = "/usr/share/pisg/";
 
     if (!-t STDOUT) { # we are not writing to a terminal
 	push @ARGV, "--silent";
@@ -79,6 +76,8 @@ sub get_cmdline_options
         modules_dir => "$script_dir/modules/",     # Module search path
         logfile => [],
         logdir => [],
+# use system dirs
+        configfile => "/etc/pisg.cfg"
     );
 
     # Commandline options
Index: modules/Pisg.pm
===================================================================
--- modules/Pisg.pm.orig
+++ modules/Pisg.pm
@@ -101,15 +101,15 @@ sub get_default_config_settings
         maintainer => 'MAINTAINER',
         pagehead => 'none',
         pagefoot => 'none',
-        configfile => 'pisg.cfg',
+        configfile => '/etc/pisg.cfg',
         imagepath => '',
         imageglobpath => '',
         defaultpic => '',
         logdir => [],
         nfiles => 0,
         lang => 'EN',
-        langfile => 'lang.txt',
-        cssdir => 'layout/',
+        langfile => '/usr/share/pisg/lang.txt',
+        cssdir => '/usr/share/pisg/layout/',
         colorscheme => 'default',
         altcolorscheme => 'none',
         logprefix => '',
openSUSE Build Service is sponsored by