Creating debian packages from perl modules

Jump to: navigation, search

Building Debian packages of Perl modules

Example: creating a debian package for Net::IPv6Addr perl module

  • Install debian packages utilities:
 > apt-get install dh-make-perl devscripts
  • Download perl module:
 > perl -MCPAN -e "get Net::IPv4Addr"
  • Create the package:
 > cd $HOME/.cpan/build
 > dh-make-perl Net-IPv6Addr-0.2
 > cd dh-make-perl Net-IPv6Addr-0.2/
 > debuild
  • The package is now created:
 > cd ..
 > ls *.deb
  • And it can be installed by:
 > dpkg --install libnet-ipv6addr-perl_0.2-1_all.deb

The problem of this method is that it does not impose the dependencies among modules. You have to take care of them.