[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: packaging help?



On Apr 18, 2010, at 21:19, Jeremy Volkening wrote:

> Hello,

Hi Jeremy,

> I'm wondering if anyone can point me toward a good source of
> documentation on packaging applications (build on gtk2-perl) for
> Debian-based distros?

Well, the canonical source is the http://www.debian.org/doc/maint-guide/.

> I keep banging my head against this step of my
> application development with no real progress. So far I've followed two
> routes in trying to figure this out: a) Reading through as many
> tutorials as I can find online about .deb packaging,

Here's one more: http://jeremiahfoster.com/debian/debs-from-cpan.html Since I wrote it feel free to ask any questions you may have.

> and b) downloading
> source packages of gtk2-perl based apps with "apt-get source <package>"
> and examining what others have done. In both cases, I'm a bit
> overwhelmed by the fact that everyone seems to go about it differently.

Well, you're smart to read source I think. There is a generally accepted way to build packages, or at least one that is widely used in the debian-perl group. That method, roughly, is using dh-make-perl to create packages from modules found on CPAN and then following perl policy as far as your app is concerned. http://www.debian.org/doc/packaging-manuals/perl-policy/

> 
> Most online tutorials seem to deal with preparing packages from source,
> and while my application and supporting libraries are technically, I
> suppose, source code (perl), they don't require compilation or any other
> pre-processing steps.

I think you'll find the need to be compiled on different architectures. Plus packages themselves are binaries - so they need to be 'compiled.'

> I simply need to copy them to the correct
> directories, install dependencies (all of which are already available in
> the Debian/Ubuntu repositories), and create application menu entries and
> MIME associations.

This should be relatively straight forward.

> At the moment, I don't need my packages to conform to
> standards for the distro repositories, either.

Well, if you want to get your software into the distro, they'll want you to comply with their standards. :)

> I simply want to be able
> to provide users with a .deb archive from a sourceforge page to simplify
> their installation (upload to repositories may come later). I've
> actually found it easier so far to put together the installer for the
> win32 version than the linux version in which the software is developed.
> 
> On a related note, I will need to figure out the correct way for my main
> app script to find the extra libraries once they are installed. I
> currently have the paths hard-coded into the script like this:
> 
> use lib '../libs/'; # extra libs
> require BioGTK::RE::Digest;
> require BioGTK::RE::Collection;
> require BioGTK::RE::Manager;
> require BioGTK::App::Prefs;
> 
> I suppose I could just change the first line to:
> 
> use lib '/usr/local/lib/<app-name>/'
> 
> and install the library files to that directory, but is there a better
> way to go about this?

Absolutely. You'll have no way of knowing if your users has local::lib installed. Plus, this problem has already be solved. If you create a package, you can call in your dependencies and place your package in a place where it will be able to find the libraries you rely on with a simply 'use' declaration. This is much simpler for your users as well as yourself since you don't need to package your dependencies too - they are likely already packaged, and the OS already knows where all its perl libraries are so that solves a lot of your problems.

> 
> Thanks in advance for any help you can provide.

Read the links I've provided, at least the official debian ones, and send email to debian-perl should you run into problems - there is usually someone on that list that can help or point you in the right direction when packaging perl modules for debian. :)  In general, if you target Debian as your platform for building your package, it will install on Debian derivatives as well. More here: http://pkg-perl.alioth.debian.org/

Best,

Jeremaih

Reply to: