-
Notifications
You must be signed in to change notification settings - Fork 101
/
Makefile.PL
48 lines (42 loc) · 1.28 KB
/
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
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
use strict;
my @ALLOWED_ARGS = ('INSTALLDIRS','DESTDIR');
# Parse command line arguments and store them as environment variables
while ($_ = shift) {
my ($k,$v) = split(/=/, $_, 2);
if (grep(/^$k$/, @ALLOWED_ARGS)) {
$ENV{$k} = $v;
}
}
$ENV{DESTDIR} =~ s/\/$//;
# Default install path
my $DESTDIR = $ENV{DESTDIR} || '';
my $INSTALLDIRS = $ENV{INSTALLDIRS} || 'site';
WriteMakefile(
'DISTNAME' => 'pgformatter',
'NAME' => 'pgFormatter',
'VERSION_FROM' => 'pg_format',
'dist' => {
'COMPRESS'=>'gzip -9f', 'SUFFIX' => 'gz',
'ZIP'=>'/usr/bin/zip','ZIPFLAGS'=>'-rl'
},
'AUTHOR' => 'Gilles Darold (gilles@darold.net)',
'ABSTRACT' => 'pgFormatter - PostgreSQL SQL and PL/PGSQL syntaxe beautifier',
'EXE_FILES' => [ qw(pg_format) ],
'MAN1PODS' => { 'doc/pg_format.pod' => 'blib/man1/pg_format.1' },
'DESTDIR' => $DESTDIR,
'INSTALLDIRS' => $INSTALLDIRS,
'clean' => {},
'META_MERGE' => {
resources => {
homepage => 'http://sqlformat.darold.net/',
repository => {
type => 'git',
git => 'git@github.com:darold/pgformatter.git',
web => 'https://github.com/darold/pgformatter',
},
},
}
);