pythonperldebianpackagingdebhelper

Packaging an application that uses perl and python on debian


I have an application that has various sections some of which are written in perl and some in python. What would be the best tool to use for packaging such an application.

I am looking at deb-helper at the moment and still learning how to use it though I cant find a HOW TO for something like this. Ideas?

Update

My source layout:

AppRoot/
    agi-bin/
        MyApp/
        Common/
    web/
    conf/

agi-bin - perl scripts; web - python scripts. I would like the install destination to maintain this hierarchy for the perl/python scripts in /usr/lib/ and conf moving to /etc/myapp/

Update 2:

If working with compiled applications say C++, then dh_make with a makefile does the job. If am working with perl there's dh-make-perl. Then the link provided by Thomas (in the comments section) for packaging python adds distutils into the picture. All these show different ways to package different applications.

I am looking for ideas/recommendations on the best way to package an application that uses multiple languages i.e. python and perl. Should I use a makefile file for both or is it ok to just override dh_install in the rules file and move files around? What would you say is the 'right way' of doing this?

Also, am just learning about this whole packaging business so all recommendations are welcome.


Solution

  • Using debhelper is the right approach - you should certainly create a .deb package. I recommend to start with this tutorial.

    Edit: If the scripts you are trying to install are actually "executables" (in the sense that they are meant to be invoked as programs, rather than acting as libraries in their respective languages), then you should disregard dh-make-perl, distutils, dh_pycentral, etc. These are all designed to install libraries/packages/modules, dealing with dependencies, byte-code generation, etc. Instead, configure the debian/foo.install file to list all the scripts you want to install, and let dh_install deploy them. Make sure to manually add dependencies (into debian/control)to the libraries that the scripts may need, and in particular to the Python/Perl versions they require. If this is really just copying files around both at packaging time and installation time, none of the extra debhelper functionality will do any good. When you find yourself writing postinstall scripts, go back and see whether a debhelper may generate them for you.