Hi, Other related questions to game packaging: 1) Currently I'm packaging a game (let's call it "thegame") that only has one thegame.tar.gz archive, containing the source files and data files. I've written a shell script that splits that file into two separate thegame.tar.bz2 files and thegame-data.tar.bz2. I included the shell script in the package sources for convenience. I assume that it's a common practice. Can you confirm this ? 2) When splitting the package, should I create one single package in OBS containing both spec files (thegame.spec and thegame-data.spec), or rather use two separate OBS packages "thegame" and "thegame-data", each one with a single spec file ? 3) If there are two spec files for one single OBS package "thegame", will the rebuilding of a package depended upon (ex: libSDL) affect/trigger only the one spec file "thegame" or both "thegame" and "thegame-data", given that only "thegame" depends on "libSDL" ? 4) In the spec file for the data packages, the name is like "thegame-data", but the target directory is still "/usr/share/thegame". I can't use the %{name} macro in the "thegame-data" spec file since its value is "thegame-data", so I tried to add a macro at the beginning of the spec file with "%define basename thegame", and specify the target directory as "/usr/share/%{basename}. But it doesn't work, the value of %{basename} is always empty. I tried to define it at the top of the spec file, and also in the %prep part, but it doesn't work. Same thing if I use "%global basename thegame". What did I do wrong ? Thanks, Vincent Pavol Rusnak a écrit :
Vincent Petry wrote:
Hello,
I have been advised to use these conventions when packaging games: http://en.opensuse.org/Packaging/Games
and have the following questions about the package splitting between base and game data: 1) Is it necessary to always put the data in a separate package ? Is there a maximum size (ex: < 10MB) for which it is okay to keep it as one single package ? Because if many small games have data packages, it will easily "spam" the package list. This info should be added on that wiki page (I can do that if someone can confirm).
There is no maximum size chosen yet, but use your common sense. We could pick some particular value, but there still would be some exceptions.
2) How to handle the mentionned "bugfixes" updates ? If the upstream tar archive has changed, OBS will anyway rebuild both the base and data packages, if there is only one spec file. So after this it all depends on how the user chooses to do the update. But for the user it might also not be clear whether the data package needs to be updated as well. I guess this could be enforced using version numbers in the Require tag. What do you think ?
You should use versions in Require tags. If you know that game with version 1.3.3 works with data of a version 1.2 or later , you could use the following scheme:
game.spec
Version: 1.3.3 Requires: game-data >= 1.2
game-data.spec
Version: 1.2 Requires: game >= 1.2
3) How is the Requires dependency applied ? I guess the base package requires the data package. Is it possible to make the data package require the base one at the same time ? (double-dependency)
It is possible to make double-dependency and you should use it (see the example above).
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org