Advertisement

DEB packages

Started by October 30, 2006 10:55 AM
2 comments, last by Bregma 18 years, 2 months ago
could someone explain a basic directory structure for releasing BINARY debian packages? I have a game that looks like this:

|
+-bin
 |
 +--game_exec_file
 +--data
   |
   +--textures
   | |
   | +-blah.jpg
   |
   +--textures
     |
     +-blah.poo
what is the best place to put my data file (in /usr) and the same with my binary file (/usr/bin or /usr/local/bin ect)
Conventionally, you'd put the user-runnable binary in /usr/bin

All the data would go in /usr/share/yourgamename somewhere (assuming it's architecture independent).

Any subsidiary binaries and/or data which are arch-dependent, would go in /usr/lib/yourgamename

And you'd save games in the user's home directory, probably under a directory called .yourgamename/ (Or give them a choice of where to save)

Mark
Advertisement
It's all mandated by the Debian Policy. It's a little tough to read so the New Maintainers Guide is a good read too (easier).

Markr is right about the locations. On top of that, (menu-)icons and the like should go to /usr/share/pixmaps.

The /usr vs. /usr/local issue is actually quite simple. Things that you install through your distro's packaging system should go in /usr. Everything else like programs compiled and/or installed by the sysadmin himself should go into /usr/local. So, if you use the GNU toolchain, make sure the default configure script will set up for installation in /usr/local, then override this configuration in the debian package to install in /usr (e.g. ./configure --prefix=/usr)

For an example, take a look at my game. gnome-hearts uses the standard GNU toolchain and will install in /usr/local by default. The Debian package (using CDBS) overrides this.

<hr />
Sander Marechal<small>[Lone Wolves][Hearts for GNOME][E-mail][Forum FAQ]</small>

I would strongly suggest that, rather than targeting a single distribution, you target a standard that many distributions follow.

You will find that Debian, and many others, follow the stadard for target file installation as laid out in the Linux Standard Base Core Specification 3.1, which includes by reference the Filesystem Heirarchy Standard 2.3.

It's all documented, approved by committees, and incorporated into any major and many minor distributions. It's independant of package format, so your application will work the same whether installed from DEB, RPS, TGZ, or source.

Stephen M. Webb
Professional Free Software Developer

This topic is closed to new replies.

Advertisement