first draft for a new stock page
[sgn.git] / Build.PL
blobed9c50c3e5787c913932f38e9dac6cf80b4d3f92
1 use Module::Build;
2 my $class = Module::Build->subclass(
3     class => 'Module::Build::SGNSite',
4     code  => <<'SUBCLASS',
6 # build action just runs make on programs
7 sub ACTION_build {
8    my $self = shift;
9    $self->SUPER::ACTION_build(@_);
10    system "make -C programs";
11    $? and die "make failed\n";
14 # override install to just copy the whole dir into the install_base
15 sub ACTION_install {
16    my $self = shift;
17    $self->SUPER::ACTION_install(@_);
19    my @install_dirs = qw|cgi-bin conf features js mason programs static support_data t |;
21    require File::Spec;
22    my $tgt_dir = File::Spec->catdir($self->install_base,'sgn');
23    mkdir $tgt_dir;
24    system 'cp', '-rl', @install_dirs => $tgt_dir;
25    $? and die "SGN site copy failed\n";
27    #put the documents symlink in place also
28    symlink 'static/documents' => "$tgt_dir/documents"
29     or die "$! symlinking static/documents => $tgt_dir/documents";
32 sub ACTION_clean {
33    shift->SUPER::ACTION_clean(@_);
34    system "make -C programs clean";
35    $? and die "SGN site copy failed\n";
37 SUBCLASS
40 #my $class = 'Module::Build';
41 my $build = $class->new(
43     dist_name          => 'SGN',
44     license            => 'perl',
45     create_makefile_pl => 'passthrough',
47     module_name        => 'SGN::Context',
49     # current version of our core libraries distribution
50     dist_version => '0.1',
51     dist_author  => 'Lukas Mueller',
52     dist_abstract =>
53 'The code and content behind the Sol Genomics Network main website, http://solgenomics.net',
55     recursive_test_files => 1,
57     build_requires => {
58         'Class::MethodMaker' => 0,
60         'File::Temp'           => 0,
61         'HTML::Lint'           => 0,
62         'JSON'                 => 0,
63         'List::Util'           => 0,
64         'Test::More'           => 0,
65         'Test::Most'           => 0,
66         'Test::WWW::Mechanize' => 0,
67         'Test::WWW::Selenium'  => 0,
68         'Test::MockObject'     => 0,
69     },
70     requires => {
71         'perl'                => '5.10.0',
72         'autodie'             => 0,
73         'IPC::System::Simple' => 0,         #< required for autodie :all
74         'Apache::DBI'         => 0,
76         'Bio::Chado::Schema' => '0.05900',
78         'Bio::Root::Version'     => '1.006001',
79         'Bio::Graphics::FeatureFile' => 0,
81         'Cache::File' => 0,
84         'Catalyst::Runtime'                => '5.80024',
85         'Catalyst::Controller::CGIBin'     => '0.029',
86         'Catalyst::Action::RenderView'     => 0,
87         'Catalyst::Plugin::ErrorCatcher'   => 0,
88         'Catalyst::Plugin::ErrorCatcher::Email'
89                                            => 0,
90         'Catalyst::Plugin::StackTrace'     => 0,
91         'Catalyst::Plugin::Static::Simple' => 0,
92         'Catalyst::View::HTML::Mason'      => 0,
93         'Catalyst::View::JavaScript::Minifier::XS'
94                                            => '2.100000',
95         'CatalystX::GlobalContext'         => 0,
97         'CGI'                              => 0,
98         'CGI::Carp::DebugScreen'           => '0.16',
100         'DBIx::Class'             => 0,
101         'DBIx::Connector'         => 0,
102         'File::Flock'             => 0,
103         'File::NFSLock'           => 0,
104         'File::Temp'              => 0,
105         'Number::Bytes::Human'    => '0.07',
106         'GD'                      => 0,
107         'GD::Graph::Map'          => 0,
108         'GD::Graph::points'       => 0,
109         'GD::Text'                => 0,
110         'HTML::Entities'          => 0,
111         'HTML::FormFu'            => 0,
112         'HTML::Mason'             => 0,
113         'IO::String'              => 0,
114         'Image::Size'             => 0,
115         'JSAN::ServerSide'        => '==0.06',
116         'JSON'                    => 0,
117         'JSON::XS'                => '2.24',
118         'JSON::Any'               => 0,
119         'List::Util'              => 0,
120         'LWP::UserAgent'          => 0,
121         'Mail::Sendmail'          => 0,
122         'Math::Round::Var'        => 0,
123         'Memoize'                 => 0,
124         'Module::Build'           => '0.36',
125         'Module::Find'            => 0,
126         'Module::Pluggable::Object' => 0,
127         'Moose'                   => 0,
128         'MooseX::Declare'         => 0,
129         'MooseX::Method::Signatures' => '0.30',
130         'MooseX::Types::Path::Class' => 0,
131         'MooseX::Types::URI'      => 0,
132         'MooseX::Singleton'       => 0,
133         'Number::Format'          => 0,
134         'namespace::autoclean'    => 0,
135         'SOAP::Transport::HTTP'   => 0,
136         'Statistics::Descriptive' => 0,
137         'Storable'                => 0,
138         'Test::More'              => 0,
139         'Test::Class'             => 0,
140         'Test::WWW::Mechanize'    => 0,
141         'Text::ParseWords'        => 0,
142         'Tie::Function'           => 0,
143         'Tie::UrlEncoder'         => 0,
144         'Time::HiRes'             => 0,
145         'Try::Tiny'               => 0,
146         'URI'                     => 0,
147         'URI::Escape'             => 0,
148         'URI::FromHash'           => 0,
149         'XML::Generator'          => 0,
150         'XML::Twig'               => 0,
151         'YAML::Any'               => 0,
152         'File::Slurp'             => 0,
153         'Test::JSON'              => 0,
154         'Test::WWW::Mechanize::Catalyst' => 0,
155     },
157 $build->create_build_script;