Home | History | Annotate | Download | only in trunk
      1 
      2 # spec file for package SUNWgnome-games
      3 #
      4 # includes module(s): gnome-games, libggz, ggz-client-libs
      5 #
      6 # Copyright 2008 Sun Microsystems, Inc.
      7 # This file and all modifications and additions to the pristine
      8 # package are under the same license as the package itself.
      9 #
     10 # Owner: migi
     11 #
     12 %include Solaris.inc
     13 
     14 %define makeinstall make install DESTDIR=$RPM_BUILD_ROOT
     15 %use gnome_games = gnome-games.spec
     16 %use libggz = libggz.spec
     17 %use ggz_client_libs = ggz-client-libs.spec
     18 
     19 Name:                    SUNWgnome-games
     20 Summary:                 GNOME games
     21 Version:                 %{default_pkg_version}
     22 Source:                  %{name}-manpages-0.1.tar.gz
     23 SUNW_BaseDir:            %{_basedir}
     24 SUNW_Copyright:          %{name}.copyright
     25 BuildRoot:               %{_tmppath}/%{name}-%{version}-build
     26 
     27 %include default-depend.inc
     28 BuildRequires: SUNWlibrsvg-devel
     29 BuildRequires: SUNWPython-devel
     30 BuildRequires: SUNWgnome-libs-devel
     31 BuildRequires: SUNWgnome-vfs-devel
     32 BuildRequires: SUNWgnome-config-devel
     33 BuildRequires: SUNWgnome-base-libs-devel
     34 BuildRequires: SUNWgnome-python-desktop-devel
     35 BuildRequires: SUNWlibsdl-devel
     36 BuildRequires: SUNWgnome-media-devel
     37 Requires: SUNWgnome-libs
     38 Requires: SUNWgnome-config
     39 Requires: SUNWlibms
     40 Requires: SUNWgnome-base-libs
     41 Requires: SUNWgnome-python-desktop
     42 Requires: SUNWlibrsvg
     43 Requires: SUNWPython
     44 Requires: SUNWpostrun
     45 Requires: SUNWgnome-media
     46 
     47 %if %build_l10n
     48 %package l10n
     49 Summary:                 %{summary} - l10n files
     50 SUNW_BaseDir:            %{_basedir}
     51 %include default-depend.inc
     52 Requires:                %{name}
     53 %endif
     54 
     55 %package root
     56 Summary:                 %{summary} - / filesystem
     57 SUNW_BaseDir:            /
     58 %include default-depend.inc
     59 Requires: SUNWgnome-libs
     60 Requires: SUNWpostrun-root
     61 Requires: SUNWgnome-config
     62 
     63 %package devel
     64 Summary:                 %{summary} - development files
     65 SUNW_BaseDir:            %{_basedir}
     66 %include default-depend.inc
     67 Requires:                %{name}
     68 
     69 %prep
     70 rm -rf %name-%version
     71 mkdir %name-%version
     72 %libggz.prep -d %name-%version
     73 %ggz_client_libs.prep -d %name-%version
     74 %gnome_games.prep -d %name-%version
     75 cd %{_builddir}/%name-%version
     76 gzcat %SOURCE0 | tar xf -
     77 
     78 %build
     79 %define libggz_build_dir %{_builddir}/%name-%version/libggz-%{libggz.version}
     80 %define ggzclient_build_dir %{_builddir}/%name-%version/ggz-client-libs-%{ggz_client_libs.version}
     81 
     82 export PKG_CONFIG_PATH=%{_pkg_config_path}
     83 export CFLAGS="%optflags -I%{_includedir} -I/usr/sfw/include -xc99 -I%{libggz_build_dir}/src -I%{ggzclient_build_dir}/ggzmod -I%{ggzclient_build_dir}/ggzcore"
     84 export RPM_OPT_FLAGS="$CFLAGS"
     85 export LDFLAGS="%_ldflags -lX11 -L/usr/sfw/lib -lexpat -L%{libggz_build_dir}/src/.libs -L%{ggzclient_build_dir}/ggzmod/.libs -L%{ggzclient_build_dir}/ggzcore/.libs"
     86 export LD_LIBRARY_PATH="%{libggz_build_dir}/src/.libs:%{ggzclient_build_dir}/ggzmod/.libs:%{ggzclient_build_dir}/ggzcore/.libs"
     87 export PATH="$PATH:"`dirname $CXX`
     88 export CXX=`basename $CXX`
     89 export ACLOCAL_FLAGS="-I%{_datadir}/aclocal"
     90 
     91 # find GNU xgettext
     92 IFS=:
     93 for dir in $PATH; do
     94   test -x "$dir/xgettext" && \
     95        "$dir/xgettext" --version 2>&1 | egrep -s 'GNU gettext' && \
     96        XGETTEXT="$dir/xgettext"
     97 done
     98 export XGETTEXT
     99 
    100 %libggz.build -d %name-%version
    101 %ggz_client_libs.build -d %name-%version
    102 %gnome_games.build -d %name-%version
    103 
    104 %install
    105 rm -rf $RPM_BUILD_ROOT
    106 rm -rf $RPM_BUILD_ROOT%{_mandir}
    107 %libggz.install -d %name-%version
    108 %ggz_client_libs.install -d %name-%version
    109 %gnome_games.install -d %name-%version
    110 
    111 # Remove the empty dir.
    112 rmdir $RPM_BUILD_ROOT%{_libdir}/ggz
    113 
    114 rm -rf $RPM_BUILD_ROOT%{_localstatedir}/lib/games
    115 rmdir $RPM_BUILD_ROOT%{_localstatedir}/lib
    116 rmdir $RPM_BUILD_ROOT%{_localstatedir}
    117 # Delete the include files as we're not delivering a devel package. It's not
    118 # useful.
    119 #rm -rf $RPM_BUILD_ROOT%{_includedir}
    120 rm $RPM_BUILD_ROOT%{_libdir}/*.a
    121 rm $RPM_BUILD_ROOT%{_libdir}/*.la
    122 
    123 # /etc/ggz.modules is created by gnect game when it finds /usr/bin/ggz-config.
    124 # This happens when the module is built but already installed, not on 1st build.
    125 if [ -f $RPM_BUILD_ROOT%{_sysconfdir}/ggz.modules ]; then
    126  rm $RPM_BUILD_ROOT%{_sysconfdir}/ggz.modules
    127 fi
    128 
    129 cd %{_builddir}/%name-%version/sun-manpages
    130 make install DESTDIR=$RPM_BUILD_ROOT
    131 
    132 %if %build_l10n
    133 %else
    134 # REMOVE l10n FILES*files-list*
    135 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
    136 rm -rf $RPM_BUILD_ROOT%{_datadir}/gnome/help/[a-z]*/[a-z]*
    137 rm -rf $RPM_BUILD_ROOT%{_datadir}/omf/*/*-[a-z][a-z].omf
    138 rm -rf $RPM_BUILD_ROOT%{_datadir}/omf/*/*-[a-z][a-z]_[A-Z][A-Z].omf
    139 rmdir $RPM_BUILD_ROOT%{_datadir}/omf/gnome-games
    140 %endif
    141 
    142 %{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):unsupported" $RPM_BUILD_ROOT}
    143 
    144 %clean
    145 rm -rf $RPM_BUILD_ROOT
    146 
    147 %post
    148 ( echo 'test -x /usr/bin/update-desktop-database || exit 0';
    149   echo '/usr/bin/update-desktop-database'
    150 ) | $BASEDIR/lib/postrun -b -u -c JDS_wait
    151 ( echo 'test -x /usr/bin/scrollkeeper-update || exit 0';
    152   echo '/usr/bin/scrollkeeper-update'
    153 ) | $BASEDIR/lib/postrun -b -u -c JDS
    154 
    155 %postun
    156 test -x $BASEDIR/lib/postrun || exit 0
    157 ( echo 'test -x /usr/bin/update-desktop-database || exit 0';
    158   echo '/usr/bin/update-desktop-database'
    159 ) | $BASEDIR/lib/postrun -b -u -c JDS
    160 ( echo 'test -x /usr/bin/scrollkeeper-update || exit 0';
    161   echo '/usr/bin/scrollkeeper-update'
    162 ) | $BASEDIR/lib/postrun -b -u -c JDS
    163 
    164 %post root
    165 %include gconf-install.script
    166 
    167 %preun root
    168 test -x $BASEDIR/var/lib/postrun/postrun || exit 0
    169 ( echo 'test -x $PKG_INSTALL_ROOT/usr/bin/gconftool-2 || {';
    170   echo '  echo "WARNING: gconftool-2 not found; not uninstalling gconf schemas"';
    171   echo '  exit 0';
    172   echo '}';
    173   echo 'umask 0022';
    174   echo 'GCONF_CONFIG_SOURCE=xml:merged:$BASEDIR/etc/gconf/gconf.xml.defaults';
    175   echo 'GCONF_BACKEND_DIR=$PKG_INSTALL_ROOT/usr/lib/GConf/2';
    176   echo 'LD_LIBRARY_PATH=$PKG_INSTALL_ROOT/usr/lib';
    177   echo 'export GCONF_CONFIG_SOURCE GCONF_BACKEND_DIR LD_LIBRARY_PATH';
    178   echo 'SDIR=$BASEDIR%{_sysconfdir}/gconf/schemas';
    179   echo 'schemas="$SDIR/glines.schemas';
    180   echo '         $SDIR/glchess.schemas';
    181   echo '         $SDIR/gnect.schemas';
    182   echo '         $SDIR/gnibbles.schemas';
    183   echo '         $SDIR/gnobots2.schemas';
    184   echo '         $SDIR/gnomine.schemas';
    185   echo '         $SDIR/gnotravex.schemas';
    186   echo '         $SDIR/gnotski.schemas';
    187   echo '         $SDIR/gtali.schemas';
    188   echo '         $SDIR/iagno.schemas';
    189   echo '         $SDIR/same-gnome.schemas';
    190   echo '         $SDIR/mahjongg.schemas"';
    191   echo '$PKG_INSTALL_ROOT/usr/bin/gconftool-2 --makefile-uninstall-rule $schemas'
    192 ) | $BASEDIR/var/lib/postrun/postrun -i -c JDS -a
    193 
    194 %files
    195 %defattr (-, root, bin)
    196 %dir %attr (0755, root, bin) %{_bindir}
    197 %{_bindir}/*
    198 %dir %attr (0755, root, bin) %{_libdir}
    199 %{_libdir}/gnome-games
    200 %{_libdir}/libggz*
    201 %{_libdir}/python?.?/vendor-packages
    202 %dir %attr (0755, root, sys) %{_datadir}
    203 %dir %attr (0755, root, other) %{_datadir}/applications
    204 %{_datadir}/applications/*
    205 %{_datadir}/gnect
    206 %{_datadir}/ggz
    207 %{_datadir}/gnibbles
    208 %{_datadir}/gnobots2
    209 %dir %attr (0755, root, other) %{_datadir}/gnome
    210 %{_datadir}/gnome/help/*/C
    211 %{_datadir}/glchess
    212 %{_datadir}/gnome-games/gnotski
    213 %{_datadir}/gnome-games/icons
    214 %{_datadir}/gnome-games/mahjongg
    215 %{_datadir}/gnome-games/pixmaps
    216 %{_datadir}/gnome-games/same-gnome
    217 %{_datadir}/gnome-games-common
    218 %{_datadir}/gnome-sudoku
    219 %{_datadir}/omf/*/*-C.omf
    220 %{_datadir}/gnome-games/sounds
    221 %dir %attr (0755, root, other) %{_datadir}/pixmaps
    222 %{_datadir}/pixmaps/*
    223 %attr (-, root, other) %{_datadir}/icons
    224 %{_datadir}/desktop-directories
    225 %dir %attr(0755, root, bin) %{_mandir}
    226 %dir %attr(0755, root, bin) %{_mandir}/man1
    227 %dir %attr(0755, root, bin) %{_mandir}/man5
    228 %{_mandir}/man5/*
    229 %dir %attr(0755, root, bin) %{_mandir}/man6
    230 %{_mandir}/man6/*
    231 %dir %attr(0755, root, bin) %{_mandir}/man7
    232 %{_mandir}/man7/*
    233 
    234 %if %build_l10n
    235 %files l10n
    236 %defattr (-, root, bin)
    237 %dir %attr (0755, root, sys) %{_datadir}
    238 %dir %attr (0755, root, other) %{_datadir}/gnome
    239 %attr (-, root, other) %{_datadir}/locale
    240 %{_datadir}/gnome/help/[a-z]*/[a-z]*
    241 %{_datadir}/omf/*/*-[a-z][a-z].omf
    242 %{_datadir}/omf/*/*-[a-z][a-z]_[A-Z][A-Z].omf
    243 %endif
    244 
    245 %files root
    246 %defattr (-, root, sys)
    247 %attr(0755, root, sys) %dir %{_sysconfdir}
    248 %{_sysconfdir}/gconf/schemas/glchess.schemas
    249 %{_sysconfdir}/gconf/schemas/glines.schemas
    250 %{_sysconfdir}/gconf/schemas/gnect.schemas
    251 %{_sysconfdir}/gconf/schemas/gnibbles.schemas
    252 %{_sysconfdir}/gconf/schemas/gnobots2.schemas
    253 %{_sysconfdir}/gconf/schemas/gnomine.schemas
    254 %{_sysconfdir}/gconf/schemas/gnotravex.schemas
    255 %{_sysconfdir}/gconf/schemas/gnotski.schemas
    256 %{_sysconfdir}/gconf/schemas/gtali.schemas
    257 %{_sysconfdir}/gconf/schemas/iagno.schemas
    258 %{_sysconfdir}/gconf/schemas/same-gnome.schemas
    259 %{_sysconfdir}/gconf/schemas/mahjongg.schemas
    260 %{_sysconfdir}/xdg
    261 #%{_sysconfdir}/ggz.modules
    262 
    263 %files devel
    264 %defattr (-, root, bin)
    265 %dir %attr (0755, root, bin) %dir %{_includedir}
    266 %{_includedir}/*
    267 %dir %attr (0755, root, sys) %{_datadir}
    268 %dir %attr(0755, root, bin) %{_mandir}
    269 %dir %attr(0755, root, bin) %{_mandir}/man3
    270 %{_mandir}/man3/*
    271 
    272 %changelog
    273 * Fri Jun 6 2008 - michal.pryc@sun.com
    274 - Added additional manual pages: libggz, libggzmod, libggzcore
    275 * Fri May 30 2008 - damien.carbery@sun.com
    276 - Delete %{_sysconfdir}/ggz.modules in %install. It is only created by gnect
    277   game when it finds /usr/bin/ggz-config. This happens when the module is built
    278   but already installed, not on first build.
    279 * Tue May 13 2008 - damien.carbery@sun.com
    280 - Comment out %{_sysconfdir}/ggz.modules in %files as it's not being installed
    281   this week.
    282 * Sun May 11 2008 - Michal.Pryc (at] Sun.Com
    283 - Adjusted %files after enabling encryption for libggz 
    284 * Mon Mar 24 2008 - patrick.ale (at] gmail.com
    285 - Add %_datadir/gnome-games/sounds to the package list
    286 * Wed Mar 19 2008 - damien.carbery (at] sun.com
    287 - Add Build/Requires SUNWgnome-games/-devel as sounds require gstreamer.
    288 * Fri Mar 14 2008 - damien.carbery (at] sun.com
    289 - Remove 'sounds' dir from %files as it is not installed by 2.22 tarball.
    290 * Sun Mar 09 2008 - damien.carbery (at] sun.com
    291 - Fix perms for -devel package.
    292 * Thu Mar 06 2008 - Michal.Pryc (at] Sun.Com
    293 - Moved man packages for headers to the devel package.
    294 * Thu Feb 28 2008 - brian.cameron (at] sun.com
    295 - Remove ggz-python since it isn't needed.  Sorry about the churn.
    296 * Wed Feb 27 2008 - brian.cameron@sun.com
    297 - Add gst-python, since glchess needs it.  Rename %{ggzmod_build_dir} to
    298   %{ggzclient_build_dir} since this is more accurate - the module is named
    299   ggz_client_libs.  Also add the ggzcore library to LD_LIBRARY_PATH and
    300   LDFLAGS since this is needed by gst-python.
    301 * Mon Feb 18 2008 - Michal.Pryc@Sun.Com
    302 - Update %files for ggz-client-libs patch, which removes ggzwrap manpages 
    303 * Fri Feb 15 2008 - damien.carbery@sun.com
    304 - Update %files for new tarball.
    305 * Tue Jan 29 2008 - damien.carbery@sun.com
    306 - Remove empty %{_libdir}/ggz dir.
    307 * Fri Jan 25 2008 - damien.carbery@sun.com
    308 - Add BuildRequires SUNWlibsdl-devel so that the modified sdl.m4 will be
    309   available to configure.
    310 * Sun Jan 20 2008 - patrick.ale@gmail.com
    311 - Rework the XGETTEXT detection.
    312 * Thu Jan 17 2008 - patrick.ale@gmail.com
    313 - Add export XGETTEXT=`which` to pickup GNU getetxt shipped by CBE
    314 * Wed Jan 09 2008 - damien.carbery@sun.com
    315 - Set ACLOCAL_FLAGS to pick up modified intltool.m4.
    316 * Mon Jan 07 2008 - damien.carbery@sun.com
    317 - Update CFLAGS to find ggzcore.h. Update %files. Add devel package but don't
    318   enable it as it is probably not useful.
    319 * Mon Jan 07 2008 - damien.carbery (at] sun.com
    320 - Add variable to specify location of ggzmod sources (in ggz-client-libs) and
    321   add info to CFLAGS and LDFLAGS.
    322 * Thu Jan  3 2008 - laca (at] sun.com
    323 - use gconf-install.script instead of an inline script
    324 * Wed Jan 02 2008 - damien.carbery (at] sun.com
    325 - Add ggz-client-libs module.
    326 - Add variable to specify location of libggz sources. Add info to CFLAGS and
    327   LDFLAGS.
    328 * Tue Dec 18 2007 - damien.carbery (at] sun.com
    329 - Add libggz module.
    330 * Wed Nov 21 2007 - damien.carbery (at] sun.com
    331 - Correct non-l10n build.
    332 * Mon Jun 11 2007 - damien.carbery (at] sun.com
    333 - Update %files to 2.19.6 tarball - add %{_datadir}/gnome-games/gnotski.
    334 * Mon Jun 11 2007 - damien.carbery (at] sun.com
    335 - Update %files to 2.19.3 tarball.
    336 * Wed Jun 06 2007 - damien.carbery (at] sun.com
    337 - Add $CXX dir to PATH so that configure can find it. Set $CXX to 'CC', again so
    338   configure can find it (via PATH).
    339 * Fri Mar 23 2007 - damien.carbery (at] sun.com
    340 - Add en_GB omf files to %files.
    341 * Tue Feb 20 2007 - damien.carbery (at] sun.com
    342 - Remove %if/%endif with_guile code as aisleriot is no longer built - it is
    343   excluded via a configure option in gnome-games.spec.
    344 * Fri Feb 16 2007 - damien.carbery (at] sun.com
    345 - Add Build/Requires SUNWgnome-python-desktop/-devel.
    346 * Mon Feb 12 2007 - damien.carbery (at] sun.com
    347 - aisleriot game is only built when SFEguile is installed. Use %if/%endif to 
    348   include its files only when SFEguile is installed.
    349 * Sat Feb 10 2007 - damien.carbery (at] sun.com
    350 - Add sol-games dir to %files and aisleriot.schemas to %files and %preun root.
    351 * Sun Jan 28 2007 - laca (at] sun.com
    352 - add -xc99 to CFLAGS
    353 * Tue Jan 09 2007 - damien.carbery (at] sun.com
    354 - Add glchess.schemas to %preun root and to %files.
    355 * Thu Dec 07 2006 - damien.carbery (at] sun.com
    356 - Add python libs dir and glchess/gnome-sudoku dirs.
    357 * Fri Nov 24 2006 - damien.carbery (at] sun.com
    358 - Remove empty %{_libdir}. Remove glchess and gnome-sudoku games as they were
    359   not installed.
    360 * Wed Nov 22 2006 - damien.carbery (at] sun.com
    361 - 2.17.1 changes - remove gataxx references; add glchess, gnome-sudoku and ggz
    362   games.
    363 * Thu Nov 09 2006 - damien.carbery (at] sun.com
    364 - Add BuildRequires SUNWgnome-vfs-devel as gnome-libs pc file requires
    365   gnome-vfs.
    366 * Mon Aug 21 2006 - damien.carbery (at] sun.com
    367 - Fix l10n package - C locale omf file was in base and l10n package.
    368 * Thu Aug 17 2006 - damien.carbery (at] sun.com
    369 - Change 'icons' line in %files to pick up files.
    370 * Sat Aug 12 2006 - laca (at] sun.com
    371 - delete some unnecessary env variables
    372 * Sat Aug 12 2006 - laca (at] sun.com
    373 - change datadir/icons permissions back to root:other since it's a stable
    374   interface and wasn't supposed to be changed
    375 * Fri Jul 14 2006 - laca (at] sun.com
    376 - update %post/%postun/etc scripts to support diskless client setup,
    377   part of 6448317
    378 * Thu Jun 29 2006 - laca (at] sun.com
    379 - update postrun scripts
    380 * Mon Jun 26 2006 - laca (at] sun.com
    381 - move back to /usr, part of CR 6412650
    382 * Sun Jun 11 2006 - laca (at] sun.com
    383 - change group from other to bin/sys
    384 * Sat Jun 10 2006 - laca (at] sun.com
    385 - delete -devel pkg: it was empty
    386 * Thu May 25 2006 - laca (at] sun.com
    387 - use post/preun scripts to install schemas into the merged gconf files
    388 * Wed May 10 2006 - laca (at] sun.com
    389 - merge -share pkg(s) into the base pkg(s)
    390 * Mon Feb 20 2006 - damien.carbery (at] sun.com
    391 - Complete update of Build/Requires after running check-deps.pl script.
    392 * Thu Feb 16 2006 - damien.carbery (at] sun.com
    393 - Update Build/Requires after running check-deps.pl script.
    394 * Fri Jan 06 2006 - damien.carbery (at] sun.com
    395 - Fix %files for updated file list.
    396 * Sat Dec  3 2005 - laca (at] sun.com
    397 - add %post script that runs update-desktop-database
    398 * Tue Nov 29 2005 - laca (at] sun.com
    399 - remove javahelp stuff
    400 * Tue Sep 13 2005 - laca (at] sun.com
    401 - Remove unpackaged files or add to %files
    402 * Thu Jul 28 2005 - damien.carbery (at] sun.com
    403 - Add SUNWlibrsvg-devel build dependency. Add SUNWlibrsvg runtime dependency.
    404 * Tue May 24 2005 - brian.cameron (at] sun.com
    405 - Bump to 2.10 and fix packaging.
    406 * Mon Dec 13 2004 - damien.carbery (at] sun.com
    407 - Move to /usr/sfw to implement ARC decision.
    408 * Fri Nov 12 2004 - laca (at] sun.com
    409 - move to /usr/demo/jds
    410 * Tue Oct 05 2004 - matt.keenan (at] sun.com
    411 - Added localized help to l10n package
    412 * Sat Oct 02 2004 - laca (at] sun.com
    413 - added %pkgbuild_postprocess
    414 * Mon Aug 23 2004 - laca (at] sun.com
    415 - s/SUNWpl5u/SUNWperl584usr/
    416 * Sat Jun 26 2004  shirley.woo (at] sun.com
    417 - Changed install location to /usr/...
    418 * Wed Jun  2 2004 - takao.fujiwara (at] sun.com
    419 - Added %{_datadir}/locale to install l10n messages
    420 * Thu May 27 2004 - damien.carbery (at] sun.com
    421 - Comment out SUNWcspu lines. Will uncomment when Metropolis branch created.
    422 * Wed May 26 2004 - damien.carbery (at] sun.com
    423 - Add SUNWcspu (with libucb.so and scandir) to Requires and BuildRequires.
    424   configure was breaking because of its absense.
    425 * Mon May 10 2004 - brian.cameron (at] sun.com
    426 - Putting back %{_sysconfig}/gconf into packaging which got 
    427   accidently simplified away in Laca's last change.  Now the
    428   games work again.
    429 * Tue Apr 20 2004 - laca@sun.com
    430 - simlify %files
    431 - add javahelp
    432 * Thu Apr 08 2004 - laca@sun.com
    433 - added missing %defattr
    434 * Fri Mar 26 2004 - brian.cameron@sun.com
    435 - Created,
    436