@@ -3,8 +3,19 @@ use strict;
3
3
use warnings;
4
4
use Config;
5
5
use ExtUtils::MakeMaker;
6
+ use File::Spec;
6
7
7
- # Get the filename of the Perl interpreter running this. Modified from perlvar.
8
+ my $VERSION_FROM = File::Spec-> catfile(qw( lib XML Axk.pm) );
9
+ # Module metadata {{{1
10
+ my $provides ;
11
+ eval {
12
+ require Module::Metadata;
13
+ $provides = Module::Metadata-> provides(version => ' 2' , dir => ' lib' );
14
+ # Thanks to https://stackoverflow.com/a/28928985/2877364 by LEONT
15
+ };
16
+ # }}}1
17
+ # Get the filename of the Perl interpreter running this. {{{1
18
+ # Modified from perlvar.
8
19
# The -x test is for cygwin or other systems where $Config{perlpath} has no
9
20
# extension and $Config{_exe} is nonempty. E.g., symlink perl->perl5.10.1.exe.
10
21
# There is no "perl.exe" on such a system.
@@ -17,9 +28,11 @@ sub get_perl_filename {
17
28
}
18
29
return $secure_perl_path ;
19
30
} # get_perl_filename()
31
+ # }}}1
20
32
21
33
my $secure_perl_path = get_perl_filename();
22
34
35
+ # Makefile customization {{{1
23
36
sub MY ::postamble { # TODO also handle Windows nmake syntax (SET vs. export)
24
37
return <<EOT ;
25
38
@@ -52,18 +65,21 @@ testhere: actually_uninstall
52
65
EOT
53
66
54
67
} # postamble
68
+ # }}}1
55
69
56
- WriteMakefile(
70
+ # Main options for EUMM
71
+ my %opts = (
57
72
NAME => ' XML::Axk' ,
58
73
AUTHOR => q{ Christopher White <[email protected] >} ,
59
- VERSION_FROM => ' lib/XML/Axk/App.pm ' ,
74
+ VERSION_FROM => $VERSION_FROM ,
60
75
ABSTRACT => ' awk-like XML processor' ,
61
76
LICENSE => ' artistic_2' ,
62
- EXE_FILES => [ ' bin/ axk' ],
77
+ EXE_FILES => [ File::Spec -> catfile( qw( bin axk) ) ],
63
78
MIN_PERL_VERSION => ' 5.020' ,
64
79
CONFIGURE_REQUIRES => {
65
80
' Config' => ' 0' ,
66
81
' ExtUtils::MakeMaker' => ' 0' ,
82
+ ' File::Spec' => ' 0' ,
67
83
' strict' => ' 0' ,
68
84
' version' => ' 0.77' ,
69
85
' warnings' => ' 0' ,
@@ -107,5 +123,34 @@ WriteMakefile(
107
123
dist => { COMPRESS => ' gzip -9f' , SUFFIX => ' gz' , },
108
124
clean => { FILES => ' XML-Axk-*' },
109
125
depend => { Makefile => ' $(VERSION_FROM)' },
126
+
127
+ META_MERGE => {
128
+ ' meta-spec' => { version => 2 },
129
+
130
+ resources => {
131
+ bugtracker => {
132
+ web => ' https://github.com/interpreters/axk/issues' ,
133
+ },
134
+ repository => {
135
+ type => ' git' ,
136
+ url => ' https://github.com/interpreters/axk.git' ,
137
+ web => ' https://github.com/interpreters/axk' ,
138
+ },
139
+ },
140
+
141
+ prereqs => {
142
+ develop => {
143
+ requires => {
144
+ ' App::RewriteVersion' => ' 0' , # for perl-bump-version
145
+ ' Module::Metadata' => ' 1.000016' ,
146
+ },
147
+ },
148
+ },
149
+
150
+ $provides ? (provides => $provides ) : (),
151
+
152
+ }, # META_MERGE
110
153
);
111
- # vi: set ts=4 sts=4 sw=4 et ai: #
154
+
155
+ WriteMakefile(%opts );
156
+ # vi: set ts=4 sts=4 sw=4 et ai fdm=marker: #
0 commit comments