SUNWgnome-games.spec
author migi
Fri, 28 Mar 2008 11:42:00 +0000
branchgnome-2-20
changeset 10897 66c5fd4856bb
parent 10809 8ee53dcdb0de
permissions -rw-r--r--
2008-03-28 Michal Pryc <[email protected]> * copyright/SUNWgnome-games.copyright: New * copyright/SUNWgnome-dialog.copyright: New * copyright/SUNWgnome-applets.copyright: New * SUNWgnome-games.spec: Added SUNW_Copyright * SUNWgnome-dialog.spec: Added SUNW_Copyright * SUNWgnome-applets.spec: Added SUNW_Copyright


# spec file for package SUNWgnome-games
#
# includes module(s): gnome-games
#
# Copyright (c) 2004 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

Name:                    SUNWgnome-games
Summary:                 GNOME games
Version:                 %{default_pkg_version}
SUNW_BaseDir:            %{_basedir}
SUNW_Copyright:          %{name}.copyright
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
%gnome_games.prep -d %name-%version

%build
export PKG_CONFIG_PATH=%{_pkg_config_path}
export CFLAGS="%optflags -I%{_includedir} -I/usr/sfw/include -xc99"
export RPM_OPT_FLAGS="$CFLAGS"
export LDFLAGS="%_ldflags -lX11 -L/usr/sfw/lib -lexpat"
export PATH="$PATH:"`dirname $CXX`
export CXX=`basename $CXX`

%gnome_games.build -d %name-%version

%install
rm -rf $RPM_BUILD_ROOT
%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}
# Remove these empty dirs.
rmdir $RPM_BUILD_ROOT%{_includedir}

%if %build_l10n
%else
# REMOVE l10n FILES*files-list*
rm -r $RPM_BUILD_ROOT%{_datadir}/locale
rm -r $RPM_BUILD_ROOT%{_datadir}/gnome/help/[a-z]*/[a-z]*
rm -r $RPM_BUILD_ROOT%{_datadir}/omf/*/*-[a-z]*.omf
rmdir $RPM_BUILD_ROOT%{_datadir}/omf/gnome-sudoku
rmdir $RPM_BUILD_ROOT%{_datadir}/omf/gnome-games
rmdir $RPM_BUILD_ROOT%{_datadir}/omf/same-gnome
%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
( echo 'test -x /usr/bin/gconftool-2 || {';
  echo '  echo "ERROR: gconftool-2 not found"';
  echo '  exit 0';
  echo '}';
  echo 'umask 0022';
  echo 'GCONF_CONFIG_SOURCE=xml:merged:/etc/gconf/gconf.xml.defaults';
  echo 'export GCONF_CONFIG_SOURCE';
  echo '/usr/bin/gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/*.schemas'
) | $BASEDIR/var/lib/postrun/postrun -u -c JDS_wait

%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
* Fri Feb 22 2008 - [email protected]
- Remove some empty dirs for non-l10n builds.
* 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,