forked from hookbot/File-NFSLock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.PL
53 lines (42 loc) · 943 Bytes
/
Makefile.PL
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
use ExtUtils::MakeMaker;
WriteMakefile
NAME => "File::NFSLock",
AUTHOR => "Paul Seamons",
ABSTRACT_FROM => "lib/File/NFSLock.pm",
VERSION_FROM => "lib/File/NFSLock.pm",
PREREQ_PM => { # e.g., 'Module::Name' => 1.1
},
dist => {
DIST_DEFAULT => 'all tardist',
COMPRESS => 'gzip -vf',
SUFFIX => '.gz',
},
clean => {
FILES => '*~',
},
realclean => {
FILES => '*~',
},
;
package MY;
sub processPL {
my $self = shift;
my $block = $self->SUPER::processPL(@_);
# "Version:" in spec needs to match
# "$VERSION" from VERSION_FROM
$block =~ s%(spec.PL\s*)$%$1 \$\(VERSION_FROM\)%m;
$block;
}
sub libscan {
my $self = shift;
my $path = shift;
($path =~ / \bCVS\b | \~$ /x) ? undef : $path;
}
sub postamble {
return qq^
pm_to_blib: README
README: \$(VERSION_FROM)
pod2text \$(VERSION_FROM) > README
^;
}
1;