--- DSO/Makefile.PL.orig        Tue Jul 24 23:01:08 2001
+++ DSO/Makefile.PL             Tue Jul 24 23:02:58 2001
@@ -4,26 +4,7 @@
 # You can use it according to the Apache licence
 # Please send modifications to: <jmdault@mandrakesoft.com> so other
 # modules can benefit from it!
-
-print "Enter the path of your httpd binary.\n";
-print "It should be something like /usr/local/apache/bin).\n";
-print "If you don't know, enter the word 'findit'. I will try to look\n";
-print "for you... but it will take a few minutes.\n";
-print "Your choice: ";
-$thechoice=<STDIN>;
-#$thechoice="/usr/sbin/httpd\n";
-chop $thechoice;
-
-if ($thechoice eq "findit") {
- print "\nTrying to find httpd.... please be patient!\n";
- $thechoice=`find / -type f -iname httpd 2>/dev/null|grep bin| \
-	xargs -n 1 file|grep linked|cut -f1 -d: 2>/dev/null`;
- chop $thechoice;
- print "\nFound: $thechoice\n";
- ($test1,$test2,@junk)=split(/\n/,$thechoice);
- if ($test2)  {die "\nSorry, found more than 1 potential httpd...\n"; }
-}
-
+$thechoice="/usr/local/sbin/httpd";
 print "\nLet's see if it's a valid httpd...";
 $_=`$thechoice -v`;
 if (/Server version:/) { print " YES!\n"; 
@@ -91,12 +72,10 @@
 }
 print "DocumentRoot: $documentroot\n";
 
-#$_=`ls -dln $documentroot|cut -c 17-30`;
-$_=`ls -dln /var/log|cut -c 17-30`;
-if (/^(\d*)(\s*)(\d*)/) {
-    $uid=$1; $gid=$3;
-    print "Content uid $uid, gid $gid\n";
-}
+$webdir = $documentroot;
+$webdir =~ s/"//g;
+($uid, $gid) = (stat $webdir)[4,5];
+print "Content uid, gid: $uid, $gid\n";
 
 #
 # User "apache" in Mandrake has user 48, gid 48
@@ -136,6 +115,7 @@
 $_=~ s|"\$\(fpexec_bin\)|\\\\\"$sbindir\/fpexec\\\\|;
 $_=~ s|\$\(httpdconf\)|$httpdconf|;
 $_=~ s|\$\(libexecdir\)|$libexecdir|;
+$_=~ s|root.root|root:wheel|;
 print MAKF $_;
 }
 
@@ -143,7 +123,7 @@
 ### Now, *that*'s very *ugly* ;-)
 ###
 print "Extracting the Source Code from the patch...\n";
-$patch=` ls ../patch*|xargs -iPAT -n1 patch -f -i `;
+$patch=`patch -f < patch-1.5.1mdk-1.3.19 2>&1 > /dev/null`;
 $result=`rm -f Makefile.tmpl *.orig *.rej *~`;
 
 print "\n\nDone!!! Now have a look at the Makefile to see if it's ";
