http://www.perlmonks.org?node_id=744681

targetsmart has asked for the wisdom of the Perl Monks concerning the following question:

I am seeing lot of CPAN modules are available as debian packages and I am able to easily install it with synaptic(package manager) in debian(etch), it resolves all the dependencies and installs properly.
I have a perl script and a dozen of related perl modules(my own modules), I want to convert the perl script to a debian(etch) package and its related modules also to separate debian packages, is there a way to do it. so that when I install my main package(perl script) all the relevant packages are also installed.
One more question, In future I may also want to send patches for modules and the main script as debian packages. Is it possible. Ideas/guidelines/directions are valuable to me.

Vivek
-- In accordance with the prarabdha of each, the One whose function it is to ordain makes each to act. What will not happen will never happen, whatever effort one may put forth. And what will happen will not fail to happen, however much one may seek to prevent it. This is certain. The part of wisdom therefore is to stay quiet.

Replies are listed 'Best First'.
Re: Module to debian package
by Corion (Patriarch) on Feb 18, 2009 at 08:11 UTC

    The Debian package you're looking for is dh-make-perl. Also see Leveraging Debian for Module Management. I don't think it makes sense to submit patches to modules as Debian packages, because the module author might not be using Debian.

      I don't think it makes sense to submit patches to modules as Debian packages, because the module author might not be using Debian.

      Agreed — however, you could submit the Debianised modules to Debian (or set up an apt repository of unofficial Debianised Perl modules).

Re: Module to debian package
by pjf (Curate) on Feb 18, 2009 at 13:28 UTC

    As already mentioned, dh-make-perl is probably the command you're after. What hasn't been mentioned is that there's an excellent draft available of an article that will appear in an upcoming issue of a certain magazine that is well worth subscribing to.

    If you're still in need of assistance, the Debian Perl Group have a number of resources that can help you, including mailing lists and IRC channels. They're a very friendly bunch.

    If you're impatient, the following code will build a .deb for most well behaved modules, provided you have their dependencies installed:

    dh-make-perl --build --cpan Some::Module

    All the best,

      That's a great writeup, even in draft, much more detailed than mine!

      Steve
      --