forked from bucardo/bucardo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.PL
94 lines (86 loc) · 3.82 KB
/
Makefile.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
use ExtUtils::MakeMaker;
use strict;
use warnings;
use 5.008003;
## No version.pm for this one, as the prereqs are not loaded yet.
my $VERSION = '5.6.0';
WriteMakefile(
NAME => 'Bucardo',
clean => { FILES => 'log.bucardo.* *~ *.tmp outgoingmail.* bucardo_test_database*/ test.sqlite.db' },
ABSTRACT => 'Postgres asynchronous multi-master replication system',
AUTHOR => 'Greg Sabino Mullane <[email protected]>',
LICENSE => 'BSD',
PREREQ_PM => {
'CGI' => '0',
'DBD::Pg' => '2.0',
'DBI' => '1.51',
'DBIx::Safe' => '1.2.4',
'Encode::Locale' => '0',
'ExtUtils::MakeMaker' => '6.32',
'File::Spec' => '0',
'IO::Handle' => '1.24',
'List::Util' => '0',
'MIME::Base64' => '0',
'Net::SMTP' => '0',
'Pod::Parser' => '0',
'Pod::Usage' => '0',
'Sys::Hostname' => '1.11',
'Sys::Syslog' => '0.13',
'Test::Harness' => '2.03',
'Test::More' => '0.61',
'Time::HiRes' => '0',
},
NO_META => 1,
NEEDS_LINKING => 0,
VERSION_FROM => 'Bucardo.pm',
EXE_FILES => ['bucardo'],
MAN1PODS => { 'bucardo' => 'blib/man1/bucardo.1pm' },
NORECURS => 1,
META_MERGE => {
resources => {
repository => 'https://github.com/bucardo/bucardo',
},
},
);
package MY;
sub clean {
my $string = shift->SUPER::clean(@_);
$string =~ s{\t}{\tperl t/98-cleanup\.t\n\t};
$string .= qq{\n\nhtml : \n\t};
$string .= qq{\t\$(NOECHO) pod2html Bucardo.pm > Bucardo.pm.html\n};
$string .= qq{\t\$(NOECHO) pod2html bucardo > bucardo.html\n};
$string .= qq{\t\$(NOECHO) \$(RM_F) pod*.tmp pm_to_blib\n};
$string .= qq{\t\$(NOECHO) \$(PERL) -pi -e "s/<link.*?>//" Bucardo.pm.html bucardo.html\n};
$string .= qq{\t\$(NOECHO) \$(PERL) -pi -e "s~\\`\\`(.+?)''~"\\1"~g" Bucardo.pm.html bucardo.html\n};
$string .= qq{\t\$(NOECHO) \$(ECHO) Created Bucardo.pm.html and bucardo.html\n};
return $string;
}
sub blibdirs {
my $string = shift->SUPER::blibdirs_target(@_);
$string = qq{INST_SHARE = blib/share\n\n$string};
$string =~ s{(blibdirs : .+)}{$1 \$(INST_SHARE)\$(DFSEP).exists};
$string .= qq{\$(INST_SHARE)\$(DFSEP).exists :: Makefile.PL\n};
$string .= qq{\t\$(NOECHO) \$(MKPATH) \$(INST_SHARE)\n};
$string .= qq{\t\$(NOECHO) \$(CHMOD) 755 \$(INST_SHARE)\n};
$string .= qq{\t\$(NOECHO) \$(TOUCH) \$(INST_SHARE)\$(DFSEP).exists\n};
$string .= qq{\t\$(CP) bucardo.schema \$(INST_SHARE)/bucardo.schema\n};
$string .= qq{\t-\$(NOECHO) \$(CHMOD) \$(PERM_RW) \$(INST_SHARE)/bucardo.schema\n};
return $string;
}
sub install {
my $string = shift->SUPER::install(@_);
my $vars = qq{DESTINSTALLSHARE = \$(INSTALL_BASE)/usr/local/share/bucardo\n};
$vars .= qq{DESTINSTALLSITESHARE = \$(INSTALL_BASE)/usr/local/share/bucardo\n};
$vars .= qq{DESTINSTALLVENDORSHARE = \$(INSTALL_BASE)/usr/share/bucardo\n};
if ($ENV{INSTALL_BUCARDODIR}) {
for my $dir (qw{SCRIPT LIB MAN1DIR MAN3DIR}) {
$vars .= qq{INSTALLSITE$dir=$ENV{INSTALL_BUCARDODIR}\n};
}
for my $dir (qw{SITEARCH ARCHLIB SITESHARE}) {
$vars .= qq{DESTINSTALL$dir=$ENV{INSTALL_BUCARDODIR}\n};
}
}
$string = "\n$vars\n$string";
$string =~ s{(\t"?\$\(INST_BIN\)"? "?\$\((DESTINSTALL.*?)BIN.+)"?}{$1\n\t\t\$(INST_SHARE) \$($2SHARE) \\}g;
return $string;
}