(travis) Install extra deps for the t/52leaks.t persistency tests
[dbsrgits/DBIx-Class.git] / maint / Makefile.PL.inc / 54_autogen_legalese_and_README.pl
CommitLineData
a2bd3796 1# When a long-standing branch is updated a README may still linger around
2unlink 'README' if -f 'README';
3
4# Makefile syntax allows adding extra dep-specs for already-existing targets,
5# and simply appends them on *LAST*-come *FIRST*-serve basis.
6# This allows us to inject extra depenencies for standard EUMM targets
7
8require File::Spec;
9my $dir = File::Spec->catdir(qw(maint .Generated_Pod));
10my $r_fn = File::Spec->catfile($dir, 'README');
11
12my $start_file = sub {
13 my $fn = $mm_proto->quote_literal(shift);
14 return join "\n",
15 qq{\t\$(NOECHO) \$(RM_F) $fn},
16 ( map { qq(\t\$(NOECHO) \$(ECHO) "$_" >> $fn) } (
17 "DBIx::Class is Copyright (c) 2005-@{[ (gmtime)[5] + 1900 ]} by mst, castaway, ribasushi, and others.",
18 "See AUTHORS and LICENSE included with this distribution. All rights reserved.",
19 "",
20 )),
21 ;
22};
23
24postamble <<"EOP";
25
26clonedir_generate_files : dbic_clonedir_gen_readme
27
28dbic_clonedir_gen_readme : dbic_distdir_gen_dbic_pod
29@{[ $start_file->($r_fn) ]}
30\tpod2text $dir/lib/DBIx/Class.pod >> $r_fn
31
32create_distdir : dbic_distdir_regen_license
33
34dbic_distdir_regen_license :
35@{[ $start_file->( File::Spec->catfile( Meta->name . '-' . Meta->version, 'LICENSE') ) ]}
36\t@{[ $mm_proto->oneliner('cat', ['-MExtUtils::Command']) ]} LICENSE >> \$(DISTVNAME)/LICENSE
37
38EOP
39
40
41# keep the Makefile.PL eval happy
421;