Last week I was building some SFE packages. It turns out that when SFEguile is
installed, the aisleriot game (in gnome-games) is built.
The code below includes the aisleriot files when SFEguile is installed:
--- SUNWgnome-games.spec (revision 10519)
+++ SUNWgnome-games.spec (revision 10521)
@@ -13,6 +13,8 @@
%define makeinstall make install DESTDIR=$RPM_BUILD_ROOT
%use gnome_games = gnome-games.spec
+# The Aisleriot game is built if SFEguile is installed.
+%define with_guile %(pkginfo -q SFEguile && echo 1 || echo 0)
Name: SUNWgnome-games
Summary: GNOME games
@@ -128,7 +130,9 @@
echo 'export GCONF_CONFIG_SOURCE GCONF_BACKEND_DIR LD_LIBRARY_PATH';
echo 'SDIR=$BASEDIR%{_sysconfdir}/gconf/schemas';
echo 'schemas="$SDIR/glines.schemas';
+%if %with_guile
echo ' $SDIR/aisleriot.schemas';
+%endif
echo ' $SDIR/glchess.schemas';
echo ' $SDIR/gnect.schemas';
echo ' $SDIR/gnibbles.schemas';
@@ -167,7 +171,9 @@
%dir %attr (0755, root, other) %{_datadir}/pixmaps
%{_datadir}/pixmaps/*
%{_datadir}/sounds
+%if %with_guile
%{_datadir}/sol-games
+%endif
%attr (-, root, other) %{_datadir}/icons
%if %build_l10n
@@ -185,7 +191,9 @@
%defattr (-, root, sys)
%attr(0755, root, sys) %dir %{_sysconfdir}
%{_sysconfdir}/sound/events/*
+%if %with_guile
%{_sysconfdir}/gconf/schemas/aisleriot.schemas
+%endif
%{_sysconfdir}/gconf/schemas/glchess.schemas
%{_sysconfdir}/gconf/schemas/glines.schemas
%{_sysconfdir}/gconf/schemas/gnect.schemas
@@ -202,6 +210,9 @@
%changelog
+* Mon Feb 12 2007 - damien.carbery at sun.com
+- aisleriot game is only built when SFEguile is installed. Use %if/%endif to
+ include its files only when SFEguile is installed.