Re: packaging help?
- From: Jeremy Volkening <volkening mailshack com>
- To: gtk-perl-list gnome org
- Subject: Re: packaging help?
- Date: Sun, 18 Apr 2010 22:00:49 -0400
Thanks to everyone for your replies. Your projects are similar in
complexity to what I'm doing and I'll study your source to get a better
idea of what you have done. Chris's suggestion was closer to the
direction I had been heading. However, I think I may have dismissed
dh-make-perl somewhat prematurely.
I was assuming that packages set up using dh-make-perl would be
installed in the same place most modules are installed when using the
CPAN one-liner (/usr/share/perl5/... on my system), and this didn't seem
appropriate for a standalone app. According to what Grant says, I guess
I had the wrong impression.
Is it safe to say that I was wrong to differentiate between packaging a
standalone app and a reusable module? From what I've been hearing, it
sounds like dh-make-perl is still the way to go.
Jeremy
On Mon, 2010-04-19 at 12:00 +1200, Grant McLean wrote:
On Sun, 2010-04-18 at 15:19 -0400, Jeremy Volkening wrote:
Hello,
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?
The easiest way I have found is to organise your source files in the
standard layout used by CPAN distributions. You might look at using
Module::Starter to get a skeleton layout.
Once you've done that, you can use the dh-make-perl tool (available via
apt-get) to create a .deb from the top-level directory of your source,
e.g.:
dh-make-perl --build .
For an example, see this project (a GTK app for bulk-copying USB keys):
http://github.com/grantm/usb-key-copy-con
Scroll down that page for a screenshot and project overview.
In this example, almost all my code lives in .pm files in the 'App::*'
namespace under the lib directory, e.g.:
lib/App/USBKeyCopyCon.pm
The app uses some custom icons that live in a .pm file:
lib/App/USBKeyCopyCon/Chrome.pm
There's also a .wav file that lives in the same directory - that's
probably not strictly kosher but it works :-)
The script which is used to launch the app is a simple wrapper that
lives in the bin directory.
When dh-make-perl turns it all into a .deb, the .pm files get installed
under /usr/lib and the wrapper script ends up in /usr/bin.
If your app depends on other packages, you would edit the debian/control
file (which was generated by dh-make-perl) to list the dependencies and
then rebuild the .deb with:
dpkg-buildpackage -rfakeroot
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.
Are these libraries part of your app? If so, just put them in the lib
directory of your source tree and everything should be fine. If not,
then they should be packaged separately. It certainly wouldn't be
kosher for files in a .deb to depend on files living under /usr/local.
Cheers
Grant
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]