Skip to content
This repository
Newer
Older
100644 117 lines (88 sloc) 2.806 kb
455ad0ff »
2000-05-03 Initial revision
1 # The -*- perl -*- script writes the Makefile for perl-ldap
bfdcd11b »
2001-04-10 Tweaks to dependcies of distdir
2 # $Id: Makefile.PL,v 1.6 2001/04/10 17:02:34 gbarr Exp $
455ad0ff »
2000-05-03 Initial revision
3
4 use 5.004;
5 use ExtUtils::MakeMaker;
6 use Getopt::Std;
7 use Config;
8
9 #--- Configure ---
10
11 if (!getopts("hs") || $opt_h) {
12 die <<"EDQ";
13 Usage: perl $0 [-h] [-s] [ MAKEMAKER_ARGS ]
14 -h Display this message
15 -s Install scripts from bin directory
16 EDQ
17 }
18
19 #--- Distribution section ---
20
21 $DISTNAME = 'perl-ldap';
22 $VERSION_FROM = 'lib/Net/LDAP.pm';
23 $AUTHOR = 'Graham Barr <gbarr@pobox.com>';
24
25 ($ABSTRACT = <<"EDQ") =~ s/\n/\\n/g;
26 perl-ldap is a library of modules implementing an LDAP client. The aim
27 of the perl-ldap project is to implement a very portable LDAP client in
28 perl by relying on as little compiled code as possible.
29 EDQ
30
31 #--- Check for required modules ---
32
33 my $missing = 0;
34 $| = 1;
35
36 sub check_module {
37 my($module,$version) = @_;
38 print substr("$module ............................",0,30);
39 my $ok = eval {
40 my $file = $module;
41 $file =~ s#::#/#g;
42 require $file . ".pm";
43 $module->VERSION($version) if defined $version;
44 1;
45 };
46 $missing++ unless $ok;
bfdcd11b »
2001-04-10 Tweaks to dependcies of distdir
47 $@ =~ s/^(Can't locate \S* in \@INC).*/$1/s;
455ad0ff »
2000-05-03 Initial revision
48 print $ok ? "ok\n" : "** FAILED **\n$@\n";
49 $ok;
50 }
51
d35350c2 »
2000-07-30 *** empty log message ***
52 print "\nChecking for OPTIONAL modules\n\n";
455ad0ff »
2000-05-03 Initial revision
53
bfee17e1 »
2000-08-03 *** empty log message ***
54 check_module('URI',1.08) && check_module('URI::ldap',1.10) or print <<"EDQ","\n";
5227f6fd »
2000-06-29 *** empty log message ***
55 The URI::ldap module is needed ONLY IF you want to parse LDAP URLs
455ad0ff »
2000-05-03 Initial revision
56 EDQ
57
58 check_module('Digest::MD5') or print <<"EDQ","\n";
5227f6fd »
2000-06-29 *** empty log message ***
59 The Digest::MD5 module is needed ONLY IF intend to use CRAM-MD5 SASL authentication
60 EDQ
61
62 check_module('IO::Socket::SSL') or print <<"EDQ","\n";
63 The IO::Socket::SSL module is needed ONLY IF you intend to use LDAPS
64 EDQ
65
66 check_module('XML::Parser') or print <<"EDQ","\n";
67 The XML::Parser module is needed ONLY IF you intend to read/write DSML files
455ad0ff »
2000-05-03 Initial revision
68 EDQ
69
70 print "\n",<<"EDQ","\n" if $missing;
71 ****************************************************************************
d35350c2 »
2000-07-30 *** empty log message ***
72 You are missing some modules that MAY be needed for some of the features
73 in perl-ldap to work correctly. Read the above messages and download
74 any required modules from http://www.perl.com/CPAN
455ad0ff »
2000-05-03 Initial revision
75 ****************************************************************************
76 EDQ
77
78 #--- Write the Makefile ---
79
80 my %PL_FILES = map { ($a = $_) =~ s/\.PL// ? ($_,$a) : () } glob('bin/*.PL');
81
82 my @ppd;
83
84 if ($] >= 5.00503) {
85 @ppd = (
745009b1 »
2000-05-22 *** empty log message ***
86 AUTHOR => $AUTHOR,
87 ABSTRACT => $ABSTRACT,
455ad0ff »
2000-05-03 Initial revision
88 );
89 }
90
91 WriteMakefile(
92 VERSION_FROM => $VERSION_FROM,
93 NAME => $DISTNAME,
94 EXE_FILES => $opt_s ? [ values %PL_FILES ] : [],
95 PL_FILES => \%PL_FILES,
96 clean => {FILES => 'temp'},
d35350c2 »
2000-07-30 *** empty log message ***
97 PREREQ_PM => { 'Convert::ASN1' => 0.07 },
455ad0ff »
2000-05-03 Initial revision
98 @ppd,
99 );
100
101 sub MY::postamble {
102
bfdcd11b »
2001-04-10 Tweaks to dependcies of distdir
103 <<EOS;
455ad0ff »
2000-05-03 Initial revision
104
bfdcd11b »
2001-04-10 Tweaks to dependcies of distdir
105 run_mkhtml :
106 ./mkhtml
455ad0ff »
2000-05-03 Initial revision
107
bfdcd11b »
2001-04-10 Tweaks to dependcies of distdir
108 run_mkmanf : run_mkhtml
109 ./mkmanf
455ad0ff »
2000-05-03 Initial revision
110
bfdcd11b »
2001-04-10 Tweaks to dependcies of distdir
111 distdir : run_mkhtml run_mkmanf
455ad0ff »
2000-05-03 Initial revision
112
bfdcd11b »
2001-04-10 Tweaks to dependcies of distdir
113 EOS
455ad0ff »
2000-05-03 Initial revision
114
115 }
116
Something went wrong with that request. Please try again.