ad6aca0a142d520a235b54cba874f832ed3f8fca
[webpac2] / Makefile.PL
1 use strict;
2 use warnings;
3 #use ExtUtils::MakeMaker;
4 use inc::Module::Install;
5
6
7 name    'WebPAC';
8 version '2.32';
9 license 'GPL';
10
11 requires        'YAML';
12 requires        'File::Slurp';
13 requires        'Log::Log4perl' => '1.02';
14 requires        'Cwd';
15 requires        'Storable';
16 requires        'DBM::Deep';
17 #       'Template';
18 requires        'Time::HiRes';
19 requires        'File::Temp';
20 requires        'List::Util';
21 requires        'Encode';
22 requires        'LWP';
23 requires        'File::Path';
24 requires        'Biblio::Isis' => '0.24';
25 requires        'MARC::Fast' => '0.09';
26 requires        'List::Util';
27 requires        'Spreadsheet::ParseExcel';
28 requires        'MARC::Record' => '2.0';
29 requires        'Data::Dump';
30 requires        'MARC::Lint' => '1.43';
31 requires        'Business::ISBN' => '2.02';     # WebPAC::Normalize::ISBN
32 requires        'Proc::Queue';
33 requires        'PPI';
34 requires        'XML::LibXML';
35 requires        'Pod::Usage';
36 requires        'Class::Accessor';
37 requires        'JSON';
38 requires        'File::Spec';
39 requires        'Sort::External';
40
41 features(
42         'WebPAC::Input::XML' => [
43                 -default => 0,
44                 recommends('XML::Simple'),
45                 recommends('File::Find'),
46         ],
47 );
48
49 features(
50         'WebPAC::Input::PDF' => [
51                 -default => 0,
52                 recommends('CAM::PDF'),
53         ],
54 );
55
56 features(
57         'WebPAC::Output::Estraier' => [
58                 -default => 0,
59                 recommends('Search::Estraier' => 0.06),
60         ],
61 );
62
63
64 build_requires 'Test::More';
65
66 clean_files('WebPAC-* pod2html Makefile tags');
67
68 auto_install;
69
70 WriteAll;
71
72 sub MY::postamble {
73         return <<'MAKE_MORE';
74
75 HTML_DIR=pod2html
76 # no need to include --limit here!
77 #profile_perl=./run.pl --only ffps --stats
78 #profile_perl=./run.pl --only ffps/libri --validate conf/validate/ffps-libri
79 #profile_perl=./run.pl --only ffps --validate-delimiters conf/validate/delimiters/ffps
80 profile_perl=./run.pl --only ffps --validate conf/validate/ffps-libri --validate-delimiters conf/validate/delimiters/ffps
81
82
83 html: $(TO_INST_PM)
84         test -e $(HTML_DIR) && rm -Rf "$(HTML_DIR)" || true
85         mkdir "$(HTML_DIR)"
86
87         # add additional html documents
88         test ! -z "`which svn2html.pl`" && svk update && svn2html.pl > $(HTML_DIR)/Changes.html || true
89
90         test -e $(HTML_DIR)/pod.css || ln -s ../pod.css $(HTML_DIR)/
91
92         test ! -z "`which allpod2xhtml.pl`" && allpod2xhtml.pl --frames="WebPAC documentation" --existing --css=pod.css ./lib $(HTML_DIR)
93
94 changelog:
95         svn update && svn -v log > Changes
96
97 tags:
98         ctags *.p[ml] */*.p[ml] */*/*.p[ml]
99
100 sf:
101         svn2cvs.pl file:///home/dpavlin/private/svn/webpac2/trunk/ :ext:dpavlin@webpac.cvs.sourceforge.net:/cvsroot/webpac webpac2
102
103 config_yml:
104         test ! -e conf/config.yml && ln -s /data/Webpacus/config.yml conf/ || true
105         #perl -c conf/normalize/*.pl
106         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 {}
107
108 run: config_yml
109         rm -f log
110         ./run.pl --clean --limit 100
111
112 full: config_yml
113         rm -f log
114         ./run.pl
115
116 profile: all
117         perl -d:DProf $(profile_perl) --limit 250 && dprofpp -O 50 > profile.`perl -e 'my @p = glob("profile.[0-9]*"); print scalar @p + 1'`
118
119 profile2:
120         perl -d:SmallProf $(profile_perl) --limit 100 && sort -k 2nr,2 smallprof.out | vi -R -
121
122 MAKE_MORE
123 }