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
|
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
# add another target to the installation;
# copy the link dictionary to a known global spot.
sub MY::install {
package MY;
my $dest_dir = '$(PREFIX)/share/txt2html';
my $link_dict = 'txt2html.dict';
my $script = shift->SUPER::install(@_);
$script =~ s/install :: (.*)$/install :: $1 install_link_dictionary/m;
$script .= <<"INSTALL";
install_link_dictionary :
\$(MKPATH) $dest_dir
\$(PERL) -I\$(PERL_ARCHLIB) -I\$(PERL_LIB) -MExtUtils::Command -e cp $link_dict $dest_dir
INSTALL
return $script;
}
WriteMakefile(
'NAME' => 'HTML::TextToHTML',
'DISTNAME' => 'txt2html',
'VERSION_FROM' => 'TextToHTML.pm', # finds $VERSION
'PREREQ_PM' => {
'Getopt::Long' => 0,
'Getopt::ArgvFile' => 0,
'File::Basename' => 0,
'Pod::Usage' => 0,
'Data::Dumper' => 0,
'Test::More' => 0
},
'EXE_FILES' => ['txt2html'],
($] >= 5.005 ? ## Add these new keywords supported since 5.005
(ABSTRACT_FROM => 'txt2html', # retrieve abstract from module
AUTHOR => 'Kathryn Andersen') : ()),
);
|