SUNWgnome-games.spec
author laca
Thu, 03 Jan 2008 08:23:25 +0000
changeset 11370 338c15c66cee
parent 11367 afc49571d1ad
child 11402 6645f16b8ab2
permissions -rw-r--r--
2008-01-03 Laszlo (Laca) Peter <[email protected]> * include/gconf-install.script: return 1 if gconftool-2 is not found; redirect stdout to /dev/null so that errors are more easily noticed and postrun.log is shorter * SUNWevolution-exchange.spec, SUNWevolution-webcal.spec, SUNWevolution.spec, SUNWgnome-a11y-dasher.spec, SUNWgnome-a11y-gok.spec, SUNWgnome-a11y-poke.spec, SUNWgnome-applets.spec, SUNWgnome-archive-mgr.spec, SUNWgnome-calculator.spec, SUNWgnome-cd-burner.spec, SUNWgnome-cd.spec, SUNWgnome-character-map.spec, SUNWgnome-config-editor.spec, SUNWgnome-crash-report.spec, SUNWgnome-desktop-prefs.spec, SUNWgnome-devhelp.spec, SUNWgnome-file-mgr.spec, SUNWgnome-games.spec, SUNWgnome-hex-editor.spec, SUNWgnome-im-client.spec, SUNWgnome-img-organizer.spec, SUNWgnome-img-viewer.spec, SUNWgnome-keyring-manager.spec, SUNWgnome-libs.spec, SUNWgnome-media-apps.spec, SUNWgnome-media-player.spec, SUNWgnome-media.spec, SUNWgnome-meeting.spec, SUNWgnome-pdf-viewer.spec, SUNWgnome-pilot.spec, SUNWgnome-print.spec, SUNWgnome-remote-desktop.spec, SUNWgnome-session.spec, SUNWgnome-system-monitor.spec, SUNWgnome-system-tools.spec, SUNWgnome-terminal.spec, SUNWgnome-text-editor.spec, SUNWgnome-utils.spec, SUNWgnome-vfs.spec, SUNWgnome-wm.spec, SUNWprint-monitor.spec, SUNWvirt-manager.spec: %include gconf-install.script instead of inlining it.


# spec file for package SUNWgnome-games
#
# includes module(s): gnome-games, libggz, ggz-client-libs
#
# Copyright 2008 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Owner: gman
#
%include Solaris.inc

%define makeinstall make install DESTDIR=$RPM_BUILD_ROOT
%use gnome_games = gnome-games.spec
%use libggz = libggz.spec
%use ggz_client_libs = ggz-client-libs.spec

Name:                    SUNWgnome-games
Summary:                 GNOME games
Version:                 %{default_pkg_version}
SUNW_BaseDir:            %{_basedir}
BuildRoot:               %{_tmppath}/%{name}-%{version}-build

%include default-depend.inc
BuildRequires: SUNWlibrsvg-devel
BuildRequires: SUNWPython-devel
BuildRequires: SUNWgnome-libs-devel
BuildRequires: SUNWgnome-vfs-devel
BuildRequires: SUNWgnome-config-devel
BuildRequires: SUNWgnome-base-libs-devel
BuildRequires: SUNWgnome-python-desktop-devel
Requires: SUNWgnome-libs
Requires: SUNWgnome-config
Requires: SUNWlibms
Requires: SUNWgnome-base-libs
Requires: SUNWgnome-python-desktop
Requires: SUNWlibrsvg
Requires: SUNWPython
Requires: SUNWpostrun

%if %build_l10n
%package l10n
Summary:                 %{summary} - l10n files
SUNW_BaseDir:            %{_basedir}
%include default-depend.inc
Requires:                %{name}
%endif

%package root
Summary:                 %{summary} - / filesystem
SUNW_BaseDir:            /
%include default-depend.inc
Requires: SUNWgnome-libs
Requires: SUNWpostrun-root
Requires: SUNWgnome-config

%prep
rm -rf %name-%version
mkdir %name-%version
%libggz.prep -d %name-%version
%ggz_client_libs.prep -d %name-%version
%gnome_games.prep -d %name-%version

%build
%define libggz_build_dir %{_builddir}/%name-%version/libggz-%{libggz.version}
export PKG_CONFIG_PATH=%{_pkg_config_path}
export CFLAGS="%optflags -I%{_includedir} -I/usr/sfw/include -xc99 -I%{libggz_build_dir}/src"
export RPM_OPT_FLAGS="$CFLAGS"
export LDFLAGS="%_ldflags -lX11 -L/usr/sfw/lib -lexpat -L%{libggz_build_dir}/src/.libs"
export LD_LIBRARY_PATH="%{libggz_build_dir}/src/.libs"
export PATH="$PATH:"`dirname $CXX`
export CXX=`basename $CXX`

%libggz.build -d %name-%version
%ggz_client_libs.build -d %name-%version
%gnome_games.build -d %name-%version

%install
rm -rf $RPM_BUILD_ROOT
%libggz.install -d %name-%version
%ggz_client_libs.install -d %name-%version
%gnome_games.install -d %name-%version

rm -rf $RPM_BUILD_ROOT%{_localstatedir}/lib/games
rmdir $RPM_BUILD_ROOT%{_localstatedir}/lib
rmdir $RPM_BUILD_ROOT%{_localstatedir}
rm -rf $RPM_BUILD_ROOT%{_includedir}

%if %build_l10n
%else
# REMOVE l10n FILES*files-list*
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
rm -rf $RPM_BUILD_ROOT%{_datadir}/gnome/help/[a-z]*/[a-z]*
rm -rf $RPM_BUILD_ROOT%{_datadir}/omf/*/*-[a-z][a-z].omf
rm -rf $RPM_BUILD_ROOT%{_datadir}/omf/*/*-[a-z][a-z]_[A-Z][A-Z].omf
rmdir $RPM_BUILD_ROOT%{_datadir}/omf/gnome-games
%endif

%{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):unsupported" $RPM_BUILD_ROOT}

%clean
rm -rf $RPM_BUILD_ROOT

%post
( echo 'test -x /usr/bin/update-desktop-database || exit 0';
  echo '/usr/bin/update-desktop-database'
) | $BASEDIR/lib/postrun -b -u -c JDS_wait
( echo 'test -x /usr/bin/scrollkeeper-update || exit 0';
  echo '/usr/bin/scrollkeeper-update'
) | $BASEDIR/lib/postrun -b -u -c JDS

%postun
test -x $BASEDIR/lib/postrun || exit 0
( echo 'test -x /usr/bin/update-desktop-database || exit 0';
  echo '/usr/bin/update-desktop-database'
) | $BASEDIR/lib/postrun -b -u -c JDS
( echo 'test -x /usr/bin/scrollkeeper-update || exit 0';
  echo '/usr/bin/scrollkeeper-update'
) | $BASEDIR/lib/postrun -b -u -c JDS

%post root
%include gconf-install.script

%preun root
test -x $BASEDIR/var/lib/postrun/postrun || exit 0
( echo 'test -x $PKG_INSTALL_ROOT/usr/bin/gconftool-2 || {';
  echo '  echo "WARNING: gconftool-2 not found; not uninstalling gconf schemas"';
  echo '  exit 0';
  echo '}';
  echo 'umask 0022';
  echo 'GCONF_CONFIG_SOURCE=xml:merged:$BASEDIR/etc/gconf/gconf.xml.defaults';
  echo 'GCONF_BACKEND_DIR=$PKG_INSTALL_ROOT/usr/lib/GConf/2';
  echo 'LD_LIBRARY_PATH=$PKG_INSTALL_ROOT/usr/lib';
  echo 'export GCONF_CONFIG_SOURCE GCONF_BACKEND_DIR LD_LIBRARY_PATH';
  echo 'SDIR=$BASEDIR%{_sysconfdir}/gconf/schemas';
  echo 'schemas="$SDIR/glines.schemas';
  echo '         $SDIR/glchess.schemas';
  echo '         $SDIR/gnect.schemas';
  echo '         $SDIR/gnibbles.schemas';
  echo '         $SDIR/gnobots2.schemas';
  echo '         $SDIR/gnomine.schemas';
  echo '         $SDIR/gnotravex.schemas';
  echo '         $SDIR/gnotski.schemas';
  echo '         $SDIR/gtali.schemas';
  echo '         $SDIR/iagno.schemas';
  echo '         $SDIR/same-gnome.schemas';
  echo '         $SDIR/mahjongg.schemas"';
  echo '$PKG_INSTALL_ROOT/usr/bin/gconftool-2 --makefile-uninstall-rule $schemas'
) | $BASEDIR/var/lib/postrun/postrun -i -c JDS -a

%files
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_bindir}
%{_bindir}/*
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/gnome-games
%{_libdir}/python?.?/vendor-packages
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/applications
%{_datadir}/applications/*
%{_datadir}/gnect
%{_datadir}/ggz
%{_datadir}/gnibbles
%{_datadir}/gnobots2
%dir %attr (0755, root, other) %{_datadir}/gnome
%{_datadir}/gnome/help/*/C
%{_datadir}/glchess
%{_datadir}/gnome-games/gnotski
%{_datadir}/gnome-games/mahjongg
%{_datadir}/gnome-games/pixmaps
%{_datadir}/gnome-games/same-gnome
%{_datadir}/gnome-games/sounds
%{_datadir}/gnome-games-common
%{_datadir}/gnome-sudoku
%{_datadir}/omf/*/*-C.omf
%dir %attr (0755, root, other) %{_datadir}/pixmaps
%{_datadir}/pixmaps/*
%attr (-, root, other) %{_datadir}/icons

%if %build_l10n
%files l10n
%defattr (-, root, bin)
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/gnome
%attr (-, root, other) %{_datadir}/locale
%{_datadir}/gnome/help/[a-z]*/[a-z]*
%{_datadir}/omf/*/*-[a-z][a-z].omf
%{_datadir}/omf/*/*-[a-z][a-z]_[A-Z][A-Z].omf
%endif

%files root
%defattr (-, root, sys)
%attr(0755, root, sys) %dir %{_sysconfdir}
%{_sysconfdir}/gconf/schemas/glchess.schemas
%{_sysconfdir}/gconf/schemas/glines.schemas
%{_sysconfdir}/gconf/schemas/gnect.schemas
%{_sysconfdir}/gconf/schemas/gnibbles.schemas
%{_sysconfdir}/gconf/schemas/gnobots2.schemas
%{_sysconfdir}/gconf/schemas/gnomine.schemas
%{_sysconfdir}/gconf/schemas/gnotravex.schemas
%{_sysconfdir}/gconf/schemas/gnotski.schemas
%{_sysconfdir}/gconf/schemas/gtali.schemas
%{_sysconfdir}/gconf/schemas/iagno.schemas
%{_sysconfdir}/gconf/schemas/same-gnome.schemas
%{_sysconfdir}/gconf/schemas/mahjongg.schemas


%changelog
* Thu Jan  3 2008 - [email protected]
- use gconf-install.script instead of an inline script
* Wed Jan 02 2008 - [email protected]
- Add ggz-client-libs module.
- Add variable to specify location of libggz sources. Add info to CFLAGS and
  LDFLAGS.
* Tue Dec 18 2007 - [email protected]
- Add libggz module.
* Wed Nov 21 2007 - [email protected]
- Correct non-l10n build.
* Mon Jun 11 2007 - [email protected]
- Update %files to 2.19.6 tarball - add %{_datadir}/gnome-games/gnotski.
* Mon Jun 11 2007 - [email protected]
- Update %files to 2.19.3 tarball.
* Wed Jun 06 2007 - [email protected]
- Add $CXX dir to PATH so that configure can find it. Set $CXX to 'CC', again so
  configure can find it (via PATH).
* Fri Mar 23 2007 - [email protected]
- Add en_GB omf files to %files.
* Tue Feb 20 2007 - [email protected]
- Remove %if/%endif with_guile code as aisleriot is no longer built - it is
  excluded via a configure option in gnome-games.spec.
* Fri Feb 16 2007 - [email protected]
- Add Build/Requires SUNWgnome-python-desktop/-devel.
* Mon Feb 12 2007 - [email protected]
- aisleriot game is only built when SFEguile is installed. Use %if/%endif to 
  include its files only when SFEguile is installed.
* Sat Feb 10 2007 - [email protected]
- Add sol-games dir to %files and aisleriot.schemas to %files and %preun root.
* Sun Jan 28 2007 - [email protected]
- add -xc99 to CFLAGS
* Tue Jan 09 2007 - [email protected]
- Add glchess.schemas to %preun root and to %files.
* Thu Dec 07 2006 - [email protected]
- Add python libs dir and glchess/gnome-sudoku dirs.
* Fri Nov 24 2006 - [email protected]
- Remove empty %{_libdir}. Remove glchess and gnome-sudoku games as they were
  not installed.
* Wed Nov 22 2006 - [email protected]
- 2.17.1 changes - remove gataxx references; add glchess, gnome-sudoku and ggz
  games.
* Thu Nov 09 2006 - [email protected]
- Add BuildRequires SUNWgnome-vfs-devel as gnome-libs pc file requires
  gnome-vfs.
* Mon Aug 21 2006 - [email protected]
- Fix l10n package - C locale omf file was in base and l10n package.
* Thu Aug 17 2006 - [email protected]
- Change 'icons' line in %files to pick up files.
* Sat Aug 12 2006 - [email protected]
- delete some unnecessary env variables
* Sat Aug 12 2006 - [email protected]
- change datadir/icons permissions back to root:other since it's a stable
  interface and wasn't supposed to be changed
* Fri Jul 14 2006 - [email protected]
- update %post/%postun/etc scripts to support diskless client setup,
  part of 6448317
* Thu Jun 29 2006 - [email protected]
- update postrun scripts
* Mon Jun 26 2006 - [email protected]
- move back to /usr, part of CR 6412650
* Sun Jun 11 2006 - [email protected]
- change group from other to bin/sys
* Sat Jun 10 2006 - [email protected]
- delete -devel pkg: it was empty
* Thu May 25 2006 - [email protected]
- use post/preun scripts to install schemas into the merged gconf files
* Wed May 10 2006 - [email protected]
- merge -share pkg(s) into the base pkg(s)
* Mon Feb 20 2006 - [email protected]
- Complete update of Build/Requires after running check-deps.pl script.
* Thu Feb 16 2006 - [email protected]
- Update Build/Requires after running check-deps.pl script.
* Fri Jan 06 2006 - [email protected]
- Fix %files for updated file list.
* Sat Dec  3 2005 - [email protected]
- add %post script that runs update-desktop-database
* Tue Nov 29 2005 - [email protected]
- remove javahelp stuff
* Tue Sep 13 2005 - [email protected]
- Remove unpackaged files or add to %files
* Thu Jul 28 2005 - [email protected]
- Add SUNWlibrsvg-devel build dependency. Add SUNWlibrsvg runtime dependency.
* Tue May 24 2005 - [email protected]
- Bump to 2.10 and fix packaging.
* Mon Dec 13 2004 - [email protected]
- Move to /usr/sfw to implement ARC decision.
* Fri Nov 12 2004 - [email protected]
- move to /usr/demo/jds
* Tue Oct 05 2004 - [email protected]
- Added localized help to l10n package
* Sat Oct 02 2004 - [email protected]
- added %pkgbuild_postprocess
* Mon Aug 23 2004 - [email protected]
- s/SUNWpl5u/SUNWperl584usr/
* Sat Jun 26 2004  [email protected]
- Changed install location to /usr/...
* Wed Jun  2 2004 - [email protected]
- Added %{_datadir}/locale to install l10n messages
* Thu May 27 2004 - [email protected]
- Comment out SUNWcspu lines. Will uncomment when Metropolis branch created.
* Wed May 26 2004 - [email protected]
- Add SUNWcspu (with libucb.so and scandir) to Requires and BuildRequires.
  configure was breaking because of its absense.
* Mon May 10 2004 - [email protected]
- Putting back %{_sysconfig}/gconf into packaging which got 
  accidently simplified away in Laca's last change.  Now the
  games work again.
* Tue Apr 20 2004 - [email protected]
- simlify %files
- add javahelp
* Thu Apr 08 2004 - [email protected]
- added missing %defattr
* Fri Mar 26 2004 - [email protected]
- Created,