Debian Codegraph @

Makefile.PL

raw symbols SCIP
1 use ExtUtils::MakeMakerscip-perl cpan pgBadger 13.2 ExtUtils/MakeMaker/;
2 # See lib/ExtUtils/MakeMaker.pm for details of how to influence
3 # the contents of the Makefile that is written.
4
5 use strictscip-perl cpan pgBadger 13.2 strict/;
6
7 my @ALLOWED_ARGS = ('INSTALLDIRS','DESTDIR');
8
9 # Parse command line arguments and store them as environment variables
10 while ($_scip-perl cpan pgBadger 13.2 main/$_. = shiftscip-perl cpan pgBadger 13.2 main/shift().) {
11 my ($k,$v) = splitscip-perl cpan pgBadger 13.2 main/split().(/=/, $_scip-perl cpan pgBadger 13.2 main/$_., 2);
12 if (grepscip-perl cpan pgBadger 13.2 main/grep().(/^$k$/, @ALLOWED_ARGS)) {
13 $ENVscip-perl cpan pgBadger 13.2 main/`%ENV`.{$k} = $v;
14 }
15 }
16 $ENVscip-perl cpan pgBadger 13.2 main/`%ENV`.{DESTDIR} =~ s/\/$//;
17
18 # Default install path
19 my $DESTDIR = $ENVscip-perl cpan pgBadger 13.2 main/`%ENV`.{DESTDIR} || '';
20 my $INSTALLDIRS = $ENVscip-perl cpan pgBadger 13.2 main/`%ENV`.{INSTALLDIRS} || 'site';
21 my %merge_compat = ();
22
23 if ($ExtUtils::MakeMaker::VERSIONscip-perl cpan pgBadger 13.2 ExtUtils/MakeMaker/$VERSION. >= 6.46) {
24 %merge_compat = (
25 'META_MERGE' => {
26 resources => {
27 homepage => 'http://pgbadger.darold.net/',
28 repository => {
29 type => 'git',
30 git => '[email protected]:darold/pgbadger.git',
31 web => 'https://github.com/darold/pgbadger',
32 },
33 },
34 }
35 );
36 }
37
38 sub MY::postamblescip-perl cpan pgBadger 13.2 main/`MY::postamble`(). {
39 return <<'EOMAKE';
40 USE_MARKDOWN=$(shell which pod2markdown)
41
42 README: doc/pgBadger.pod
43 pod2text $^ > $@
44 ifneq ("$(USE_MARKDOWN)", "")
45 cat doc/pgBadger.pod | grep "=head1 " | sed 's/^=head1 \(.*\)/- [\1](#\1)/' | sed 's/ /-/g' | sed 's/--/- /' > [email protected]
46 sed -i '1s/^/### TABLE OF CONTENTS\n\n/' [email protected]
47 echo >> [email protected]
48 pod2markdown $^ | sed 's/^## /#### /' | sed 's/^# /### /' >> [email protected]
49 else
50 $(warning You must install pod2markdown to generate README.md from doc/pgBadger.pod)
51 endif
52
53 .INTERMEDIATE: doc/synopsis.pod
54 doc/synopsis.pod: Makefile pgbadger
55 echo "=head1 SYNOPSIS" > $@
56 ./pgbadger --help >> $@
57 echo "=head1 DESCRIPTION" >> $@
58 sed -i.bak 's/ +$$//g' $@
59 rm [email protected]
60
61 .PHONY: doc/pgBadger.pod
62 doc/pgBadger.pod: doc/synopsis.pod Makefile
63 sed -i.bak '/^=head1 SYNOPSIS/,/^=head1 DESCRIPTION/d' $@
64 sed -i.bak '4r $<' $@
65 rm [email protected]
66 EOMAKE
67 }
68
69 WriteMakefilescip-perl cpan pgBadger 13.2 main/WriteMakefile().(
70 'DISTNAME' => 'pgbadger',
71 'NAME' => 'pgBadger',
72 'VERSION_FROM' => 'pgbadger',
73 'dist' => {
74 'COMPRESS'=>'gzip -9f', 'SUFFIX' => 'gz',
75 'ZIP'=>'/usr/bin/zip','ZIPFLAGS'=>'-rl'
76 },
77 'AUTHOR' => 'Gilles Darold ([email protected])',
78 'ABSTRACT' => 'pgBadger - PostgreSQL log analysis report',
79 'EXE_FILES' => [ qw(pgbadger) ],
80 'MAN1PODS' => { 'doc/pgBadger.pod' => 'blib/man1/pgbadger.1p' },
81 'DESTDIR' => $DESTDIR,
82 'INSTALLDIRS' => $INSTALLDIRS,
83 'clean' => {},
84 %merge_compat
85 );