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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
# -*- perl -*-
use strict;
use warnings;
use ExtUtils::MakeMaker;
use Module::Metadata;
use File::Basename;
WriteMakefile(
NAME => 'mangemanche',
ABSTRACT_FROM => 'lib/App/Mangemanche.pm',
VERSION_FROM => 'lib/App/Mangemanche.pm',
AUTHOR => 'Sergey Poznyakoff <gray@gnu.org>',
LICENSE => 'gpl_3',
EXE_FILES => [ 'mangemanche' ],
MIN_PERL_VERSION => 5.014002,
PREREQ_PM => {
'Getopt::Long' => 2.34,
'DBI' => 0,
'File::Basename' => 0,
'File::Spec' => 0,
'File::Temp' => 0.23,
'Getopt::Long' => 0,
'HTTP::Status' => 6.11,
'JSON' => 2.90,
'Nagios::Config' => 36,
'Pod::Find' => 0,
'Pod::Man' => 0,
'Pod::Usage' => 0
},
META_MERGE => {
'meta-spec' => { version => 2 },
resources => {
repository => {
type => 'git',
url => 'git://git.gnu.org.ua/ping903/mangemanche.git',
web => 'http://git.gnu.org.ua/cgit/ping903/mangemanche.git/',
},
},
provides => Module::Metadata->provides(version => '1.4',
dir => 'lib')
}
);
sub MY::postamble {
my $s = <<'_MAKE_'
all:: subcommand-manpages
.PHONY: subcommand-manpages
subcommand-manpages: manifypods
$(NOECHO) $(ECHO) Generating manpages for the subcommands
$(NOECHO) $(FULLPERLRUN) -pe 's/App::Mangemanche\s+3/mangemanche 1/g;s/App::Mangemanche/mangemanche/g' $(INST_MAN3DIR)/App::Mangemanche.$(MAN3EXT) > $(INST_MAN1DIR)/mangemanche.$(MAN1EXT)
$(NOECHO) $(RM_F) $(INST_MAN3DIR)/App::Mangemanche.$(MAN3EXT)
_MAKE_
;
push @INC, 'lib';
foreach my $file (glob("lib/App/Mangemanche/Command/*.pm")) {
my ($command) = fileparse($file, '.pm');
my $mod = $file;
$mod =~ s{^.*lib/}{};
$mod =~ s{\.pm$}{};
$mod =~ s{/}{::}g;
my $man1file = $command . '.$(MAN1EXT)';
$s .= "\t\$(NOECHO)\$(FULLPERLRUN) -pe 's/$mod\\s+3/$command 1/' \$(INST_MAN3DIR)/$mod.\$(MAN3EXT) > \$(INST_MAN1DIR)/$man1file\n";
$s .= "\t\$(NOECHO)\$(RM_F) \$(INST_MAN3DIR)/$mod.\$(MAN3EXT)\n";
}
pop @INC;
$s .= "\n";
return $s;
}
|