Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to create a .deb for a python-based IRC bot. I've already gone through the Ubuntu Packaging Guide, and done a debuild -S on it to create the source package.

When its uploaded to the PPA, it fails to include the code for the bot (which is necessary for the bot to run). How do I make the .deb so that it (a) isnt a source package, and (b) includes the code for the bot so that it can be run?

And by "includes the code for the bot so that it can be run", I mean so that the .deb extracts the code to the location in the virtual file structure that I specified so that it can be used by any user. Note that because its a python bot, there's no single executable file in the code, which explains the need for the source to be packaged and extracted with the .deb

share|improve this question
Oh, and to answer your first question, just run debuild without -s to build a binary package. – Nathan Osman Mar 13 '11 at 19:31
Regarding that, i did that before, and the PPA system wouldnt accept it :/ – Thomas Ward Mar 13 '11 at 19:56
@Evil: You can only upload source files. – Nathan Osman Mar 13 '11 at 20:04
@George: Will the files subsequently be built on the PPA so that they install (i.e. end up as the binary .deb)? – Thomas Ward Mar 13 '11 at 20:05
@Evil: Yes, that's exactly what happens. – Nathan Osman Mar 13 '11 at 20:09
up vote 3 down vote accepted

First of all, assuming your package is named ircbot, create a file named ircbot.install in the debian folder. This file contains instructions for the installer to copy certain files to their destination in the virtual filesystem you are referring to.

From there, it's simply a matter of adding the names of the files you want copied.

So, if you have a file that goes to /usr/share/ircbot/, you would add a line to ircbot.install like so: usr/share/ircbot
share|improve this answer
I've gotta have a "Stalker Alert" for ya dude, you answer most of my questions :P On another note, given that the bot is modular, and requires about 18 other python files to operate (and its all stored in multiple folders), is there a way I can specify "Copy all from the folder here TO /usr/share/ircbot/" ? – Thomas Ward Mar 13 '11 at 19:32
@Evil: I'm sure there is... but I don't know what it is :P – Nathan Osman Mar 13 '11 at 20:10
Well this should work. Lets hope that it operates right (and copies files where they belong) with the PPA after its all built ;) – Thomas Ward Mar 13 '11 at 22:45

Create an "install" file in the "debian" folder, like this:

local_file /system/path/where/to/copy/file
local_file2 /system/path/where/to/copy/file2
.... add as many files/folders as you want

Then, installing the .deb will only move the files to the right folders.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.