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

Re: Quick tip on transforming a tarball into a .deb



csj@mindgate.net wrote:
>I need to compile some stuff in Debian (available in Debian but three version 
>numbers stale). I have already successfully compiled them in Mandrake.
>
>The problem is that the application's various bits and pieces will be 
>splattered across my system. While they'll probably wind up in /usr/local, I 
>want a more manageable method of installing/deinstalling these files. I'm 
>thinking of creating a .deb to "trap" the compilation.
>
>Can someone give me a quick tip on how to do this, convert a tarball into a 
>deb in one fell swoop? I'm a bit lazy to RTFM. In Mandrake I simply type 
>something like rpm -bb (or is it rpm -tb?) to produce a binary from a 
>.src.rpm (I know, not quite a tarball). What's the quick and dirty Debian 
>equivalent?

The really quick and dirty way is to do 'dpkg -b directory', where
directory contains a filesystem tree (so typically directory/usr/bin/foo
or whatever) as well as a 'DEBIAN' directory containing certain control
files. For these, I'm afraid, you do have to RTFM (specifically the
Packaging Manual); for your own use you can probably get away with just
a simple 'control' file stating things like package name, version,
description, maintainer name, and dependencies.

The not-quite-so-quick-and-dirty but often actually easier way is to
install the dh-make package and use the dh_make utility to build a
nearly-correct source package which you can tweak a bit. You'll probably
only need to tweak the files in the 'debian' directory, and the format's
not too difficult to understand. debian/rules is a Makefile which
controls the whole process, and there are tools in the debhelper package
which automate various things. You then use dpkg-buildpackage to compile
everything and produce a .deb.

-- 
Colin Watson                                     [cjw44@flatline.org.uk]



Reply to: