BeastBB/Makefile.PL

56 lines
1.8 KiB
Perl

use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'BeastBB',
VERSION => '0.1',
INST_SCRIPT => './bin',
INST_BIN => './bin',
test => { TESTS => 't/*.t t/*/*.t' },
PREREQ_PM => {
'Mojolicious' => 0,
'Mojo::Pg' => 0,
'ExtUtils::MakeMaker' => 0,
'Crypt::URandom' => 0,
'DBD::Pg' => 0,
'DBD::Mock' => 0,
'Const::Fast' => 0,
'Params::ValidationCompiler' => 0,
'Types::Standard' => 0,
'Crypt::Bcrypt::Easy' => 0,
'DateTime' => 0,
'DateTime::Format::Pg' => 0,
'Test::Most' => 0,
'Test::MockModule' => 0,
'Test::Warnings' => 0,
},
);
package MY {
sub install {
my $self = shift;
my $return = $self->SUPER::install(@_);
$return = [ split /\n/, $return ];
for my $i ( keys @$return ) {
$return->[$i] =~ s/::/:: install_frontend_and_migrations/
if $return->[$i] =~ /^install :/;
}
return join "\n", @$return;
}
sub postamble {
return
"\n"
. "install_frontend_and_migrations:\n"
. "\tif [ ! -e lib/BeastBB/public ]; then "
. "mkdir -pv lib/BeastBB/public; " . "fi;"
. "if [ ! -e lib/BeastBB/templates ]; then "
. "mkdir -pv lib/BeastBB/templates; " . "fi; "
. "if [ ! -e lib/BeastBB/migrations ]; then "
. "mkdir -pv lib/BeastBB/migrations; " . "fi; "
. "cp -rfv templates/* lib/BeastBB/templates/; "
. "cp -rfv public/* lib/BeastBB/public/; "
. "cp -rfv migrations/* lib/BeastBB/migrations/; ";
}
}