1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
$NetBSD: patch-ab,v 1.10 2005/02/13 21:20:25 heinz Exp $
--- Makefile.PL.orig Fri Oct 22 17:21:08 2004
+++ Makefile.PL
@@ -64,6 +64,8 @@ my @ATT_KEYS = (
'ENABLE_SSL', # Set to 'yes' to build spamc with SSL support.
'CONTACT_ADDRESS', # To not ask for the contact address, use this.
'RUN_NET_TESTS', # To not ask whether net tests should be run, use this.
+ 'RUN_AWL_SQL_TESTS', # To not ask whether sql tests for the awl should be run, use this
+ 'RUN_BAYES_SQL_TESTS',# To not ask whether sql tests for bayes should be run, use this
);
@@ -100,6 +102,8 @@ my %opt = (
'enable_ssl' => undef,
'contact_address' => undef,
'run_net_tests' => undef,
+ 'run_awl_sql_tests' => undef,
+ 'run_bayes_sql_tests' => undef,
'destdir' => undef,
'__cruft' => undef,
'ignore_cruft' => undef,
@@ -161,6 +165,7 @@ my %makefile = (
'EXE_FILES' => [
'spamassassin', 'sa-learn',
+ 'spamc/qmail-spamc$(EXE_EXT)',
'spamc/spamc$(EXE_EXT)', # must next to last one
'spamd/spamd', # must be the last one
],
@@ -365,14 +370,16 @@ else {
$makefile{'macro'}{'RUN_NET_TESTS'} = yesno($opt{'run_net_tests'});
if (HAS_DBI) {
- $opt{'run_awl_sql_tests'} = prompt(
- "Run SQL-based Auto-whitelist tests during 'make test' (additional\n".
- "information required) (y/n)", "n");
- print "\n";
-
- $opt{'run_awl_sql_tests'} = bool($opt{'run_awl_sql_tests'});
+ if (!defined $opt{'run_awl_sql_tests'}) {
+ $opt{'run_awl_sql_tests'} = prompt(
+ "Run SQL-based Auto-whitelist tests during 'make test' (additional\n".
+ "information required) (y/n)", "n");
+ print "\n";
+ }
}
+$opt{'run_awl_sql_tests'} = bool($opt{'run_awl_sql_tests'});
+
if ($opt{'run_awl_sql_tests'}) {
my $user_awl_dsn = prompt("SQL AWL DSN (user_awl_dsn): ", "dbi:mysql:spamassassin:localhost");
my $user_awl_sql_username = prompt("SQL AWL DB username (user_awl_sql_username): ", "");
@@ -395,14 +402,16 @@ else {
}
if (HAS_DBI) {
- $opt{'run_bayes_sql_tests'} = prompt(
- "Run Bayes SQL storage tests during 'make test' (additional\n".
- "information required)? (y/n)", 'n');
- print "\n";
-
- $opt{'run_bayes_sql_tests'} = bool($opt{'run_bayes_sql_tests'});
+ if (!defined $opt{'run_bayes_sql_tests'}) {
+ $opt{'run_bayes_sql_tests'} = prompt(
+ "Run Bayes SQL storage tests during 'make test' (additional\n".
+ "information required)? (y/n)", 'n');
+ print "\n";
+ }
}
+$opt{'run_bayes_sql_tests'} = bool($opt{'run_bayes_sql_tests'});
+
if ($opt{'run_bayes_sql_tests'}) {
my $bayes_sql_dsn = prompt("Bayes SQL DSN (bayes_sql_dsn): ", "dbi:mysql:spamassassin:localhost");
my $bayes_sql_username = prompt("Bayes SQL DB username (bayes_sql_username): ", "");
@@ -1144,17 +1153,18 @@ qmail/qmail-spamc$(EXE_EXT): spamc/qmail
conf__install:
- -$(MKPATH) $(B_CONFDIR)
- $(PERL) -MFile::Spec -MFile::Copy \
+ -$(BSD_INSTALL_DATA_DIR) $(B_CONFDIR)
+ @ # manage local.cf and init.pre 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};"
- $(PERL) -MFile::Spec -MFile::Copy \
+ @ # $(PERL) -MFile::Spec -MFile::Copy \
-e "copy(q{rules/init.pre}, q{$(B_CONFDIR)/init.pre}) unless -f q{$(B_CONFDIR)/init.pre};"
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) $(DATAFILES)
- $(CHMOD) $(PERM_RWX) $(B_DATADIR)
+ @ # $(CHMOD) $(PERM_RWX) $(B_DATADIR)
text_html_doc: made-doc-stamp
$(NOOP)
|