$NetBSD: patch-ab,v 1.7 2004/01/21 22:19:30 heinz Exp $

--- Makefile.PL.orig	Sun Nov  2 01:42:04 2003
+++ Makefile.PL
@@ -95,7 +95,7 @@ sub yesno {
 
 my %opt = (
   'enable_ssl'      => undef,
-  'contact_address' => undef,
+  'contact_address' => '@SA_CONTACT_ADDRESS@',
   'run_razor_tests' => undef,
   'destdir'         => undef,
   '__cruft'         => undef,
@@ -333,18 +333,20 @@ if (!defined $opt{'contact_address'}) {
 }
 $makefile{'macro'}{'CONTACT_ADDRESS'} = $opt{'contact_address'};
 
-if (!defined $opt{'run_razor_tests'}) {
   my $got_razor2 = eval { require Razor2::Client::Agent };
 
   if ($got_razor2) {
-    $opt{'run_razor_tests'} = prompt(
-      "Run Razor v2 tests (these may fail due to network problems)? (y/n)",
-      'n'
-    );
-    print "\n";
+    if (!defined $opt{'run_razor_tests'}) {
+       $opt{'run_razor_tests'} = prompt(
+         "Run Razor v2 tests (these may fail due to network problems)? (y/n)",
+         'n'
+       );
+       print "\n";
+    }
+    $opt{'run_razor_tests'} = bool($opt{'run_razor_tests'});
+    $makefile{'macro'}{'TEST_RUN_RAZOR'} = yesno($opt{'run_razor_tests'});
   }
-}
-$opt{'run_razor_tests'} = bool($opt{'run_razor_tests'});
+
 if ($opt{'run_razor_tests'}) {
   open(FLAG, "> t/do_razor2");
   close(FLAG);
@@ -352,7 +354,6 @@ if ($opt{'run_razor_tests'}) {
 else {
   unlink("t/do_razor2");
 }
-$makefile{'macro'}{'TEST_RUN_RAZOR'} = yesno($opt{'run_razor_tests'});
 
 
 # Now dump the Makefile
@@ -745,7 +746,7 @@ sub MY::libscan {
 
   return q{} if $path =~ m{
                   (^|/)(\.svn|CVS)(/|$)|
-                  [/.](orig|old|rej|diff|patch|bak|backup|my)$
+                  [/.](orig|old|rej|diff|patch|bak|backup|my|subst.sav)$
                 }ix;
 
   clean_MY_globals($self);
@@ -965,15 +966,16 @@ spamd/binaries.mk: spamd/configure
 	cd spamd; ./configure --prefix="$(I_PREFIX)" --sysconfdir="$(I_SYSCONFDIR)" --datadir="$(I_DATADIR)" --enable-ssl="$(ENABLE_SSL)"
 
 conf__install:
-	-$(MKPATH) $(B_CONFDIR)
-	$(PERL) -MFile::Spec -MFile::Copy \
+	-$(BSD_INSTALL_DATA_DIR) $(B_CONFDIR)
+	@ # manage local.cf through pkgsrc .mk files
+	@ # $(PERL) -MFile::Spec -MFile::Copy \
 	  -e "copy(q{rules/local.cf}, q{$(B_CONFDIR)/local.cf}) unless -f q{$(B_CONFDIR)/local.cf};"
 
 data__install:
-	-$(MKPATH) $(B_DATADIR)
+	-$(BSD_INSTALL_DATA_DIR) $(B_DATADIR)
 	$(PERL) -e "map unlink, <$(B_DATADIR)/*>"
 	$(PREPROCESS) $(FIXVARS) -m$(PERM_RW) -Irules -O$(B_DATADIR) $(RULES)
-	$(CHMOD) $(PERM_RWX) $(B_DATADIR)
+	@ # $(CHMOD) $(PERM_RWX) $(B_DATADIR)
 
 text_html_doc: made-doc-stamp
 	$(NOOP)
