~ubuntu-branches/ubuntu/precise/spamassassin/precise-updates

« back to all changes in this revision

Viewing changes to PACKAGING

  • Committer: Bazaar Package Importer
  • Author(s): Noah Meyerhans
  • Date: 2010-01-26 22:53:12 UTC
  • mfrom: (1.1.13 upstream) (5.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100126225312-wkftb10idc1kz2aq
Tags: 3.3.0-1
* New upstream version.
* Switch to dpkg-source 3.0 (quilt) format

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
        perl Makefile.PL
7
7
 
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.
11
10
 
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.
54
53
 
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.
62
 
 
63
54
The following ressources might help understanding this stuff:
64
55
[MANEUMM616], [MM00779], [P5P94113].
65
56
 
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.
69
 
 
70
57
 
71
58
Changing paths in the Makefile
72
59
------------------------------
183
170
 
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
188
 
variable DESTDIR.
 
173
ExtUtils::MakeMaker 6.06 introduced a feature which is well known from the GNU
 
174
build tools [GNUMAKECMD]: The variable DESTDIR.
189
175
 
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
198
184
        cd /tmp/sa-build
199
185
        build_some_package
200
186
 
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".
207
 
 
208
187
 
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
273
252
 
274
 
PERL_VERSION:
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.
279
 
 
280
 
  Sample:
281
 
    Building with Perl 5.8.0 for Perl 5.6.2:
282
 
        perl-5.8.0 Makefile.PL PERL_VERSION=5.6.2
283
 
 
284
 
 
285
 
Building with another ExtUtils::MakeMaker
286
 
-----------------------------------------
287
 
 
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
291
 
success:
292
 
 
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)
296
 
   is needed.
297
 
 
298
 
2. Get the tarball and extract it in some temporary directory. For
299
 
   version 6.16:
300
 
        cd /tmp
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
303
 
 
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"
308
 
 
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
312
 
   security features.)
313
 
 
314
253
 
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>
357
296
 
358
 
[GETEUMM616] Get ExtUtils::MakeMaker 6.16 here:
359
 
  <http://search.cpan.org/author/MSCHWERN/ExtUtils-MakeMaker-6.16/>
360
 
 
361
297
[GNUMAKECMD] GNU make manual: Make Conventions: Variables for Specifying
362
298
  Commands
363
299
  <http://www.gnu.org/manual/make-3.79.1/html_chapter/make_14.html#SEC119>
376
312
[RHBUG78053] Red Hat bug 78053: "incompatible changes in behavior of
377
313
  MakeMaker; affects rpm build process" (introduction of DESTDIR):
378
314
  <https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=78053>
 
315