forked from evalEmpire/Alien-SVN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Build.PL
97 lines (78 loc) · 2.36 KB
/
Build.PL
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
#!/usr/bin/perl -w
use strict;
use lib 'inc';
use My::SVN::Builder;
use Config;
my $build = My::SVN::Builder->new(
module_name => 'Alien::SVN',
dist_author => 'Michael G Schwern <[email protected]>',
# perl for Alien::SVN, Apache for subversion and SVN::* modules.
license => 'open_source',
requires => {
perl => '5.8.0',
version => '0.70',
},
build_requires => {
'ExtUtils::MakeMaker' => '6.31', # for INSTALL_BASE
'Module::Build' => '0.28',
'Test::More' => '0.40',
},
configure_requires => {
'Module::Build' => '0.28',
},
no_index => {
directory => [qw(inc src)]
},
meta_merge => {
provides => My::SVN::Builder->_svn_provides(),
resources => {
license => ['http://dev.perl.org/licenses/'],
bugtracker => 'https://github.com/evalEmpire/Alien-SVN/issues',
repository => 'https://github.com/evalEmpire/Alien-SVN/',
},
},
create_readme => 1,
);
$build->create_build_script;
print <<'END';
---------------------------------------------------------------------
This module will build Subversion and install its libraries and Perl
bindings for you.
It requires a C compiler and make.
END
my $make = $build->prompt(
"Which make should I use to build Subversion?",
$Config{make}
);
$build->notes('your_make', $make);
my $run_configure = 'y';
if( -e 'src/subversion/config.status' ) {
$run_configure = $build->prompt(
"Looks like Subversion has already been configured.\n".
"Do you want to re-run configure?",
"n"
);
}
else {
$run_configure = $build->prompt(
"Run Subversion's configure now?", 'y'
);
}
if( $run_configure =~ /^y/i ) {
my $configure_args = $build->prompt(
"\n\nWould you like to pass any arguments to configure?",
$build->_default_configure_args
);
$build->notes("configure_args", $configure_args);
print "\n\nSubversion will now be configured.\n\n";
sleep 1;
if( $build->_run_svn_configure ) {
print "\n\nYou should now run ./Build.\n";
}
else {
die <<'END';
Something went wrong with the Subversion configuration.
Please attempt to correct it and re-run Build.PL.
END
}
}