Solaris/SUNWgnome-session.spec
author dc144907
Wed, 26 Jul 2006 12:26:58 +0000
changeset 7767 d558712ac65a
parent 7651 316e279bf756
child 7826 4a1493fa960f
permissions -rw-r--r--
2006-07-26 Damien Carbery <[email protected]> * SUNWgnome-session.spec, SUNWtgnome-xagent.spec: Add Build/Requires SUNWgnome-desktop-prefs/-devel for gnome-settings-daemon.

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

%include Solaris.inc

%use gsession = gnome-session.spec

Name:                    SUNWgnome-session
Summary:                 GNOME session manager
Version:                 %{default_pkg_version}
Source:                  gnome-session-properties.1
Source1:                 gnome-session-save.1
Source2:                 gnome-session.1
Source4:                 gnome-wm.1
Source5:                 default.session.5
Source6:                 gnome-session-remove.1
SUNW_BaseDir:            %{_basedir}
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: SUNWxwrtl
Requires: SUNWxorg-clientlibs
Requires: SUNWgnome-audio
Requires: SUNWgnome-base-libs
Requires: SUNWpostrun
Requires: SUNWgnome-desktop-prefs
BuildRequires: SUNWgnome-audio-devel
BuildRequires: SUNWgnome-base-libs-devel
BuildRequires: SUNWxorg-headers
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

%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: SUNWpostrun-root
Requires: SUNWgnome-config

%prep
rm -rf %name-%version
mkdir %name-%version
%gsession.prep -d %name-%version

%build
export PERL5LIB=%{_prefix}/perl5/site_perl/5.6.1/sun4-solaris-64int
export PKG_CONFIG_PATH=%{_pkg_config_path}
export MSGFMT="/usr/bin/msgfmt"
export ACLOCAL_FLAGS="-I %{_datadir}/aclocal"
export LDFLAGS="%_ldflags -L/usr/X11/lib -R/usr/X11/lib -L/usr/sfw/lib -R/usr/sfw/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}
install -d $RPM_BUILD_ROOT%{_mandir}/sman1
install --mode=0755 %SOURCE0 $RPM_BUILD_ROOT%{_mandir}/sman1
install --mode=0755 %SOURCE1 $RPM_BUILD_ROOT%{_mandir}/sman1
install --mode=0755 %SOURCE2 $RPM_BUILD_ROOT%{_mandir}/sman1
install --mode=0755 %SOURCE4 $RPM_BUILD_ROOT%{_mandir}/sman1
install --mode=0755 %SOURCE6 $RPM_BUILD_ROOT%{_mandir}/sman1
install -d $RPM_BUILD_ROOT%{_mandir}/sman5
install --mode=0755 %SOURCE5 $RPM_BUILD_ROOT%{_mandir}/sman5
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
( 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
( 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/*
%dir %attr (0755, root, other) %{_datadir}/pixmaps
%{_datadir}/pixmaps/*
%attr (0755, root, sys) %{_datadir}/autostart
%dir %attr(0755, root, bin) %{_mandir}
%dir %attr(0755, root, bin) %{_mandir}/sman1
%dir %attr(0755, root, bin) %{_mandir}/sman5
%{_mandir}/sman1/*
%{_mandir}/sman5/*

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

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

%changelog
* 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.