8
8
This is the standard Perl way of building packages. It involves the
9
Perl module ExtUtils::MakeMaker (which will hopefully be replaced by
10
Module::Build one day) which creates a Makefile.
9
Perl module ExtUtils::MakeMaker which creates a Makefile.
12
11
ExtUtils::MakeMaker recognizes several variables which can be set at
13
12
the command line to give the user the possibility to influence the
52
51
broken or not set on many other systems, especially Red Hat ones. Google
53
52
might help to find out more on this topic.
55
SpamAssassin needs some directories which normally aren't supported by
56
ExtUtils::MakeMaker. So we had to extend its logic quite a bit. And to
57
make it worse did the internal logic change extremely between the 5.x
58
and 6.x series, especially for packaging stuff. We had to "backport"
59
(ie. hack into) some of the functionality ExtUtils::MakeMaker 6.11 and
60
later offers. It's obvious how error-prone this is. So the recommended
61
version of ExtUtils::MakeMaker is 6.16 or later.
63
54
The following ressources might help understanding this stuff:
64
55
[MANEUMM616], [MM00779], [P5P94113].
66
It's also possible to build SpamAssassin with a current version of
67
ExtUtils::MakeMaker without upgrading the system. See the section
68
"Building with another ExtUtils::MakeMaker" for details.
71
58
Changing paths in the Makefile
72
59
------------------------------
184
171
Previous versions offered some complicated variables to achieve this. Those
185
172
hacks weren't compatible to current versions of ExtUtils::MakeMaker. But
186
ExtUtils::MakeMaker 6.06 introduced a feature (which is said to be buggy
187
till 6.11) which is well known from the GNU build tools [GNUMAKECMD]: The
173
ExtUtils::MakeMaker 6.06 introduced a feature which is well known from the GNU
174
build tools [GNUMAKECMD]: The variable DESTDIR.
190
176
The value of DESTDIR is simply prepended to all other paths on make install.
191
177
So if you wanted to create a SpamAssassin package for a system which will
199
185
build_some_package
201
ATTENTION: This method heavily depends on a feature introduced with a newer
202
version of ExtUtils::MakeMaker. So it's *strongly* recommended to use
203
ExtUtils::MakeMaker 6.16 or later
204
when building packages. That module is available here [GETEUMM616]. If any
205
problems occur with previous versions, please report them to [BUGZILLA].
206
See also "Building with another ExtUtils::MakeMaker".
209
188
Setting further options on the command line
210
189
-------------------------------------------
271
250
Building with some weird perl:
272
251
/local/buildsys/perl-5.6.1/bin/perl Makefile.PL PERL_BIN=/usr/bin/perl
275
The build system has to know the version of the Perl which will actually
276
call SpamAssassin. Normally the app given by PERL_BIN is executed and asked
277
for its version. If that fails, the version of the perl which called
278
Makefile.PL is used. Sometimes one might have to correct this.
281
Building with Perl 5.8.0 for Perl 5.6.2:
282
perl-5.8.0 Makefile.PL PERL_VERSION=5.6.2
285
Building with another ExtUtils::MakeMaker
286
-----------------------------------------
288
It is possible to use a different version than the one which is installed.
289
This is very useful if one wants to package SpamAssassin but can't or doesn't
290
want to upgrade the module installed on his machine. Follow these steps to
293
1. Go to CPAN and look for the latest ExtUtils::MakeMaker available.
294
<http://search.cpan.org/search?query=ExtUtils::MakeMaker>
295
The standalone package (currently maintained by Michael G. Schwern)
298
2. Get the tarball and extract it in some temporary directory. For
301
wget http://search.cpan.org/CPAN/authors/id/M/MS/MSCHWERN/ExtUtils-MakeMaker-6.16.tar.gz
302
tar xvfz ExtUtils-MakeMaker-6.16.tar.gz
304
3. You will now have a directory ExtUtils-MakeMaker-X.YY (where X.YY is the
305
version). Inside is a subdirectory 'lib'. Add that one to the environment
306
variable PERL5LIB, like this (when you use the Bash):
307
export PERL5LIB="/tmp/ExtUtils-MakeMaker-6.16/lib:$PERL5LIB"
309
4. Now build SpamAssassin. As long as the PERL5LIB variable is set, the
310
updated ExtUtils::MakeMaker is used. (SpamAssassin will use PERL5LIB
311
during building, but the built scripts ignore it due to taint-mode
315
254
Obsolete Variables
316
255
------------------
355
294
[DEBPERL] Debian Perl Policy, Chapter 3: Packaged Modules:
356
295
<http://www.debian.org/doc/packaging-manuals/perl-policy/ch-module_packages.html>
358
[GETEUMM616] Get ExtUtils::MakeMaker 6.16 here:
359
<http://search.cpan.org/author/MSCHWERN/ExtUtils-MakeMaker-6.16/>
361
297
[GNUMAKECMD] GNU make manual: Make Conventions: Variables for Specifying
363
299
<http://www.gnu.org/manual/make-3.79.1/html_chapter/make_14.html#SEC119>