-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild_site.pl
89 lines (68 loc) · 2.51 KB
/
build_site.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
use 5.008008;
use utf8;
use strict;
use warnings FATAL => 'all';
use lib 'lib';
use Local::Padre::Website::Builder qw(); # about Local:: see perlmodlib
my $self = Local::Padre::Website::Builder->new(
module_name => 'Local::Padre::Website::Builder',
build_requires => {
'perl' => '5.010',
'autodie' => 0,
'Capture::Tiny' => 0,
'Encode' => 0,
'File::Copy' => 0,
'File::Next' => 0,
'File::Which' => 0,
'Module::Build' => '0.26',
'Path::Class' => 0,
'Pod::Xhtml' => 0,
'Template' => 0,
'Test::More' => '0.87_01',
'Text::Unaccent::PurePerl' => 0,
'Time::Piece' => 0,
'XML::LibXML' => 0,
'XML::LibXSLT' => 0,
'YAML::Tiny' => 0,
},
dist_author => 'Padre team',
dist_abstract => 'Padre website generator',
);
die "Mandatory parameter --destdir was not specified.\n" unless $self->destdir;
die "Mandatory parameter --sourcedir was not specified.\n" unless $self->args->{sourcedir};
$self->config_data( sourcedir => $self->args->{sourcedir} );
$self->config_data( base => $self->args->{base} ) if $self->args->{base};
$self->create_build_script;
print "You can run ./Build now.\n";
__END__
=head1 NAME
Build.PL - build the web site at padre.perlide.org
=head1 SYNOPSIS
perl Build.PL --sourcedir . --destdir ~/public_html/padre.perlide.org
./Build
./Build test
./Build install
./Build realclean
=head1 OPTIONS
=over
=item --sourcedir
Mandatory. Specifies the name of the base directory where the web site
templates, static files and source data are located.
This is the checked out local working copy coming from the SVN path
L<https://github.com/PadreIDE/template.padre.perlide.org>.
=item --destdir
Mandatory. Specifies the name of the directory where the web site files
are output after the build.
This directory already needs to exists.
=item --base
Optional. Specifies the target of the XHTML base link. Useful for off-line
testing. Sample values are C<http://padre.perlide.org/> or
C<file:///var/tmp/out/> (URI-fied version of L</"--destdir">).
Default is nothing; no C<base> element will be written.
=back
=head1 DESCRIPTION
C<Build.PL>, employing a subclass of Module::Build, creates a F<Build> file.
The F<Build> file is used to build, test and release the files for the web site
at L<http://padre.perlide.org>.
=head1 SEE ALSO
L<Local::Padre::Website::Builder>