SUNWgnome-session.spec
author henryz
Wed, 09 Apr 2008 07:35:21 +0000
changeset 12065 ec40d145a28b
parent 12021 680b455c1854
child 12701 0ccd271ade31
permissions -rw-r--r--
+2008-04-09 Henry Zhang <[email protected]> + + * patches/virt-manager-04-temporary-patch.diff: + Change the patch to fix AllY bug, 6686007 +

#
# spec file for package SUNWgnome-session
#
# includes module(s): gnome-session
#
# 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: niall
#
%include Solaris.inc

%define with_hal %(pkginfo -q SUNWhal && echo 1 || echo 0)

%use gsession = gnome-session.spec

Name:                    SUNWgnome-session
Summary:                 GNOME session manager
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
Requires: SUNWgnome-vfs-root
Requires: SUNWgnome-libs
Requires: SUNWgnome-config
Requires: SUNWgnome-component
Requires: SUNWgnome-panel
Requires: SUNWperl584usr
Requires: SUNWbzip
Requires: SUNWzlib
Requires: SUNWlxml
Requires: SUNWgnome-audio
Requires: SUNWgnome-base-libs
Requires: SUNWpostrun
Requires: SUNWgnome-desktop-prefs
BuildRequires: SUNWgnome-audio-devel
BuildRequires: SUNWgnome-base-libs-devel
BuildRequires: SUNWgnome-vfs-devel
BuildRequires: SUNWgnome-libs-devel
BuildRequires: SUNWgnome-config-devel
BuildRequires: SUNWgnome-component-devel
BuildRequires: SUNWgnome-panel-devel
BuildRequires: SUNWgnome-desktop-prefs-devel

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

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

%prep
rm -rf %name-%version
mkdir %name-%version
%gsession.prep -d %name-%version
cd %{_builddir}/%name-%version
gzcat %SOURCE0 | tar xf -

%build
export PKG_CONFIG_PATH=%{_pkg_config_path}
export LDFLAGS="%_ldflags -L/usr/X11/lib -R/usr/X11/lib -L/usr/sfw/lib -R/usr/sfw/lib -L/usr/openwin/lib -R/usr/openwin/lib"
export CFLAGS="%optflags -I/usr/X11/include"
export RPM_OPT_FLAGS="$CFLAGS"

%gsession.build -d %name-%version

%install
rm -rf $RPM_BUILD_ROOT
%gsession.install -d %name-%version
rm -rf $RPM_BUILD_ROOT%{_mandir}
cd %{_builddir}/%name-%version/sun-manpages
make install DESTDIR=$RPM_BUILD_ROOT

rm -f $RPM_BUILD_ROOT%{_datadir}/pixmaps/splash/flash.gif
install -d $RPM_BUILD_ROOT%{_datadir}/autostart

%if %build_l10n
%else
# REMOVE l10n FILES
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
%endif

%{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $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

%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

%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/gnome-session.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, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/applications
%{_datadir}/applications/*
%dir %attr (0755, root, other) %{_datadir}/gnome
%{_datadir}/gnome/*
%attr (-, root, other) %{_datadir}/icons
%dir %attr (0755, root, other) %{_datadir}/pixmaps
%{_datadir}/pixmaps/*
%{_datadir}/xsessions
%attr (0755, root, sys) %{_datadir}/autostart
%dir %attr(0755, root, bin) %{_mandir}
%dir %attr(0755, root, bin) %{_mandir}/man1
%dir %attr(0755, root, bin) %{_mandir}/man5
%{_mandir}/man1/*
%{_mandir}/man5/*

%files root
%defattr (-, root, sys)
%attr (0755, root, sys) %dir %{_sysconfdir}
%{_sysconfdir}/gconf/schemas/gnome-session.schemas

%if %build_l10n
%files l10n
%defattr (-, root, bin)
%dir %attr (0755, root, sys) %{_datadir}
%attr (-, root, other) %{_datadir}/locale
%endif

%changelog
* Thu Jan 17 2008 - [email protected]
- Add %{_datadir}/xsessions to %files for 2.21.5 tarball.
* Thu Jan  3 2008 - [email protected]
- use gconf-install.script instead of an inline script
* Fri Sep 28 2007 - [email protected]
- delete Nevada X deps
- delete some unneeded env vars
* Wed Jun 06 2007 - [email protected]
- remove %if %with_hal section because it is useless. 
* Tue Apr 24 2007 - [email protected]
- s/0755/-/ in defattr so that files are not made all executable
* Sun Jan 28 2007 - add /usr/openwin/lib to library search path, needed
  for libXau on s10
* Mon Jan 22 2007 - [email protected]
- Add %{_datadir}/icons to %files for new gnome-session tarball.
* Tue Oct 31 2006 - [email protected]
- Added l10n package. Fixes 6488189.
* Mon Oct 30 2006 - [email protected]
- move patch gnome-session-01-gnome-volcheck-default-session.diff
  to ../patches/
* Mon Sep 04 2006 - [email protected]
- New Manpage tarball
* Fri Jul 26 2006 - [email protected]
- Only apply the gnome-volcheck-default-session.diff patch if HAL is not
  present on the system.  
* Fri Jul 28 2006 - [email protected]
- Remove l10n pkg as nothing installed.
* Wed Jul 26 2006 - [email protected]
- Add Build/Requires SUNWgnome-desktop-prefs/-devel for gnome-settings-daemon.
* 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
* Fri Jun 23 2006 - [email protected]
- Removed gnome-smproxy manpage because it is no longer needed
* Sun Jun 11 2006 - [email protected]
- change group from other to bin/sys
* Thu May 25 2006 - [email protected]
- use post/preun scripts to install schemas into the merged gconf files
* Fri May 12 2006 - [email protected]
- Add dummy autostart location so that we at least have it on the
  system if people want to use it.
* Wed May 10 2006 - [email protected]
- merge -share pkg(s) into the base pkg(s)
* Mon Feb 20 2006 - [email protected]
- Update Build/Requires after running check-deps.pl script.
* Tue Feb 14 2006 - [email protected]
- Add Build/Requires SUNWgnome-panel/-devel for gnome-desktop.
* Fri Feb 10 2006 - [email protected]
- Added BuildRequires lines to ensure it is built in the correct order.
* Sat Dec  3 2005 - [email protected]
- add %post script that runs update-desktop-database
* Thu May 19 2005 - [email protected]
- Update to 2.10 and fix packaging.
* Tue Nov 16 2004 - [email protected]
- merged devel-share into share (included default.session(5) only)
* Sat Oct 02 2004 - [email protected]
- added %pkgbuild_postprocess
* Sat Sep 11 2004 - [email protected]
- Set LDFLAGS so Xrandr and Xrender can be found.
* Thu Sep 09 2004 - [email protected]
- Added gnome-session-remove.1 manpage
* Mon Aug 30 2004 - [email protected]
- Bug 5091588 : include files should be in a separate devel package
* Mon Aug 23 2004 - [email protected]
- s/SUNWpl5u/SUNWperl584usr/
* Wed Aug 18 2004  [email protected]
- Change manpage perms for Solaris integration.
* Sat Jun 26 2004  [email protected]
- Changed install location to /usr/...
* Wed Jun  2 2004 - [email protected]
- Added %{_datadir}/locale to install l10n messages
* Fri Mar 28 2004 - [email protected]
- Removed flash.gif from distribution
* Wed Mar 24 2004 - [email protected]
- Added SGML man page integration
* Thu Mar 04 2004 - <[email protected]>
- fix 2 more gconf clashes
* Sat Feb 28 2004 - <[email protected]>
- fix gconf dir permissions (a+rX)
- remove clashing gconf.xml file
* Mon Feb 23 2004 - <[email protected]>
- install gconf schemas at end of install stage.