NAME

CPANPLUS::Dist::Debora::Package::Debian - Create Debian packages

VERSION

version 0.014

SYNOPSIS

use CPANPLUS::Dist::Debora::Package::Debian;

my $package =
    CPANPLUS::Dist::Debora::Package::Debian->new(module => $module);

my $ok = $package->create(verbose => 0|1);
my $ok = $package->install(verbose => 0|1);

DESCRIPTION

This CPANPLUS::Dist::Debora::Package subclass creates Debian packages from Perl distributions.

SUBROUTINES/METHODS

format_priority

my $priority = CPANPLUS::Dist::Debora::Package::Debian->format_priority;

Checks if the Debian package tools are available and if the system uses Debian packages.

create

my $ok = $package->create(verbose => 0|1);

Creates a package.

install

my $ok = $package->install(verbose => 0|1);

Installs the package.

outputname

Returns the package filename, for example ~/.cpanplus/5.36.1/build/XXXX/libsome-module-perl_1.0-1cpanplus_all.deb.

arch

my $arch = $package->arch;

Returns "all" if the Perl distribution is hardware independent. Otherwise the hardware architecture is returned, for example "amd64".

version_with_epoch

my $version = $package->version_with_epoch;

Returns the version with the epoch prepended if there is an epoch. The epochs are read from /var/lib/dpkg/available or the environment variable EPOCH.

revision

my $revision = $package->revision;

Returns the package revision, which is composed of the build number and the suffix 'cpanplus'.

debiandir

my $debiandir = $package->debiandir;

Returns the path to the debian subdirectory, e.g. ~/.cpanplus/5.36.1/build/XXXX/Some-Module-1.0/debian.

provides

for my $package_name (@{$package->provides}) {
  say $package_name;
}

Returns virtual packages that are provided by this package.

changelog

my $text = $package->changelog;

Fills in a template and returns a changelog file.

control

my $text = $package->control;

Fills in a template and returns a control file.

my $text = $package->copyright;

Fills in a template and returns a copyright file.

docs

my $text = $package->docs;

Returns a docs file.

rules

my $text = $package->rules;

Fills in a template and returns a rules file.

DIAGNOSTICS

See CPANPLUS::Dist::Debora for diagnostics.

CONFIGURATION AND ENVIRONMENT

See CPANPLUS::Dist::Debora for supported files and environment variables.

DEPENDENCIES

Requires the Perl modules CPANPLUS and Text::Template from CPAN.

Requires the operating system packages "perl", "build-essential", "debhelper", "fakeroot" and "sudo". The minimum supported debhelper version is 12.

INCOMPATIBILITIES

None.

BUGS AND LIMITATIONS

None known.

SEE ALSO

dpkg(1), dpkg-buildpackage(1), debhelper(7)

AUTHOR

Andreas Vögele <voegelas@cpan.org>

LICENSE AND COPYRIGHT

Copyright (C) 2024 Andreas Vögele

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.