Mailinglist Archive: opensuse-buildservice (262 mails)

< Previous Next >
Re: [opensuse-buildservice] Conventions for game packages
  • From: Vincent Petry <PVince81@xxxxxxxx>
  • Date: Mon, 03 Aug 2009 22:24:27 +0800
  • Message-id: <4A76F31B.1020803@xxxxxxxx>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Pavol,

After trying it out I figured out the things you mentionned: that
only one spec file is considered by OBS. So I finally decided to
split the package in two OBS packages, each one containing a
separate tarball and spec files. I think it will also make it easier
when uploading the upstream tarball if for example only the code has
changed, and not the data.

For the %define, it looks like it doesn't allow to define macro
names that don't start with an underscore. I replaced it with
%define _basename and it worked.

Thanks anyway for your answers.

Vincent Petry

Pavol Rusnak a écrit :
Vincent Petry wrote:
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 ?

Well, not really. You don't have to split the upstream tarball into game
and game-data. It is only important to create two packages (one for the
game and one for the data).

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 ?

Your choice. If you use one package with two specs, you'd still need to
create game-data package and create a link to the first package. (OBS
discovers only packagename.spec file while building).

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" ?

See the point above. You still need to create a link package if you use
two specs in one package.

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 ?

Defining the macro somewhere at the beginning of the file should work.
(%define basename thegame). I'm not sure what is causing the problem.
Maybe the basename macro is reserved for something else. Try using
another name for the macro (e.g. gamename). If it still fails, please
send me a spec file (or link to OBS).

Thanks!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iEYEARECAAYFAkp28xsACgkQSSdxpfEEQEyOmQCgiufnVY1gvgSWSp/YrHys0mWp
w/MAoJgrboA8LnombtrfYNLL2q6iCA9j
=k9bC
-----END PGP SIGNATURE-----

--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >
References