Makefile.PL 3.01 KB
Newer Older
Xavier Guimard's avatar
Xavier Guimard committed
1
use 5.014;
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
    NAME           => 'Lemonldap::NG::Common',
    VERSION_FROM   => 'lib/Lemonldap/NG/Common.pm',    # finds $VERSION
25
    LICENSE        => 'gpl',
Xavier Guimard's avatar
Xavier Guimard committed
26
    BUILD_REQUIRES => {
Xavier Guimard's avatar
Xavier Guimard committed
27 28 29
        'IO::String' => 0,
        'Net::LDAP'  => 0,
        'Test::Pod'  => 1.00,
Xavier Guimard's avatar
Xavier Guimard committed
30 31 32
    },
    META_MERGE => {
        'recommends' => {
33
            'Apache::Session::Browseable' => 0,
Xavier Guimard's avatar
Xavier Guimard committed
34
            'Convert::Base32'             => 0,
35
            'Cookie::Baker::XS'           => 0,
Xavier Guimard's avatar
Xavier Guimard committed
36
            'DBI'                         => 0,
37
            'Net::LDAP'                   => 0,
Xavier Guimard's avatar
Xavier Guimard committed
38 39
            'SOAP::Lite'                  => 0,
            'LWP::Protocol::https'        => 0,
Xavier Guimard's avatar
Xavier Guimard committed
40
        },
Xavier Guimard's avatar
Xavier Guimard committed
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
        resources => {
            repository => {
                url  => 'https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng.git',
                web  => 'https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng',
                type => 'git',
            },
            MailingList => 'mailto:lemonldap-ng-dev@ow2.org',
            license     => 'http://opensource.org/licenses/GPL-2.0',
            homepage    => 'http://lemonldap-ng.org/',
            bugtracker  => {
                web =>
                  'https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/issues',
            },
            x_twitter => 'https://twitter.com/lemonldapng',
        },
Xavier Guimard's avatar
Xavier Guimard committed
56 57
    },
    PREREQ_PM => {
Xavier Guimard's avatar
Xavier Guimard committed
58 59
        'Apache::Session'        => 0,
        'Cache::Cache'           => 0,
Xavier Guimard's avatar
Xavier Guimard committed
60
        'Config::IniFiles'       => 0,
Xavier Guimard's avatar
Xavier Guimard committed
61 62 63 64 65
        'Crypt::OpenSSL::Bignum' => 0,
        'Crypt::OpenSSL::RSA'    => 0,
        'Crypt::OpenSSL::X509'   => 0,
        'Crypt::Rijndael'        => 0,
        'Digest::SHA'            => 0,
Xavier Guimard's avatar
Xavier Guimard committed
66
        'HTML::Template'         => 0,
Xavier Guimard's avatar
Xavier Guimard committed
67 68
        'JSON'                   => 0,
        'Mouse'                  => 0,
69
        'Plack'                  => 0,
Xavier Guimard's avatar
Xavier Guimard committed
70
        'Test::Pod'              => 1.00,
Xavier Guimard's avatar
Xavier Guimard committed
71
        'URI'                    => 0,
72 73
    },    # e.g., Module::Name => 1.1
          #EXE_FILES => [ 'scripts/convertConfig', ],
74 75 76 77 78 79
    (
        $] >= 5.005
        ?    ## Add these new keywords supported since 5.005
          (
            ABSTRACT_FROM =>
              'lib/Lemonldap/NG/Common.pm',    # retrieve abstract from module
80 81
            AUTHOR =>
'Xavier Guimard <x.guimard@free.fr>, Clément Oudot <clement@oodo.net>'
82 83 84
          )
        : ()
    ),
Xavier Guimard's avatar
Xavier Guimard committed
85 86
    clean => {
        FILES => 't/lmConf*'
Xavier Guimard's avatar
Xavier Guimard committed
87 88
    },
    MAN1PODS => {
89 90
        'scripts/convertConfig'    => 'blib/man1/convertConfig.1p',
        'scripts/lemonldap-ng-cli' => 'blib/man1/lemonldap-ng-cli.1p',
Xavier Guimard's avatar
Xavier Guimard committed
91
    },
92
);