Friday 6 August 2010

Perl modules: from a new idea to a debian package in one minute

Time ago I wrote something about debianizing a perl module.

If you're not applying it to a tar downloaded from CPAN or in general a third party module, but on your own module, then you may find it useful to build the module's dir structure using module-starter (installed with libmodule-starter-perl).

The CPAN page for module-starter contains a simple description on how to use it and this post has interesting comments on even easier ways to achieve the same result (using dzil for example).

In summary this is what you need to do:

$ module-starter --module=My::AModule --author="Giacomo Vacca" --email="giacomo.vacca@email.email" --builder=Module::Install

Inside the created dir (My-AModule):

$ perl Makefile.PL
$ make
$ make test

(I'm not running make install on purpose)

Outside of My-AModule:
$ dh-make-perl My-AModule/

(builds the debian dir using the current configuration)

Inside My-AModule:
$ debuild
or
$ debuild -us -uc
if you don't want to sign the deb.

Then I just suggest to have dput configured and upload the package to your repo.

No comments:

Post a Comment

About ICE negotiation

Disclaimer: I wrote this article on March 2022 while working with Subspace, and the original link is here:  https://subspace.com/resources/i...