[ale] creating a debian package

Michael B. Trausch mike at trausch.us
Tue Jan 19 23:02:51 EST 2010


On 01/19/2010 07:59 PM, Chris Fowler wrote:
> I've done some work to get fldigi and flrig working together.  All
> libraries used by these programs were downloaded via apt-get so that the
> only thing not in the software repository are the programs I just
> compiled.
>
> I compiled both with a prefix of /opt/fldigi and /opt/flrig.  What I
> want to do is cerate a deb package so I can copy these onto my netbook
> running 9.10 and install them into a live CD that I will rebuild.
>
> Are there any good tutorials on how to do this?

Check out the 'hello' package, which is the example on how to build 
Debian source packages (as well as GNU packages):

  $ apt-get source hello

(Run that somewhere as a non-root user; probably ${HOME}/tmp or 
whatever.)  You can copy the boilerplate and adapt it for your needs. 
Basically, the way Debian/Ubuntu packages are built is dictated by 
several files in the debian/ directory in the source package.

If you have an upstream source tarball, say foo-1.0.0.tar.gz, you can 
extract that, and create a debian/ directory in the extracted sources. 
Then, create debian/control and debian/rules and debian/changelog.  You 
can automate that process slightly if you have the devscripts package 
from Debian or Ubuntu installed.

When you have finished creating the files you need, do a 'debuild -S 
-sa'.  This will create a Debian source package, suitable for using dput 
to upload to the PPA system on Launchpad for building, or using 
something like pbuilder to build.  Once you upload to a PPA or use 
pbuilder, you'll have the .deb files that you want for binary 
installation.  Of course, keep in mind that if you want to build for 
another platform, you'll have to have a virtual machine (or the real 
hardware) running a Debian-based system with pbuilder installed so that 
you can do the build.  So far as I am aware, you cannot tell pbuilder to 
cross-compile .deb packages for another architecture.  I could be wrong 
on that, though; the dpkg system is awfully complex and I cannot 
possibly hope to understand all the bits of it that make things happen.

If you have questions at various steps on the way, you can email me 
directly (or on the list on this thread of course) and I will try to 
answer them as best as I can.  I won't claim to be an expert on the 
process, but I have put together a few packages for Ubuntu over time.

	--- Mike

-- 
Michael B. Trausch - mike at trausch.us
Tel: (404) 592-5746 x1


More information about the Ale mailing list