Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 119 lines (91 sloc) 2.941 kb
455ad0ff » gbarr
2000-05-03 Initial revision
1 # The -*- perl -*- script writes the Makefile for perl-ldap
727d8586 » gbarr
2001-12-03 Add check for MIME::Base64
2 # $Id: Makefile.PL,v 1.7 2001/12/03 16:20:26 gbarr Exp $
455ad0ff » gbarr
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 » gbarr
2001-04-10 Tweaks to dependcies of distdir
47 $@ =~ s/^(Can't locate \S* in \@INC).*/$1/s;
455ad0ff » gbarr
2000-05-03 Initial revision
48 print $ok ? "ok\n" : "** FAILED **\n$@\n";
49 $ok;
50 }
51
d35350c2 » gbarr
2000-07-30 *** empty log message ***
52 print "\nChecking for OPTIONAL modules\n\n";
455ad0ff » gbarr
2000-05-03 Initial revision
53
bfee17e1 » gbarr
2000-08-03 *** empty log message ***
54 check_module('URI',1.08) && check_module('URI::ldap',1.10) or print <<"EDQ","\n";
5227f6fd » gbarr
2000-06-29 *** empty log message ***
55 The URI::ldap module is needed ONLY IF you want to parse LDAP URLs
455ad0ff » gbarr
2000-05-03 Initial revision
56 EDQ
57
58 check_module('Digest::MD5') or print <<"EDQ","\n";
5227f6fd » gbarr
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 » gbarr
2000-05-03 Initial revision
68 EDQ
69
727d8586 » gbarr
2001-12-03 Add check for MIME::Base64
70 check_module('MIME::Base64') or print <<"EDQ","\n";
71 The MIME::Base64 module is needed ONLY IF you intend to read/write LDIF files
72 EDQ
73
455ad0ff » gbarr
2000-05-03 Initial revision
74 print "\n",<<"EDQ","\n" if $missing;
75 ****************************************************************************
d35350c2 » gbarr
2000-07-30 *** empty log message ***
76 You are missing some modules that MAY be needed for some of the features
77 in perl-ldap to work correctly. Read the above messages and download
78 any required modules from http://www.perl.com/CPAN
455ad0ff » gbarr
2000-05-03 Initial revision
79 ****************************************************************************
80 EDQ
81
82 #--- Write the Makefile ---
83
84 my %PL_FILES = map { ($a = $_) =~ s/\.PL// ? ($_,$a) : () } glob('bin/*.PL');
85
86 my @ppd;
87
88 if ($] >= 5.00503) {
89 @ppd = (
745009b1 » gbarr
2000-05-22 *** empty log message ***
90 AUTHOR => $AUTHOR,
91 ABSTRACT => $ABSTRACT,
455ad0ff » gbarr
2000-05-03 Initial revision
92 );
93 }
94
95 WriteMakefile(
96 VERSION_FROM => $VERSION_FROM,
97 NAME => $DISTNAME,
98 EXE_FILES => $opt_s ? [ values %PL_FILES ] : [],
99 PL_FILES => \%PL_FILES,
100 clean => {FILES => 'temp'},
d35350c2 » gbarr
2000-07-30 *** empty log message ***
101 PREREQ_PM => { 'Convert::ASN1' => 0.07 },
455ad0ff » gbarr
2000-05-03 Initial revision
102 @ppd,
103 );
104
105 sub MY::postamble {
106
bfdcd11b » gbarr
2001-04-10 Tweaks to dependcies of distdir
107 <<EOS;
455ad0ff » gbarr
2000-05-03 Initial revision
108
bfdcd11b » gbarr
2001-04-10 Tweaks to dependcies of distdir
109 run_mkhtml :
110 ./mkhtml
455ad0ff » gbarr
2000-05-03 Initial revision
111
bfdcd11b » gbarr
2001-04-10 Tweaks to dependcies of distdir
112 run_mkmanf : run_mkhtml
113 ./mkmanf
455ad0ff » gbarr
2000-05-03 Initial revision
114
bfdcd11b » gbarr
2001-04-10 Tweaks to dependcies of distdir
115 distdir : run_mkhtml run_mkmanf
455ad0ff » gbarr
2000-05-03 Initial revision
116
bfdcd11b » gbarr
2001-04-10 Tweaks to dependcies of distdir
117 EOS
455ad0ff » gbarr
2000-05-03 Initial revision
118
119 }
120
Something went wrong with that request. Please try again.