Makefile.PL 1.86 KB
Newer Older
1
use 5.008;
2
use ExtUtils::MakeMaker;
3

4 5
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
6 7

sub MY::top_targets {
8 9 10
    my $self = shift;
    my $r    = $self->MM::top_targets(@_);
    if ( my $cf = $ENV{LMNGCONFFILE} ) {
11 12 13 14 15
        $r =~ s/^(all.*)$/$1 my_target/m;
        $cf = quotemeta($cf);
        $r .= <<"EOT";

my_target:
16
	perl -i -pe 's/^(use constant DEFAULTCONFFILE\\s*=>).*\$\$/\$\$1 "$cf";/' blib/lib/Lemonldap/NG/Common/Conf/Constants.pm
17 18 19 20 21
EOT
    }
    return $r;
}

22
WriteMakefile(
23 24 25
    NAME           => 'Lemonldap::NG::Common',
    VERSION_FROM   => 'lib/Lemonldap/NG/Common.pm',    # finds $VERSION
    LICENSE        => 'perl',
Xavier Guimard's avatar
Xavier Guimard committed
26
    BUILD_REQUIRES => { 'IO::String' => 0, },
27
    PREREQ_PM      => {
28 29 30 31 32
        'Cache::Cache'           => 0,
        'CGI'                    => 3.08,
        'Config::IniFiles'       => 0,
        'Crypt::Rijndael'        => 0,
        'DBI'                    => 0,
33
        'HTTP::Message'          => 0,
34 35 36 37
        'Regexp::Assemble'       => 0,
        'SOAP::Lite'             => 0,
        'Storable'               => 0,
        'XML::Simple'            => 0,
38 39
        'XML::LibXML'            => 0,
        'XML::LibXSLT'           => 0,
40
        'Test::Pod'              => 1.00,
41 42
        'Crypt::OpenSSL::RSA'    => 0,
        'Crypt::OpenSSL::X509'   => 0,
43
        'Net::CIDR::Lite'        => 0,
44
        'Net::LDAP'              => 0,
45
        'File::Basename'         => 0,
46 47
    },    # e.g., Module::Name => 1.1
          #EXE_FILES => [ 'scripts/convertConfig', ],
48 49 50 51 52 53
    (
        $] >= 5.005
        ?    ## Add these new keywords supported since 5.005
          (
            ABSTRACT_FROM =>
              'lib/Lemonldap/NG/Common.pm',    # retrieve abstract from module
54 55
            AUTHOR =>
'Xavier Guimard <x.guimard@free.fr>, Clément Oudot <clement@oodo.net>'
56 57 58
          )
        : ()
    ),
59
);