dh_perl - Linux
Overview
dh_perl is a tool used during the Debian packaging process for Perl modules. It creates Debian packaging metadata files, such as debian/control, debian/rules, and debian/copyright, based on information obtained from the Perl module’s metadata. This simplifies and standardizes the packaging process, ensuring consistency and compatibility with Debian’s package management system.
Syntax
dh_perl [options] [<module>]
Options/Flags
-p
: Include per-file Debian metadata in the generated files.-b
: Build a binary package in addition to the source package.-l <license>
: Specify the license of the module.-S <summary>
: Use the given summary in the generated debian/control file.-e <email>
: Use the given email address in the generated debian/control file.-N
: Do not prompt for user input.-v
: Verbose mode.
Examples
Create a basic Debian package for a Perl module:
dh_perl mymodule
Create a binary package:
dh_perl -b mymodule
Specify a custom license:
dh_perl -l "GPL-3.0" mymodule
Common Issues
- Missing metadata: Ensure that the Perl module has all necessary metadata, such as a META.yml file or a Makefile.PL.
- Incorrect licensing information: Verify that the license specified in
-l
option matches the actual license of the module. - Prompts for user input: To avoid prompts, use the
-N
option.
Integration
**Generate a debian package with equivs:
equivs-build example.debian.tar.gz | dh_perl -
Related Commands
- dpkg: Debian package manager.
- dpkg-dev: Debian package development tools.
- equivs: Debian package conversion tool.