You are not logged in. Login or Register for free.
Title only?
Strange sound and vision from here to the end of the world.
"We're fans first, journalists second."






  12 comments
  Email this



Posted on Wednesday, August 16th, 2006 23:49:49 GMT by: quietearth
Posted under: ubuntu debian package

Here's how to easily build a .deb package for ubuntu (or debian). You could build a .deb package using checkinstall, but that wouldn't include all the debian/ubuntu specifics you need. I used the following to build the ubuntu package for my next release of News notification.

First off, let's install the necessary tools:
# apt-get install autotools-dev fakeroot dh-make build-essential

Then copy your source tree into a directory in /tmp:
# cp -r news-notification-0.3 /tmp
# cd /tmp/news-notification-0.3


Now let's make the debian control files:
# dh_make
and pick Single for single binary, or whatever is appropriate for your project.

Edit the debian/control file and at least change the Maintainer and Description fields. There are a few other files you will probably want to edit.

Then run the following: (this has to be done as root)
# dpkg-buildpackage -rfakeroot

Looking at the debian/news-notification/DEBIAN/control file we can see that all the dependencies are proper thanks to the autoconf system. If we look in /tmp (one directory up) we see news-notification_0.3-1_i386.deb which is ready to go! If we want to use the appropriate ubuntu package versioning, check out this post. Since this is my first ubuntu package of this version, with no debian original it would be:
news-notification_0.3-0ubuntu1_i386.deb

Pingbacks

Pingback from http://www.michelem.org/2007/05/12/links-for-2007-05-12/
on May 12th, 2007 8:24:22 GMT

Pingback from http://www.dotmana.com/index.php/?p=336
on September 15th, 2007 9:34:51 GMT

RSS Feed for comments

Comments

thank you for this document,i have use this to
create my first deb file

Posted by: china.newlad | September 27, 2006 11:53:57 pm | permalink

user icon With newer versions of dh_make, you might need to specify the --createorig flag to dh_make if you do not provide the original source file.

Posted by: quietearth | February 2, 2007 01:47:12 pm | permalink

dpkg-buildpackage -rfakeroot does NOT need to be run as root

Posted by: gerard | June 2, 2007 08:04:39 am | permalink

thank you for this document,i have use this to
create my first deb file : me too !

Posted by: Anonymous | September 17, 2007 02:13:04 pm | permalink

for me, I get a cannot find Glib2 error when running the dpkg-buildpackage command.

Posted by: Anonymous | June 16, 2008 05:19:02 pm | permalink

thanks :) BUT:
dpkg-buildpackage does indeed built the .deb packages, but they are almost empty. The data.tar.gz only contains the folder-structure "down to" the doc folder, but there is no data in the folder...

Posted by: tillux | June 20, 2008 01:04:39 pm | permalink

hey how can i "compile" the source in .deb files??

Posted by: pavan | January 28, 2009 12:38:36 pm | permalink

Thanks! You helped me to backport ghostscript from lenny to sarge today :).

Posted by: tshirtman | November 9, 2009 11:32:26 am | permalink

Great guide. Helped me out too :)

Posted by: Kristian Erikson | November 10, 2009 05:11:30 am | permalink

Nice guide, thanks!

I am trying to package code from somebody else. ./configure && make works. But dh_make -s -e 'acsccid-1.0.1@FransVerster.nl' --createorig && dpkg-buildpackage fails :-(

It is building without some .c file so the linker fails.

Howto fix? Whats so different when using dpkg-buildpackage ?

Thx!

Posted by: FCV | December 23, 2009 01:52:14 pm | permalink

Post a comment

Name:
(default is Anonymous)
Contact:
(email or url, optional)
Comment:
(no html or bbcode)
Captcha:



Related articles
Posted on Monday, April 2nd, 2007 2:28:12 GMT by: quietearth |   4 comments

Posted on Monday, April 23rd, 2007 3:22:07 GMT by: quietearth |   0 comments

Posted on Wednesday, August 16th, 2006 19:07:02 GMT by: quietearth |   14 comments

Posted on Tuesday, September 19th, 2006 17:42:50 GMT by: quietearth |   0 comments

Posted on Wednesday, January 10th, 2007 4:34:24 GMT by: quietearth |   0 comments




rss | subscribe via email | the team | contact us | mobile
© 2006-2009 Don Neumann (except where applicable)
We are looking for free hosting with a cut of sales, you'll get a link right here.
If you want news of your film posted, use our contact page and we'll check it out
Permission is granted to use material from this site if you provide a reference to us via a link and DO NOT HOTLINK.


GenreBanners.com Banner Exchange