-
Notifications
You must be signed in to change notification settings - Fork 16
/
Build.PL
109 lines (104 loc) · 3.56 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
98
99
100
101
102
103
104
105
106
107
108
109
use 5.22.2;
use strict;
use warnings FATAL => 'all';
use Module::Build::Database 0.47;
BEGIN {
eval qq{
use Module::Build::Mojolicious clean_install => 1;
push \@Module::Build::Database::PostgreSQL::ISA, 'Module::Build::Mojolicious';
};
die $@ if $@;
}
use File::ShareDir qw/dist_dir/;
my $extra = $ENV{POSTGRES_91} ? qq[\ncustom_variable_classes = 'audit'] : "";
open my $fp, '< db/extra/audit.sql' or die "audit.sql :$!";
my $audit_sql = join '', <$fp>;
close $fp;
$audit_sql .= <<MORE;
create extension if not exists isn with schema gcis_metadata;
MORE
my $builder = Module::Build::Database->new(
install_base => '/usr/local/gcis',
database_type => 'PostgreSQL',
database_options => {
name => "gcis",
schema => "gcis_metadata",
after_create => $audit_sql,
append_to_conf => qq[
audit.username = 'unknown'
audit.note = ''
$extra
],
},
module_name => 'Tuba',
license => 'CC0_1_0',
dist_version_from => 'lib/Tuba.pm',
dist_abstract => "The Useful Backend API",
release_status => 'stable',
configure_requires => {
'Module::Build' => '0.39',
#'Module::Build::Mojolicious' => 0, #commented out, dependency inteferes with Mojolicous version -rs
'Module::Build::Database' => '0.58', # No less if postgres >= v9.3.22
'Mojolicious' => '6.08',
#'Mojolicious::Plugin::InstallablePaths' => 0, #commented out, dependency inteferes with Mojolicous version
},
build_requires => {
'Test::More' => 0,
'Module::Build::Mojolicious' => 0,
'Mojolicious::Plugin::InstallablePaths' => 0,
},
requires => {
'LWP::UserAgent' => 0,
'Number::Bytes::Human' => 0,
'Mojolicious::Plugin::YamlConfig' => 0,
'Mojolicious' => '6.08',
'Number::Format' => 0,
'YAML::Syck' => 0,
'YAML::XS' => 0,
'YAML' => 0,
'UUID::Tiny' => 0,
'Rose::DB' => '0.772',
'Rose::DB::Object' => 0,
'DBD::Pg' => '3.003',
'Digest::SHA1' => 0,
'DBIx::Simple' => 0,
'DBIx::Custom' => 0,
'DBIx::Connector' => 0,
'RDF::Trine' => 0,
'RDF::Query' => 0,
'SQL::Abstract' => 0,
'SQL::Interp' => 0,
'Date::Parse' => 0,
'JSON::XS' => 0,
'Algorithm::Permute' => 0,
'JSON::WebToken' => 0,
'Crypt::OpenSSL::RSA' => 0,
'Pg::hstore' => 0,
'Hash::Flatten' => 0,
'Data::Rmap' => 0,
'Sort::Key' => 0,
'Text::CSV_XS' => 0,
'Text::Format' => 0,
'Time::Duration' => 0,
'URI::Find' => 0,
'YAML::XS' => 0,
'String::Diff' => 0,
'DateTime::Format::Human::Duration' => 0,
'Mojolicious::Plugin::InstallablePaths' => 0,
# 'RDF::Trine' => 0,
# 'RDF::Query' => 0,
'IO::Socket::SSL' => 2,
'Lingua::EN::Inflect' => 0,
'Path::Class' => 0,
'Scalar::Util' => 0,
'List::MoreUtils' => '0.427',
'Mojolicious::Plugin::Mail' => 1.5, # supports feedback form - mailing
'Captcha::reCAPTCHA' => 0.99, # supports feedback form - captcha
'LWP::Protocol::https' => 6.07, # supports feedback form - captcha, hidden dep.
'HTML::Restrict' => '2.2.4', # support feedback form - sanitizing input
},
add_to_cleanup => [ 'Tuba-*' ],
create_makefile_pl => 'traditional',
share_dir => { dist => ["lib/Tuba/files"] },
);
$builder->create_build_script();