From Fedora Project Wiki

Revision as of 14:13, 24 May 2008 by fp-wiki>ImportUser (Imported from MoinMoin)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is just a draft

Changelog

0.1: first try, based on bugzilla brainstorm
0.2: clarify /etc/ggz.modules ownership
0.3: Requires(post,preun): ggz-client-libs
0.4: rpm macros
0.5: %post: ggz-config --install --force


GGZ Gaming Zone Packaging

Packages that use ggz-client-libs will (usually) need to

  • install a *.dsc file into %{_ggz_datadir}
  • register these modules (in %{_ggz_configdir}/ggz.modules), including these dependencies and scriptlets:
Requires(post): ggz-client-libs
Requires(preun): ggz-client-libs
%post
%{_ggz_config} --install --force --modfile=%{_ggz_datadir}/foo.dsc || :

%preun
if [ $1 -eq 0 ] ; then
%{_ggz_config} --remove --modfile=%{_ggz_datadir}/foo.dsc || :
fi

NOTE: /etc/ggz.modules is owned by ggz-client-libs.

  • To make packaging simpler, ggz-client-libs-devel provides some rpm macros, including:
  • %_ggz_config %{_bindir}/ggz-config
  • %_ggz_configdir %(%_ggz_config --configdir)
  • %_ggz_datadir %(%_ggz_config --datadir)
  • %_ggz_gamedir  %(%_ggz_config --gamedir)
  • %_ggz_version %(%_ggz_config --version)
  • %_ggz_protocol %(%_ggz_config --protocol)


Comments

MatthiasClasen: Looks good to me. gnome-games already does this, basically. I note that it has a >&/dev/null in there. Is ggz-config noisy ? Also, you probably want to use %{_datadir} here ?

RexDieter: ggz-config is (usually) only noisy on errors, and normally has no output. .dsc files can live anywhere, though a common convention seems for them to live in /usr/share/ggz (ie, ggz-config --datadir). I've now included some rpm macros in -devel that can help.