X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=Makefile.PL;h=5c0807fca411fa908cdabd1a409b8df357e71ad8;hb=640203e47fc3ef06a8b73b01bdb9ee76a2baa569;hp=3a69c09b58d85f5f627ccc2723f4a5de6b0460eb;hpb=c21d1e1d4bfd5eb501d19ff6336427dd89998236;p=webpac2 diff --git a/Makefile.PL b/Makefile.PL index 3a69c09..5c0807f 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,43 +1,102 @@ use strict; use warnings; -use ExtUtils::MakeMaker; - -WriteMakefile( - NAME => 'WebPAC', - AUTHOR => 'Dobrica Pavlinusic ', - VERSION_FROM => 'lib/WebPAC.pm', - ABSTRACT_FROM => 'lib/WebPAC.pm', - PL_FILES => {}, - PREREQ_PM => { - 'Test::More' => 0, - 'Config::Tiny' => 0, - 'File::Slurp' => 0, - 'Log::Log4perl' => 0, - 'Data::Dumper' => 0, - 'Cwd' => 0, - 'Text::Iconv' => 0, - 'Storable' => 0, - 'DBM::Deep' => 0, - 'XML::Simple' => 0, - 'Template' => 0, - 'Time::HiRes' => 0, - 'File::Temp' => 0, - 'List::Util' => 0, - }, - dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', }, - clean => { FILES => 'WebPAC-* pod2html Makefile tags' }, +#use ExtUtils::MakeMaker; +use inc::Module::Install; + + +name 'WebPAC'; +version '2.34'; +license 'GPL'; + +requires 'YAML'; +requires 'File::Slurp'; +requires 'Log::Log4perl' => '1.02'; +requires 'Cwd'; +requires 'Storable'; +#requires 'DBM::Deep'; +# 'Template'; +requires 'Time::HiRes'; +requires 'File::Temp'; +requires 'List::Util'; +requires 'Encode'; +requires 'LWP'; +requires 'File::Path'; +requires 'Biblio::Isis' => '0.24'; +requires 'MARC::Fast' => '0.09'; +requires 'List::Util'; +requires 'MARC::Record' => '2.0'; +requires 'Data::Dump'; +requires 'MARC::Lint' => '1.43'; +requires 'Business::ISBN' => '2.02'; # WebPAC::Normalize::ISBN +requires 'PPI'; +requires 'XML::LibXML'; +requires 'Pod::Usage'; +requires 'Class::Accessor'; +requires 'JSON'; +requires 'File::Spec'; +requires 'Sort::External'; + +features( + 'WebPAC::Input::XML' => [ + -default => 0, + 'XML::Simple', + 'File::Find', + ], + 'WebPAC::Input::PDF' => [ + -default => 0, + 'CAM::PDF', + ], + 'WebPAC::Input::Excel' => [ + -default => 1, + 'Spreadsheet::ParseExcel', + ], + 'WebPAC::Output::Estraier' => [ + -default => 0, + 'Search::Estraier' => 0.06, + ], + 'WebPAC::Output::Webpacus and WebPAC::Output::Jifty' => [ + -default => 0, + 'Jifty', + ], + 'WebPAC::Output::Excel' => [ + -default => 1, + 'Spreadsheet::WriteExcel' => 2.14, + ], + 'Parallel execution (probably broken)' => [ + -default => 0, + 'Proc::Queue', + ], ); +build_requires 'Test::More'; + +clean_files('WebPAC-* pod2html Makefile tags'); + +auto_install; + +WriteAll; + sub MY::postamble { return <<'MAKE_MORE'; HTML_DIR=pod2html +# no need to include --limit here! +#profile_perl=./run.pl --only ffps --stats +#profile_perl=./run.pl --only ffps/libri --validate conf/validate/ffps-libri +#profile_perl=./run.pl --only ffps --validate-delimiters conf/validate/delimiters/ffps +profile_perl=./run.pl --only ffps --validate conf/validate/ffps-libri --validate-delimiters conf/validate/delimiters/ffps + html: $(TO_INST_PM) - test -e $(HTML_DIR) || mkdir $(HTML_DIR) + test -e $(HTML_DIR) && rm -Rf "$(HTML_DIR)" || true + mkdir "$(HTML_DIR)" + + # add additional html documents + test ! -z "`which svn2html.pl`" && svk update && svn2html.pl > $(HTML_DIR)/Changes.html || true - test ! -z "`which allpod2xhtml.pl`" && allpod2xhtml.pl ./lib $(HTML_DIR) - test ! -z "`which svn2html.pl`" && svn update && svn2html.pl > $(HTML_DIR)/Changes.html + test -e $(HTML_DIR)/pod.css || ln -s ../pod.css $(HTML_DIR)/ + + test ! -z "`which allpod2xhtml.pl`" && allpod2xhtml.pl --frames="WebPAC documentation" --existing --css=pod.css ./lib $(HTML_DIR) changelog: svn update && svn -v log > Changes @@ -46,8 +105,26 @@ tags: ctags *.p[ml] */*.p[ml] */*/*.p[ml] sf: - svn2cvs.pl file:///home/dpavlin/private/svn/webpac2/trunk/ :ext:dpavlin@cvs.sourceforge.net:/cvsroot/webpac webpac2 + svn2cvs.pl file:///home/dpavlin/private/svn/webpac2/trunk/ :ext:dpavlin@webpac.cvs.sourceforge.net:/cvsroot/webpac webpac2 + +config_yml: + test ! -e conf/config.yml && ln -s /data/Webpacus/config.yml conf/ || true + #perl -c conf/normalize/*.pl + perl -c conf/normalize/*.pl 2>&1 | grep 'conf/normalize' | grep -v 'OK' | sed -e 's#^.*conf/normalize#conf/normalize#' -e 's#,##' | awk '{ print "+" $3 " " $1 }' | xargs -i echo vi {} + +run: config_yml + rm -f log + ./run.pl --clean --limit 100 + +full: config_yml + rm -f log + ./run.pl + +profile: all + perl -d:DProf $(profile_perl) --limit 250 && dprofpp -O 50 > profile.`perl -e 'my @p = glob("profile.[0-9]*"); print scalar @p + 1'` +profile2: + perl -d:SmallProf $(profile_perl) --limit 100 && sort -k 2nr,2 smallprof.out | vi -R - MAKE_MORE }