The installation directory for Debian modules must be different from that for
core and site modules.
The current Perl packaging uses the vendor directories for this
purpose, which are at present as described in Module Path, Section 1.3 as vendor.
No version subdirectory exists on these directories as the dependencies for
packaged modules (see Module
Dependencies, Section 3.4) should ensure that all work with the current
perl package.
The Perl distribution includes many modules available separately from CPAN[2], which may have a newer version.
The intent of the @INC ordering (described in Module Path, Section 1.3) is to allow such
modules to be packaged to vendor which take precedence over the
version in core. A packaged module which shadows a core
module in this way must be a newer version.
Module packages must install manual pages into the standard directories (see Documentation, Section 1.4) using the extensions
.1p and .3pm to ensure that no conflict arises where
a packaged module duplicates a core module.
.packlist files should not be installed.
3.2 Module Package Names
Perl module packages should be named for the primary module provided. The
naming convention for module Foo::Bar is
libfoo-bar-perl. Packages which include multiple modules may
additionally include provides for those modules using the same convention.
3.3 Vendor Installation
A module should use the following lines in the debian/rulesbuild target[3]:
and this one to install the results into the temporary tree:
$(MAKE) install PREFIX=$(CURDIR)/debian/tmp/usr
A Build-Depends on perl (>= 5.6.0-16) is required.
3.4 Module Dependencies
3.4.1 Architecture-Independent Modules
Architecture-independent modules which require core modules from the
perl package must specify a dependency on that package.
Modules which contain explicit require version or
use version statements must specify a dependency on
perl or perl-base with the minimum required version,
or more simply the current version.
In the absence of an explicit requirement, architecture-independent modules
must depend on a minimum perl or perl-base version of
5.6.0-16 due to the changes in @INC introduced by
that version.
3.4.2 Binary Modules
Binary modules must specify a dependency on either perl or
perl-base with a minimum version of the perl package
used to build the module, and must additionally depend on the expansion of
perlapi-$Config{version} using the Config module.
3.4.3 Automating Perl Dependencies
Rather than hard-coding the dependencies into the control file, using a
substitution such as ${perl:Depends} is suggested. This allows
the dependencies to be determined as build time and written to the
substvars file in the form
perl:Depends=deps.
Packages built with debhelper may use dh_perl(1) to
generate this substitution automatically. This additionally requires a
versioned Build-Depends (or Build-Depends-Indep) on
debhelper (>= 3.0.18).