SUNWgnome-games.spec
author daniell
Wed, 13 Oct 2010 16:43:58 +0000
branchopensolaris-2009-06
changeset 20159 f18a6979f732
parent 14173 fe63d4719576
permissions -rw-r--r--
6965295 [CVE-2010-1205/CVE-2010-2249] Multiple security issues in libpng 1.2 versions before 1.2.44


# 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: migi
#
%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}
Source:                  %{name}-manpages-0.1.tar.gz
SUNW_BaseDir:            %{_basedir}
SUNW_Copyright:          %{name}.copyright
BuildRoot:               %{_tmppath}/%{name}-%{version}-build

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

%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

%package devel
Summary:                 %{summary} - development files
SUNW_BaseDir:            %{_basedir}
%include default-depend.inc
Requires:                %{name}

%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
cd %{_builddir}/%name-%version
gzcat %SOURCE0 | tar xf -

%build
%define libggz_build_dir %{_builddir}/%name-%version/libggz-%{libggz.version}
%define ggzclient_build_dir %{_builddir}/%name-%version/ggz-client-libs-%{ggz_client_libs.version}

export PKG_CONFIG_PATH=%{_pkg_config_path}
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"
export RPM_OPT_FLAGS="$CFLAGS"
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"
export LD_LIBRARY_PATH="%{libggz_build_dir}/src/.libs:%{ggzclient_build_dir}/ggzmod/.libs:%{ggzclient_build_dir}/ggzcore/.libs"
export PATH="$PATH:"`dirname $CXX`
export CXX=`basename $CXX`
export ACLOCAL_FLAGS="-I%{_datadir}/aclocal"

# find GNU xgettext
IFS=:
for dir in $PATH; do
  test -x "$dir/xgettext" && \
       "$dir/xgettext" --version 2>&1 | egrep -s 'GNU gettext' && \
       XGETTEXT="$dir/xgettext"
done
export XGETTEXT

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

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

# Remove the empty dir.
rmdir $RPM_BUILD_ROOT%{_libdir}/ggz

rm -rf $RPM_BUILD_ROOT%{_localstatedir}/lib/games
rmdir $RPM_BUILD_ROOT%{_localstatedir}/lib
rmdir $RPM_BUILD_ROOT%{_localstatedir}
# Delete the include files as we're not delivering a devel package. It's not
# useful.
#rm -rf $RPM_BUILD_ROOT%{_includedir}
rm $RPM_BUILD_ROOT%{_libdir}/*.a
rm $RPM_BUILD_ROOT%{_libdir}/*.la

# /etc/ggz.modules is created by gnect game when it finds /usr/bin/ggz-config.
# This happens when the module is built but already installed, not on 1st build.
if [ -f $RPM_BUILD_ROOT%{_sysconfdir}/ggz.modules ]; then
 rm $RPM_BUILD_ROOT%{_sysconfdir}/ggz.modules
fi

cd %{_builddir}/%name-%version/sun-manpages
make install DESTDIR=$RPM_BUILD_ROOT

%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
%doc -d gnome-games-%{gnome_games.version} MAINTAINERS README gnome-sudoku/README dependencies/gnuchess/README same-gnome/README gnotski/README gnomine/README gtali/README glchess/README gnotravex/README COPYING COPYING-DOCS AUTHORS gnome-sudoku/AUTHORS glines/AUTHORS gnotski/AUTHORS gnomine/AUTHORS gnect/AUTHORS gtali/AUTHORS gnobots2/AUTHORS gnotravex/AUTHORS gnibbles/AUTHORS iagno/AUTHORS
%doc(bzip2) -d gnome-games-%{gnome_games.version} NEWS ChangeLog same-gnome/help/ChangeLog po/ChangeLog
%doc libggz-%{libggz.version}/AUTHORS
%doc libggz-%{libggz.version}/README
%doc libggz-%{libggz.version}/README.GGZ
%doc libggz-%{libggz.version}/COPYING
%doc(bzip2) libggz-%{libggz.version}/ChangeLog
%doc(bzip2) libggz-%{libggz.version}/NEWS
%doc ggz-client-libs-%{ggz_client_libs.version}/AUTHORS
%doc ggz-client-libs-%{ggz_client_libs.version}/README
%doc ggz-client-libs-%{ggz_client_libs.version}/README.GGZ
%doc ggz-client-libs-%{ggz_client_libs.version}/COPYING 
%doc(bzip2) ggz-client-libs-%{ggz_client_libs.version}/ChangeLog
%doc(bzip2) ggz-client-libs-%{ggz_client_libs.version}/NEWS
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_bindir}
%{_bindir}/*
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/gnome-games
%{_libdir}/libggz*
%{_libdir}/python?.?/vendor-packages
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/doc
%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/icons
%{_datadir}/gnome-games/mahjongg
%{_datadir}/gnome-games/pixmaps
%{_datadir}/gnome-games/same-gnome
%{_datadir}/gnome-games-common
%{_datadir}/gnome-sudoku
%{_datadir}/omf/*/*-C.omf
%{_datadir}/gnome-games/sounds
%dir %attr (0755, root, other) %{_datadir}/pixmaps
%{_datadir}/pixmaps/*
%attr (-, root, other) %{_datadir}/icons
%{_datadir}/desktop-directories
%dir %attr(0755, root, bin) %{_mandir}
%dir %attr(0755, root, bin) %{_mandir}/man1
%dir %attr(0755, root, bin) %{_mandir}/man5
%{_mandir}/man5/*
%dir %attr(0755, root, bin) %{_mandir}/man6
%{_mandir}/man6/*
%dir %attr(0755, root, bin) %{_mandir}/man7
%{_mandir}/man7/*

%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
%{_sysconfdir}/xdg
#%{_sysconfdir}/ggz.modules

%files devel
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %dir %{_includedir}
%{_includedir}/*
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr(0755, root, bin) %{_mandir}
%dir %attr(0755, root, bin) %{_mandir}/man3
%{_mandir}/man3/*

%changelog
* Sat Sep 20 2008 - [email protected]
- Set perms on /usr/share/doc.
* Fri Jun 6 2008 - [email protected]
- Added additional manual pages: libggz, libggzmod, libggzcore
* Fri May 30 2008 - [email protected]
- Delete %{_sysconfdir}/ggz.modules in %install. It is only created by gnect
  game when it finds /usr/bin/ggz-config. This happens when the module is built
  but already installed, not on first build.
* Tue May 13 2008 - [email protected]
- Comment out %{_sysconfdir}/ggz.modules in %files as it's not being installed
  this week.
* Sun May 11 2008 - [email protected]
- Adjusted %files after enabling encryption for libggz 
* Mon Mar 24 2008 - [email protected]
- Add %_datadir/gnome-games/sounds to the package list
* Wed Mar 19 2008 - [email protected]
- Add Build/Requires SUNWgnome-games/-devel as sounds require gstreamer.
* Fri Mar 14 2008 - [email protected]
- Remove 'sounds' dir from %files as it is not installed by 2.22 tarball.
* Sun Mar 09 2008 - [email protected]
- Fix perms for -devel package.
* Thu Mar 06 2008 - [email protected]
- Moved man packages for headers to the devel package.
* Thu Feb 28 2008 - [email protected]
- Remove ggz-python since it isn't needed.  Sorry about the churn.
* Wed Feb 27 2008 - [email protected]
- Add gst-python, since glchess needs it.  Rename %{ggzmod_build_dir} to
  %{ggzclient_build_dir} since this is more accurate - the module is named
  ggz_client_libs.  Also add the ggzcore library to LD_LIBRARY_PATH and
  LDFLAGS since this is needed by gst-python.
* Mon Feb 18 2008 - [email protected]
- Update %files for ggz-client-libs patch, which removes ggzwrap manpages 
* Fri Feb 15 2008 - [email protected]
- Update %files for new tarball.
* Tue Jan 29 2008 - [email protected]
- Remove empty %{_libdir}/ggz dir.
* Fri Jan 25 2008 - [email protected]
- Add BuildRequires SUNWlibsdl-devel so that the modified sdl.m4 will be
  available to configure.
* Sun Jan 20 2008 - [email protected]
- Rework the XGETTEXT detection.
* Thu Jan 17 2008 - [email protected]
- Add export XGETTEXT=`which` to pickup GNU getetxt shipped by CBE
* Wed Jan 09 2008 - [email protected]
- Set ACLOCAL_FLAGS to pick up modified intltool.m4.
* Mon Jan 07 2008 - [email protected]
- Update CFLAGS to find ggzcore.h. Update %files. Add devel package but don't
  enable it as it is probably not useful.
* Mon Jan 07 2008 - [email protected]
- Add variable to specify location of ggzmod sources (in ggz-client-libs) and
  add info to CFLAGS and LDFLAGS.
* 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,