Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 197 lines (150 sloc) 4.393 kb
90308d0 Graham Barr Release 0.32
gbarr authored
1 # -*- perl -*-
2
3 use inc::Module::Install;
4
5 name ('perl-ldap');
6 module_name ('Net::LDAP');
7 author ('Graham Barr <gbarr@cpan.org>');
8 version_from ('lib/Net/LDAP.pm');
9 license ('perl');
10 abstract ('LDAP client library');
11
12 check_nmake(); # check and download nmake.exe for Win32
13
d934d38 Graham Barr Release 0.3201
gbarr authored
14 requires(
15 perl => 5.004,
16 'Convert::ASN1' => 0.07,
17 );
18
19 include_deps ('Test::More');
c2efd84 Graham Barr Release 0.3202
gbarr authored
20 include ('ExtUtils::AutoInstall');
90308d0 Graham Barr Release 0.32
gbarr authored
21
22 features(
23 'SASL authentication' => [
24 -default => 0,
25 'Authen::SASL' => 2.00,
eeae2e8 Peter Marschall update Makefile.PL to have correct dependencies for the features.
marschap authored
26 recommends('Digest::MD5'), # for DIGEST-MD5 SASL mech
27 recommends('Digest::HMAC_MD5'), # for CRAM-MD5 SASL mech
90308d0 Graham Barr Release 0.32
gbarr authored
28 ],
29 'LDAP URLs' => [
30 -default => 0,
31 'URI::ldap' => 1.10,
32 ],
33 'LDAPS' => [
34 -default => 0,
35 'IO::Socket::SSL' => 0.81,
36 ],
37 'Read/Write DSML files' => [
38 -default => 0,
eeae2e8 Peter Marschall update Makefile.PL to have correct dependencies for the features.
marschap authored
39 'MIME::Base64' => 0,
40 'XML::SAX::Writer' => 0,
41 # dependencies of XML::SAX::Writer:
42 #'Text::Iconv' => 0,
43 #'XML::Filter::BufferText' => 0,
44 #'XML::SAX' => 0,
45 #'XML::NamespaceSupport' => 0,
46 #'File::Temp' => 0
90308d0 Graham Barr Release 0.32
gbarr authored
47 ],
48 'Read/Write LDIF files' => [
49 -default => 0,
50 'MIME::Base64' => 0,
51 ],
52 );
53
54 auto_install_now();
55
56 &Makefile->write;
57 &Meta->write;
58
59 ## - - - - - - - -
60
61 sub MY::postamble {
62 return <<'POSTAMBLE';
63
64 distdir : manifest run_cpansign
65
66 run_cpansign :
67 cpansign -s
68
69 POSTAMBLE
70
71 }
72
73
74 __END__
75
76
455ad0f Graham Barr Initial revision
gbarr authored
77 # The -*- perl -*- script writes the Makefile for perl-ldap
78
79 use 5.004;
80 use ExtUtils::MakeMaker;
81 use Getopt::Std;
82 use Config;
83
84 #--- Configure ---
85
86 if (!getopts("hs") || $opt_h) {
87 die <<"EDQ";
88 Usage: perl $0 [-h] [-s] [ MAKEMAKER_ARGS ]
89 -h Display this message
90 -s Install scripts from bin directory
91 EDQ
92 }
93
94 #--- Distribution section ---
95
96 $DISTNAME = 'perl-ldap';
97 $VERSION_FROM = 'lib/Net/LDAP.pm';
98 $AUTHOR = 'Graham Barr <gbarr@pobox.com>';
99
100 ($ABSTRACT = <<"EDQ") =~ s/\n/\\n/g;
101 perl-ldap is a library of modules implementing an LDAP client. The aim
102 of the perl-ldap project is to implement a very portable LDAP client in
103 perl by relying on as little compiled code as possible.
104 EDQ
105
106 #--- Check for required modules ---
107
108 my $missing = 0;
109 $| = 1;
110
111 sub check_module {
112 my($module,$version) = @_;
113 print substr("$module ............................",0,30);
114 my $ok = eval {
115 my $file = $module;
116 $file =~ s#::#/#g;
117 require $file . ".pm";
118 $module->VERSION($version) if defined $version;
119 1;
120 };
121 $missing++ unless $ok;
bfdcd11 Graham Barr Tweaks to dependcies of distdir
gbarr authored
122 $@ =~ s/^(Can't locate \S* in \@INC).*/$1/s;
455ad0f Graham Barr Initial revision
gbarr authored
123 print $ok ? "ok\n" : "** FAILED **\n$@\n";
124 $ok;
125 }
126
d35350c Graham Barr *** empty log message ***
gbarr authored
127 print "\nChecking for OPTIONAL modules\n\n";
455ad0f Graham Barr Initial revision
gbarr authored
128
bfee17e Graham Barr *** empty log message ***
gbarr authored
129 check_module('URI',1.08) && check_module('URI::ldap',1.10) or print <<"EDQ","\n";
5227f6f Graham Barr *** empty log message ***
gbarr authored
130 The URI::ldap module is needed ONLY IF you want to parse LDAP URLs
455ad0f Graham Barr Initial revision
gbarr authored
131 EDQ
132
133 check_module('Digest::MD5') or print <<"EDQ","\n";
eeae2e8 Peter Marschall update Makefile.PL to have correct dependencies for the features.
marschap authored
134 The Digest::MD5 module is needed ONLY IF you intend to use DIGEST-MD5 SASL authentication
5227f6f Graham Barr *** empty log message ***
gbarr authored
135 EDQ
136
b4e2fcb Specified minimum version of IO::Socket::SSL
Chris Ridd authored
137 check_module('IO::Socket::SSL',0.81) or print <<"EDQ","\n";
5227f6f Graham Barr *** empty log message ***
gbarr authored
138 The IO::Socket::SSL module is needed ONLY IF you intend to use LDAPS
139 EDQ
140
eeae2e8 Peter Marschall update Makefile.PL to have correct dependencies for the features.
marschap authored
141 check_module('XML::SAX') or print <<"EDQ","\n";
142 The XML::SAX module is needed ONLY IF you intend to read DSML files
143 EDQ
144
145 check_module('XML::SAX::Writer') or print <<"EDQ","\n";
146 The XML::SAX::Writer module is needed ONLY IF you intend to write DSML files
455ad0f Graham Barr Initial revision
gbarr authored
147 EDQ
148
727d858 Graham Barr Add check for MIME::Base64
gbarr authored
149 check_module('MIME::Base64') or print <<"EDQ","\n";
eeae2e8 Peter Marschall update Makefile.PL to have correct dependencies for the features.
marschap authored
150 The MIME::Base64 module is needed ONLY IF you intend to read/write LDIF or DSML files
727d858 Graham Barr Add check for MIME::Base64
gbarr authored
151 EDQ
152
559989d Graham Barr Change over to using Authen::SASL v2.00, which is now distributed
gbarr authored
153 check_module('Authen::SASL', 2.00) or print <<"EDQ","\n";
154 If you intend to use SASL authentication you need at least version 2.00
155 EDQ
156
455ad0f Graham Barr Initial revision
gbarr authored
157 print "\n",<<"EDQ","\n" if $missing;
158 ****************************************************************************
d35350c Graham Barr *** empty log message ***
gbarr authored
159 You are missing some modules that MAY be needed for some of the features
160 in perl-ldap to work correctly. Read the above messages and download
161 any required modules from http://www.perl.com/CPAN
455ad0f Graham Barr Initial revision
gbarr authored
162 ****************************************************************************
163 EDQ
164
165 #--- Write the Makefile ---
166
167 my @ppd;
168
169 if ($] >= 5.00503) {
170 @ppd = (
745009b Graham Barr *** empty log message ***
gbarr authored
171 AUTHOR => $AUTHOR,
172 ABSTRACT => $ABSTRACT,
455ad0f Graham Barr Initial revision
gbarr authored
173 );
174 }
175
176 WriteMakefile(
177 VERSION_FROM => $VERSION_FROM,
178 NAME => $DISTNAME,
f192bcb Graham Barr Depend in MakeMaker to fixup the #! line of installed scripts
gbarr authored
179 EXE_FILES => $opt_s ? [ grep -f, glob('bin/*') ] : [],
455ad0f Graham Barr Initial revision
gbarr authored
180 clean => {FILES => 'temp'},
d35350c Graham Barr *** empty log message ***
gbarr authored
181 PREREQ_PM => { 'Convert::ASN1' => 0.07 },
455ad0f Graham Barr Initial revision
gbarr authored
182 @ppd,
183 );
184
185
90308d0 Graham Barr Release 0.32
gbarr authored
186 sub MY::postamble {
187 return <<'POSTAMBLE';
455ad0f Graham Barr Initial revision
gbarr authored
188
90308d0 Graham Barr Release 0.32
gbarr authored
189 distdir : manifest run_cpansign
b6183a5 Graham Barr Add a SIGNATURE to the distribution
gbarr authored
190
191 run_cpansign :
192 cpansign -s
193
90308d0 Graham Barr Release 0.32
gbarr authored
194 POSTAMBLE
455ad0f Graham Barr Initial revision
gbarr authored
195
196 }
Something went wrong with that request. Please try again.