Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 161 lines (112 sloc) 3.594 kB
e2962a0 @ac0v init
ac0v authored
1 #!/usr/bin/perl
75c157b @pjcj Change Maekfile.PL to ExtUtils::MakeMaker.
authored
2
3 use strict;
4 use warnings;
5
6 require 5.012_002;
7
dd6e8d0 @pjcj Test with Catalyst server by default.
authored
8 # use inc::Module::Install;
9 # use Module::Install::Catalyst;
10
11 # name 'PF2K7';
12 # all_from 'lib/PF2K7.pm';
13
14 # requires 'Catalyst::Runtime' => '5.80028';
15 # requires 'Catalyst::Plugin::ConfigLoader';
16 # requires 'Catalyst::Plugin::Static::Simple';
17 # requires 'Catalyst::Action::RenderView';
18 # requires 'Catalyst::Engine::PSGI';
19 # requires 'Moose';
20 # requires 'namespace::autoclean';
21 # requires 'Config::General';
22
23 # test_requires 'Test::More' => '0.88';
24 # catalyst;
25
26 # install_script glob('script/*.pl');
27 # auto_install;
28 # WriteAll;
29
30 # __END__
31
75c157b @pjcj Change Maekfile.PL to ExtUtils::MakeMaker.
authored
32 use ExtUtils::MakeMaker;
33 use ExtUtils::Manifest "maniread";
34
35 my $Version = "1.01";
36 my $Email = 'uea-pf2k7@pjcj.net';
37 my $Dist = "PF2K7";
38 my $Top = "lib/PF2K7.pm";
39 my @Files = sort keys %{maniread()};
40 my $Perlbug = join " ", map { / / ? "'$_'" : $_ }
41 "perlbug", "-a", $Email,
42 "-s", "Installation of $Dist $Version";
43 my $Readcmd = <<"EOC";
44 TERMCAP= COLUMNS=80 pod2text -s $Top | \\
45 \$(PERL) -n \\
46 -e 'print if (/NAME/ ... /^[A-Z ]+\$\$/) =~ /^\\d+\$\$/;' \\
47 -e 'print if (/SYNOPSIS/ ... /^[A-Z ]+\$\$/) =~ /^\\d+\$\$/;' \\
48 -e 'print if (/DESCRIPTION/ ... /^[A-Z ]+\$\$/) =~ /^\\d+\$\$/;' \\
49 -e 'print if (/REQUIREMENTS/ ... /^[A-Z ]+\$\$/) =~ /^\\d+\$\$/;' \\
50 > \$(DISTVNAME)/README
51 EOC
52
53 WriteMakefile
54 (
55 NAME => $Dist,
56 VERSION => $Version,
57 AUTHOR => "PEM ($Email)",
58 ABSTRACT => "PF2K7 - Plat_Forms 2007",
59 DIR => [],
60 dist => { COMPRESS => "gzip --best --force",
61 PREOP => $Readcmd },
62 clean => { FILES => "t/TEST" },
63 depend => { distdir => "@Files" },
64 test => { TESTS => "t/*/*.t" },
65 );
66
195e652 @pjcj Add controllers and initial page.
authored
67 sub MY::libscan { $_[1] =~/^blib/ && $_[1] !~ /\.pm$/ ? undef : $_ }
75c157b @pjcj Change Maekfile.PL to ExtUtils::MakeMaker.
authored
68
69 sub MY::postamble
70 {
71 qq[
72 tags : @Files
73 \t ptags @Files
74
75 mani :
76 \t rm MANIFEST; \$(MAKE) manifest
77
ea46a04 @pjcj Add dev_server target.
authored
78 dev_server : pure_all
a8f29b7 @pjcj Debugging off by default.
authored
79 \t \$(PERL) script/pf2k7_server.pl -d -f
ea46a04 @pjcj Add dev_server target.
authored
80
75c157b @pjcj Change Maekfile.PL to ExtUtils::MakeMaker.
authored
81 start_server :
82 \t \$(PERL) utils/makeh start_server
83
84 stop_server :
85 \t \$(PERL) utils/makeh stop_server
86
87 show_servers :
88 \t \$(PERL) utils/makeh show_servers
89
90 restart_server :
91 \t \$(PERL) utils/makeh restart_server
92
dd6e8d0 @pjcj Test with Catalyst server by default.
authored
93 export HARNESS_OPTIONS := j4:c
94 export HARNESS_TIMER := 1
95 export TEST_POD := 0
75c157b @pjcj Change Maekfile.PL to ExtUtils::MakeMaker.
authored
96
97 tv :
dd6e8d0 @pjcj Test with Catalyst server by default.
authored
98 \t \$(MAKE) test TEST_VERBOSE=1 HARNESS_OPTIONS=j1:c CATALYST_DEBUG=1
75c157b @pjcj Change Maekfile.PL to ExtUtils::MakeMaker.
authored
99
100 td :
101 \t \$(MAKE) test PF_DB_TEST=1
102
103 tvd :
dd6e8d0 @pjcj Test with Catalyst server by default.
authored
104 \t \$(MAKE) test TEST_VERBOSE=1 PF_DB_TEST=1 HARNESS_OPTIONS=j1:c CATALYST_DEBUG=1
105
106 stest :: pure_all restart_server
107 \t CATALYST_SERVER=http://127.0.0.1:\$(shell cat utils/PORT)/ PERL_DL_NONLAZY=1 \$(FULLPERLRUN) "-MExtUtils::Command::MM" "-e" "test_harness(\$(TEST_VERBOSE), '\$(INST_LIB)', '\$(INST_ARCHLIB)')" \$(TEST_FILES)
75c157b @pjcj Change Maekfile.PL to ExtUtils::MakeMaker.
authored
108
109 cover : pure_all
110 \t PF_COVER=1 HARNESS_OPTIONS=j4:c cover -test -report html_basic
111
112 ok :
113 \t \@$Perlbug -okay || echo "Please send your report manually to $Email"
114
115 nok :
116 \t \@$Perlbug -nokay || echo "Please send your report manually to $Email"
117 ]
118 }
119
120 __END__
121
122 =head1 NAME
123
124 Makefile.PL - Create Makefile for PF
125
126 =head1 SYNOPSIS
127
128 perl Makefile.PL
129
130 =head1 DESCRIPTION
131
132 Creates the Makefile for PF.
133
134 =head1 EXIT STATUS
135
136 The following exit values are returned:
137
138 0 All operations were completed successfully.
139
140 >0 An error occurred.
141
142 =head1 SEE ALSO
143
144 =head1 BUGS
145
146 =head1 VERSION
147
148 See $Version
149
150 =head1 AUTHOR
151
152 Paul Johnson
153
154 =head1 LICENSE
155
156 Copyright 2010, Paul Johnson (paul@pjcj.net)
157
158 # This software is free. It is licensed under the same terms as Perl itself.
159
160 =cut
Something went wrong with that request. Please try again.