SUNWgnome-applets.spec
author laca
Thu, 27 Sep 2007 20:02:39 +0000
changeset 10560 cde974d3af9b
parent 10350 9744c4fe6d28
child 10572 8cdee8cd9c9c
permissions -rw-r--r--
2007-09-27 Laszlo (Laca) Peter <[email protected]> * SUNWgnome-applets.spec: add postrun script that rebuilds the icon cache for each package that installs icons. Note: postrun will only run this script once because it's exactly the same in each pkg and postrun is called with -u (unique)

#
# spec file for package SUNWgnome-applets
#
# includes module(s): gnome-applets, quick-lounge-applet
#		      gnome-netstatus, deskbar-applet
#
# 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
%use gapplets = gnome-applets.spec
%use qlounge = quick-lounge-applet.spec
%use gnetstatus = gnome-netstatus.spec
%use deskbar_applet = deskbar-applet.spec

Name:                    SUNWgnome-applets
Summary:                 GNOME panel applets
Version:                 %{default_pkg_version}
SUNW_BaseDir:            %{_basedir}
BuildRoot:               %{_tmppath}/%{name}-%{version}-build
%include default-depend.inc
BuildRequires: SUNWgnome-media
BuildRequires: SUNWgnome-media-devel
BuildRequires: SUNWgnome-character-map-devel
BuildRequires: SUNWgnome-doc-utils
BuildRequires: SUNWgnome-vfs-devel
BuildRequires: SUNWgnome-panel-devel
BuildRequires: SUNWgnome-python-desktop-devel
BuildRequires: SUNWsolnm
BuildRequires: SUNWarc
BuildRequires: SUNWevolution-data-server-devel
BuildRequires: SUNWlibgtop
Requires: SUNWgnome-python-desktop
Requires: SUNWgnome-character-map
Requires: SUNWgnome-panel
Requires: SUNWgnome-libs
Requires: SUNWgnome-config
Requires: SUNWgnome-base-libs
Requires: SUNWgnome-vfs
Requires: SUNWlxml
Requires: SUNWgnome-component
Requires: SUNWxwplt
Requires: SUNWlibpopt
Requires: SUNWlibms
Requires: SUNWpng
Requires: SUNWlibgtop

%ifarch i386
Requires: SUNWxorg-xkb
BuildRequires: SUNWxorg-xkb
%endif
Requires: SUNWxorg-clientlibs
BuildRequires: SUNWxorg-clientlibs

%package -n SUNWgnome-fun-applets
Summary:                 %{summary} - amusements
SUNW_BaseDir:            %{_basedir}
%include default-depend.inc
Requires: SUNWgnome-fun-applets-root
Requires: SUNWgnome-applets
Requires: SUNWgnome-panel
Requires: SUNWgnome-libs
Requires: SUNWgnome-base-libs
Requires: SUNWgnome-config
Requires: SUNWlibms
Requires: SUNWpostrun

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

%package -n SUNWgnome-internet-applets
Summary:                 %{summary} - internet
SUNW_BaseDir:            %{_basedir}
%include default-depend.inc
Requires: SUNWgnome-internet-applets-root
Requires: SUNWgnome-applets
Requires: SUNWgnome-panel
Requires: SUNWgnome-libs
Requires: SUNWgnome-base-libs
Requires: SUNWgnome-config
Requires: SUNWgnome-vfs
Requires: SUNWlibms
Requires: SUNWlxml
Requires: SUNWpostrun

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

%package -n SUNWgnome-internet-applets-devel
Summary:                 %{summary} - internet - development files
SUNW_BaseDir:            %{_basedir}
%include default-depend.inc

%package -n SUNWgnome-intranet-applets
Summary:                 %{summary} - intranet
SUNW_BaseDir:            %{_basedir}
%include default-depend.inc
Requires: SUNWgnome-intranet-applets-root
Requires: SUNWgnome-applets
Requires: SUNWgnome-panel
Requires: SUNWgnome-libs
Requires: SUNWgnome-base-libs
Requires: SUNWgnome-config
Requires: SUNWlibms
Requires: SUNWpostrun

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

%package -n SUNWgnome-mm-applets
Summary:                 %{summary} - multimedia
SUNW_BaseDir:            %{_basedir}
%include default-depend.inc
Requires: SUNWgnome-mm-applets-root
Requires: SUNWgnome-applets
Requires: SUNWgnome-panel
Requires: SUNWgnome-media
Requires: SUNWgnome-libs
Requires: SUNWgnome-base-libs
Requires: SUNWgnome-config
Requires: SUNWlibms
Requires: SUNWpostrun

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

%package -n SUNWgnome-utility-applets
Summary:                 %{summary} - utility
SUNW_BaseDir:            %{_basedir}
%include default-depend.inc
Requires: SUNWgnome-python-desktop
Requires: SUNWgnome-utility-applets-root
Requires: SUNWgnome-applets
Requires: SUNWgnome-panel
Requires: SUNWgnome-libs
Requires: SUNWgnome-base-libs
Requires: SUNWgnome-config
Requires: SUNWgnome-character-map
Requires: SUNWgnome-component
Requires: SUNWgnome-vfs
Requires: SUNWevolution-data-server
Requires: SUNWlxml
Requires: SUNWxwrtl
Requires: SUNWlibms
Requires: SUNWpostrun

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

%package -n SUNWgnome-utility-applets-devel
Summary:                 %{summary} - utility - development files
SUNW_BaseDir:            %{_basedir}
%include default-depend.inc

%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
%gapplets.prep -d %name-%version
%qlounge.prep -d %name-%version
%gnetstatus.prep -d %name-%version
%deskbar_applet.prep -d %name-%version
chmod -R u+w %{_builddir}/%name-%version

%build
PKG_CONFIG_DISABLE_UNINSTALLED=
unset PKG_CONFIG_DISABLE_UNINSTALLED
export CPPFLAGS="-I/usr/sfw/include"
export CFLAGS="%optflags -I/usr/sfw/include -DANSICPP"
export RPM_OPT_FLAGS="$CFLAGS"
export LDFLAGS="%_ldflags -L/usr/sfw/lib -R/usr/sfw/lib -L/usr/X11/lib -R/usr/X11/lib -lX11"

%gapplets.build -d %name-%version

export LDFLAGS="%_ldflags -L/usr/sfw/lib -R/usr/sfw/lib"

%qlounge.build -d %name-%version
%gnetstatus.build -d %name-%version
%deskbar_applet.build -d %name-%version

%install
rm -rf $RPM_BUILD_ROOT
%gapplets.install -d %name-%version
%qlounge.install -d %name-%version
%gnetstatus.install -d %name-%version
%deskbar_applet.install -d %name-%version

# Remove the invest-chart files as it is not in the UI spec (#6488895).
rm $RPM_BUILD_ROOT%{_bindir}/invest-chart

chmod 0644 $RPM_BUILD_ROOT%{_datadir}/gnome/help/*/C/*.xml

#rm -r $RPM_BUILD_ROOT%{_prefix}/var

# Never install English locales because should support full functions
# on English locales as same as Solaris. See SUNWzz-gnome-l10n.spec.
rm -r $RPM_BUILD_ROOT%{_datadir}/locale/en_GB
rm -r $RPM_BUILD_ROOT%{_datadir}/gnome/help/*/en_GB
rm -r $RPM_BUILD_ROOT%{_datadir}/omf/*/*-en_GB.omf

%if %build_l10n
%else
# REMOVE l10n FILES
rm -r $RPM_BUILD_ROOT%{_datadir}/locale
rm -r $RPM_BUILD_ROOT%{_datadir}/gnome/help/[a-c]*/[a-z]*
rm -r $RPM_BUILD_ROOT%{_datadir}/gnome/help/[e-z]*/[a-z]*
rm -r $RPM_BUILD_ROOT%{_datadir}/omf/*/*-[a-z][a-z].omf
rm -r $RPM_BUILD_ROOT%{_datadir}/omf/*/*-[a-z][a-z]_[A-Z][A-Z].omf
%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 -n SUNWgnome-fun-applets
( echo 'test -x /usr/bin/scrollkeeper-update || exit 0';
  echo '/usr/bin/scrollkeeper-update'
) | $BASEDIR/lib/postrun -b -u -c JDS
( echo 'test -x /usr/bin/gtk-update-icon-cache || exit 0';
  echo 'rm -f %{_datadir}/icons/*/icon-theme.cache';
  echo 'ls -d %{_datadir}/icons/* | xargs -l1 /usr/bin/gtk-update-icon-cache'
) | $BASEDIR/lib/postrun -b -u -t 5 -c JDS

%postun -n SUNWgnome-fun-applets
test -x $BASEDIR/lib/postrun || exit 0
( echo 'test -x /usr/bin/scrollkeeper-update || exit 0';
  echo '/usr/bin/scrollkeeper-update'
) | $BASEDIR/lib/postrun -b -u -c JDS
( echo 'test -x /usr/bin/gtk-update-icon-cache || exit 0';
  echo 'rm -f %{_datadir}/icons/*/icon-theme.cache';
  echo 'ls -d %{_datadir}/icons/* | xargs -l1 /usr/bin/gtk-update-icon-cache'
) | $BASEDIR/lib/postrun -b -u -t 5 -c JDS

%post -n SUNWgnome-internet-applets
( echo 'test -x /usr/bin/scrollkeeper-update || exit 0';
  echo '/usr/bin/scrollkeeper-update'
) | $BASEDIR/lib/postrun -b -u -c JDS

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

%post -n SUNWgnome-intranet-applets
( echo 'test -x /usr/bin/scrollkeeper-update || exit 0';
  echo '/usr/bin/scrollkeeper-update'
) | $BASEDIR/lib/postrun -b -u -c JDS
( echo 'test -x /usr/bin/gtk-update-icon-cache || exit 0';
  echo 'rm -f %{_datadir}/icons/*/icon-theme.cache';
  echo 'ls -d %{_datadir}/icons/* | xargs -l1 /usr/bin/gtk-update-icon-cache'
) | $BASEDIR/lib/postrun -b -u -t 5 -c JDS

%postun -n SUNWgnome-intranet-applets
test -x $BASEDIR/lib/postrun || exit 0
( echo 'test -x /usr/bin/scrollkeeper-update || exit 0';
  echo '/usr/bin/scrollkeeper-update'
) | $BASEDIR/lib/postrun -b -u -c JDS
( echo 'test -x /usr/bin/gtk-update-icon-cache || exit 0';
  echo 'rm -f %{_datadir}/icons/*/icon-theme.cache';
  echo 'ls -d %{_datadir}/icons/* | xargs -l1 /usr/bin/gtk-update-icon-cache'
) | $BASEDIR/lib/postrun -b -u -t 5 -c JDS

%post -n SUNWgnome-mm-applets
( echo 'test -x /usr/bin/scrollkeeper-update || exit 0';
  echo '/usr/bin/scrollkeeper-update'
) | $BASEDIR/lib/postrun -b -u -c JDS

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

%post -n SUNWgnome-utility-applets
( echo 'test -x /usr/bin/scrollkeeper-update || exit 0';
  echo '/usr/bin/scrollkeeper-update'
) | $BASEDIR/lib/postrun -b -u -c JDS
( echo 'test -x /usr/bin/gtk-update-icon-cache || exit 0';
  echo 'rm -f %{_datadir}/icons/*/icon-theme.cache';
  echo 'ls -d %{_datadir}/icons/* | xargs -l1 /usr/bin/gtk-update-icon-cache'
) | $BASEDIR/lib/postrun -b -u -t 5 -c JDS

%postun -n SUNWgnome-utility-applets
test -x $BASEDIR/lib/postrun || exit 0
( echo 'test -x /usr/bin/scrollkeeper-update || exit 0';
  echo '/usr/bin/scrollkeeper-update'
) | $BASEDIR/lib/postrun -b -u -c JDS
( echo 'test -x /usr/bin/gtk-update-icon-cache || exit 0';
  echo 'rm -f %{_datadir}/icons/*/icon-theme.cache';
  echo 'ls -d %{_datadir}/icons/* | xargs -l1 /usr/bin/gtk-update-icon-cache'
) | $BASEDIR/lib/postrun -b -u -t 5 -c JDS

%post -n SUNWgnome-fun-applets-root
( echo 'test -x /usr/bin/gconftool-2 || {';
  echo '  echo "ERROR: gconftool-2 not found"';
  echo '  exit 1';
  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 -n SUNWgnome-fun-applets-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/geyes.schemas"';
  echo '$PKG_INSTALL_ROOT/usr/bin/gconftool-2 --makefile-uninstall-rule $schemas'
) | $BASEDIR/var/lib/postrun/postrun -i -c JDS -a

%post -n SUNWgnome-internet-applets-root
( echo 'test -x /usr/bin/gconftool-2 || {';
  echo '  echo "ERROR: gconftool-2 not found"';
  echo '  exit 1';
  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 -n SUNWgnome-internet-applets-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/gweather.schemas"';
  echo '$PKG_INSTALL_ROOT/usr/bin/gconftool-2 --makefile-uninstall-rule $schemas'
) | $BASEDIR/var/lib/postrun/postrun -i -c JDS -a

%post -n SUNWgnome-intranet-applets-root
( echo 'test -x /usr/bin/gconftool-2 || {';
  echo '  echo "ERROR: gconftool-2 not found"';
  echo '  exit 1';
  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 -n SUNWgnome-intranet-applets-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/netstatus.schemas"';
  echo '$PKG_INSTALL_ROOT/usr/bin/gconftool-2 --makefile-uninstall-rule $schemas'
) | $BASEDIR/var/lib/postrun/postrun -i -c JDS -a

%post -n SUNWgnome-mm-applets-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 -n SUNWgnome-mm-applets-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/mixer.schemas"';
  echo '$PKG_INSTALL_ROOT/usr/bin/gconftool-2 --makefile-uninstall-rule $schemas'
) | $BASEDIR/var/lib/postrun/postrun -i -c JDS -a

%post -n SUNWgnome-utility-applets-root
( echo 'test -x /usr/bin/gconftool-2 || {';
  echo '  echo "ERROR: gconftool-2 not found"';
  echo '  exit 1';
  echo '}';
  echo 'umask 0022';
  echo 'GCONF_CONFIG_SOURCE=xml:merged:/etc/gconf/gconf.xml.defaults';
  echo 'export GCONF_CONFIG_SOURCE';
  echo 'JDS_LIST1=/apps/panel/default_setup/general/applet_id_list_jds';
  echo 'JDS_LIST2=/apps/panel/profiles/default/general/applet_id_list_jds';
  echo '/usr/bin/gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/*.schemas'
  echo 'test -c /devices/pseudo/battery@0:battery0 && {';
  echo '	/usr/bin/gconftool-2  --direct --config-source=$GCONF_CONFIG_SOURCE --load %{_sysconfdir}/gconf/schemas/panel-default-setup-laptop.entries';
  echo '	/usr/bin/gconftool-2  --direct --config-source=$GCONF_CONFIG_SOURCE --load %{_sysconfdir}/gconf/schemas/panel-default-setup-laptop.entries /apps/panel/profiles/default';
  echo '	APPLETS=`gconftool-2 --direct --config-source=$GCONF_CONFIG_SOURCE --owner=panel --get $JDS_LIST1 | sed  -n "s/\(\[.*\)\]/\1,battstat]/p"`'
  echo '	gconftool-2 --direct --config-source=$GCONF_CONFIG_SOURCE --owner=panel --unset $JDS_LIST1'
  echo '	gconftool-2 --direct --config-source=$GCONF_CONFIG_SOURCE --owner=panel --type=list --list-type=string --set $JDS_LIST1 $APPLETS'
  echo '	APPLETS=`gconftool-2 --direct --config-source=$GCONF_CONFIG_SOURCE --owner=panel --get $JDS_LIST2 | sed  -n "s/\(\[.*\)\]/\1,battstat]/p"`'
  echo '	gconftool-2 --direct --config-source=$GCONF_CONFIG_SOURCE --owner=panel --unset $JDS_LIST2'
  echo '	gconftool-2 --direct --config-source=$GCONF_CONFIG_SOURCE --owner=panel --type=list --list-type=string --set $JDS_LIST2 $APPLETS'
  echo '}';
) | $BASEDIR/var/lib/postrun/postrun -u -c JDS_wait

%preun -n SUNWgnome-utility-applets-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 'JDS_LIST1=/apps/panel/default_setup/general/applet_id_list_jds';
  echo 'JDS_LIST2=/apps/panel/profiles/default/general/applet_id_list_jds';
  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/charpick.schemas';
  echo '         $SDIR/battstat.schemas';
  echo '         $SDIR/deskbar-applet.schemas';
  echo '         $SDIR/quick-lounge.schemas';
  echo '         $SDIR/multiload.schemas';
  echo '         $SDIR/stickynotes.schemas"';
  echo '$PKG_INSTALL_ROOT/usr/bin/gconftool-2 --makefile-uninstall-rule $schemas'
  echo 'test -c /devices/pseudo/battery@0:battery0 && {';
  echo '	$PKG_INSTALL_ROOT/usr/bin/gconftool-2  --direct --config-source=$GCONF_CONFIG_SOURCE --unload $SDIR/panel-default-setup-laptop.entries';
  echo '	$PKG_INSTALL_ROOT/usr/bin/gconftool-2  --direct --config-source=$GCONF_CONFIG_SOURCE --unload $SDIR/panel-default-setup-laptop.entries /apps/panel/profiles/default';
  echo '	APPLETS=`gconftool-2 --direct --config-source=$GCONF_CONFIG_SOURCE --owner=panel --get $JDS_LIST1 | sed  -n "s/\(\[.*\),battstat\(\]\)/\1\\2/p"`';
  echo '	gconftool-2 --direct --config-source=$GCONF_CONFIG_SOURCE --owner=panel --unset $JDS_LIST1'
  echo '	gconftool-2 --direct --config-source=$GCONF_CONFIG_SOURCE --owner=panel --type=list --list-type=string --set $JDS_LIST1 $APPLETS'
  echo '	APPLETS=`gconftool-2 --direct --config-source=$GCONF_CONFIG_SOURCE --owner=panel --get $JDS_LIST2 | sed  -n "s/\(\[.*\),battstat\(\]\)/\1\\2/p"`';
  echo '	gconftool-2 --direct --config-source=$GCONF_CONFIG_SOURCE --owner=panel --unset $JDS_LIST2'
  echo '	gconftool-2 --direct --config-source=$GCONF_CONFIG_SOURCE --owner=panel --type=list --list-type=string --set $JDS_LIST2 $APPLETS'
  echo '}';
) | $BASEDIR/var/lib/postrun/postrun -i -c JDS -a

%files
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/bonobo/servers/GNOME_NullApplet_Factory.server
%{_libdir}/null_applet

%files -n SUNWgnome-fun-applets
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/bonobo/servers/GNOME_GeyesApplet.server
%{_libexecdir}/geyes_applet2
%dir %attr(0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/gnome
%{_datadir}/gnome/help/geyes/C
%{_datadir}/omf/geyes/geyes-C.omf
%{_datadir}/gnome-2.0/ui/GNOME_GeyesApplet.xml
%{_datadir}/gnome-applets/geyes
%dir %attr (-, root, other) %{_datadir}/icons
%dir %attr (-, root, other) %{_datadir}/icons/hicolor
%dir %attr (-, root, other) %{_datadir}/icons/hicolor/16x16
%dir %attr (-, root, other) %{_datadir}/icons/hicolor/16x16/apps
%{_datadir}/icons/hicolor/16x16/apps/gnome-eyes-applet.*
%dir %attr (-, root, other) %{_datadir}/icons/hicolor/22x22
%dir %attr (-, root, other) %{_datadir}/icons/hicolor/22x22/apps
%{_datadir}/icons/hicolor/22x22/apps/gnome-eyes-applet.*
%dir %attr (-, root, other) %{_datadir}/icons/hicolor/24x24
%dir %attr (-, root, other) %{_datadir}/icons/hicolor/24x24/apps
%{_datadir}/icons/hicolor/24x24/apps/gnome-eyes-applet.*
%dir %attr (-, root, other) %{_datadir}/icons/hicolor/32x32
%dir %attr (-, root, other) %{_datadir}/icons/hicolor/32x32/apps
%{_datadir}/icons/hicolor/32x32/apps/gnome-eyes-applet.*
%dir %attr (-, root, other) %{_datadir}/icons/hicolor/scalable
%dir %attr (-, root, other) %{_datadir}/icons/hicolor/scalable/apps
%{_datadir}/icons/hicolor/scalable/apps/gnome-eyes-applet.*
%{_datadir}/xmodmap

%files -n SUNWgnome-fun-applets-root
%defattr(-, root, sys)
%dir %attr(0755, root, sys) %{_sysconfdir}
%{_sysconfdir}/gconf/schemas/geyes.schemas

%files -n SUNWgnome-internet-applets
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_bindir}
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/bonobo/servers/GNOME_GWeatherApplet_Factory.server
%{_libdir}/bonobo/servers/Invest_Applet.server
%{_libdir}/bonobo/servers/GNOME_GtikApplet.server
%{_libdir}/libgweather.so*
%{_libdir}/invest-applet
%{_libexecdir}/gweather-applet-2
%dir %attr(0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/gnome
%{_datadir}/gnome/help/gweather/C
%{_datadir}/gnome-applets/gweather
%{_datadir}/gnome-applets/invest-applet
%{_datadir}/omf/gweather/gweather*-C.omf
%{_datadir}/gnome-2.0/ui/GNOME_GWeatherApplet.xml
%{_datadir}/gnome-2.0/ui/Invest_Applet.xml
%{_datadir}/gnome-applets/glade/prefs-dialog.glade
%{_datadir}/gnome-applets/glade/financialchart.glade
%dir %attr (0755, root, other) %{_datadir}/pixmaps
%{_datadir}/pixmaps/invest-big.png

%files -n SUNWgnome-internet-applets-root
%defattr(-, root, sys)
%dir %attr(0755, root, sys) %{_sysconfdir}
%{_sysconfdir}/gconf/schemas/gweather.schemas

%files -n SUNWgnome-internet-applets-devel
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_libdir}
%dir %attr (0755, root, other) %{_libdir}/pkgconfig
%{_libdir}/pkgconfig/gweather.pc
%dir %attr (0755, root, bin) %{_includedir}
%{_includedir}/libgweather

%files -n SUNWgnome-intranet-applets
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/bonobo/servers/GNOME_MailcheckApplet_Factory.server
%{_libdir}/bonobo/servers/GNOME_Panel_NowApplet.server
%{_libdir}/bonobo/servers/GNOME_NetstatusApplet_Factory.server
%{_libdir}/bonobo/servers/GNOME_Panel_WirelessApplet.server
%{_libexecdir}/gnome-netstatus-applet
%dir %attr(0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/gnome
%{_datadir}/gnome/help/gnome-netstatus/C
%dir %attr (0755, root, other) %{_datadir}/pixmaps
%{_datadir}/pixmaps/gnome-netstatus-tx.png
%{_datadir}/omf/gnome-netstatus/*-C.omf
#%{_datadir}/gnome-2.0/ui/GNOME_Panel_NowApplet.xml
%{_datadir}/gnome-2.0/ui/GNOME_NetstatusApplet.xml
%{_datadir}/gnome-netstatus
%dir %attr (-, root, other) %{_datadir}/icons
%dir %attr (-, root, other) %{_datadir}/icons/hicolor
%dir %attr (-, root, other) %{_datadir}/icons/hicolor/48x48
%dir %attr (-, root, other) %{_datadir}/icons/hicolor/48x48/apps
%{_datadir}/icons/hicolor/48x48/apps/gnome-netstatus*

%files -n SUNWgnome-intranet-applets-root
%defattr(-, root, sys)
%dir %attr(0755, root, sys) %{_sysconfdir}
%{_sysconfdir}/gconf/schemas/netstatus.schemas

%files -n SUNWgnome-mm-applets
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/bonobo/servers/GNOME_MixerApplet.server
%{_libdir}/bonobo/servers/GNOME_CDPlayerApplet.server
%{_libexecdir}/mixer_applet2
%dir %attr(0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/gnome
%{_datadir}/gnome/help/mixer_applet2/C
%{_datadir}/omf/mixer_applet*/mixer_applet*-C.omf
%{_datadir}/gnome-2.0/ui/GNOME_MixerApplet.xml

%files -n SUNWgnome-mm-applets-root
%defattr(-, root, sys)
%dir %attr(0755, root, sys) %{_sysconfdir}
%{_sysconfdir}/gconf/schemas/mixer.schemas

%files -n SUNWgnome-utility-applets
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/trashapplet
%{_libdir}/bonobo/servers/GNOME_CharpickerApplet.server
%{_libdir}/bonobo/servers/GNOME_MiniCommanderApplet.server
%{_libdir}/bonobo/servers/GNOME_StickyNotesApplet.server
%{_libdir}/bonobo/servers/GNOME_AccessxStatusApplet.server
%{_libdir}/bonobo/servers/GNOME_QuickLoungeApplet_Factory.server
%{_libdir}/bonobo/servers/GNOME_Panel_TrashApplet.server
%{_libdir}/bonobo/servers/GNOME_MultiLoadApplet_Factory.server
%{_libdir}/bonobo/servers/Deskbar_Applet.server
%{_libdir}/bonobo/servers/GNOME_WebEyes.server
%{_libdir}/bonobo/servers/GNOME_BattstatApplet.server
%{_libdir}/deskbar-applet
%{_libdir}/python?.?/vendor-packages
%{_libexecdir}/charpick_applet2
%{_libexecdir}/stickynotes_applet
%{_libexecdir}/accessx-status-applet
%{_libexecdir}/quick-lounge-applet
%{_libexecdir}/multiload-applet-2
%{_libexecdir}/battstat-applet-2
%dir %attr(0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/gnome
%{_datadir}/gnome/help/char-palette/C
%{_datadir}/gnome/help/deskbar/C
%{_datadir}/gnome/help/stickynotes_applet/C
%{_datadir}/gnome/help/accessx-status/C
%{_datadir}/gnome/help/quick-lounge/C
%{_datadir}/gnome/help/multiload/C
%{_datadir}/gnome/help/trashapplet/C
%{_datadir}/gnome/help/battstat/C
%{_datadir}/gnome-applets/glade/stickynotes*.glade
%{_datadir}/gnome-applets/glade/trashapplet.glade
%{_datadir}/gnome-applets/glade/battstat_applet.glade
%dir %attr (0755, root, other) %{_datadir}/pixmaps
%{_datadir}/pixmaps/accessx-status-applet
%{_datadir}/pixmaps/stickynotes
%{_datadir}/omf/char-palette/char-palette-C.omf
%{_datadir}/omf/deskbar/deskbar-C.omf
%{_datadir}/omf/stickynotes_applet/stickynotes_applet-C.omf
%{_datadir}/omf/accessx-status/accessx-status-C.omf
%{_datadir}/omf/quick-lounge-applet/quick-lounge-C.omf
%{_datadir}/omf/trashapplet/trashapplet-C.omf
%{_datadir}/omf/multiload/multiload-C.omf
%{_datadir}/omf/battstat/battstat-C.omf
%{_datadir}/gnome-2.0/ui/GNOME_CharpickerApplet.xml
%{_datadir}/gnome-2.0/ui/GNOME_StickyNotesApplet.xml
%{_datadir}/gnome-2.0/ui/GNOME_AccessxApplet.xml
%{_datadir}/gnome-2.0/ui/GNOME_QuickLoungeApplet.xml
%{_datadir}/gnome-2.0/ui/GNOME_Panel_TrashApplet.xml
%{_datadir}/gnome-2.0/ui/GNOME_MultiloadApplet.xml
%{_datadir}/gnome-2.0/ui/GNOME_BattstatApplet.xml
%dir %attr (-, root, other) %{_datadir}/icons
%dir %attr (-, root, other) %{_datadir}/icons/hicolor
%dir %attr (-, root, other) %{_datadir}/icons/hicolor/16x16
%dir %attr (-, root, other) %{_datadir}/icons/hicolor/16x16/apps
%{_datadir}/icons/hicolor/16x16/apps/gnome-sticky-notes-applet.*
%{_datadir}/icons/hicolor/16x16/apps/deskbar-applet.*
%dir %attr (-, root, other) %{_datadir}/icons/hicolor/22x22
%dir %attr (-, root, other) %{_datadir}/icons/hicolor/22x22/apps
%{_datadir}/icons/hicolor/22x22/apps/gnome-sticky-notes-applet.*
%{_datadir}/icons/hicolor/22x22/apps/deskbar-applet.*
%dir %attr (-, root, other) %{_datadir}/icons/hicolor/24x24
%dir %attr (-, root, other) %{_datadir}/icons/hicolor/24x24/apps
%{_datadir}/icons/hicolor/24x24/apps/gnome-sticky-notes-applet.*
%dir %attr (-, root, other) %{_datadir}/icons/hicolor/32x32
%dir %attr (-, root, other) %{_datadir}/icons/hicolor/32x32/apps
%{_datadir}/icons/hicolor/32x32/apps/gnome-sticky-notes-applet.*
%{_datadir}/icons/hicolor/32x32/apps/deskbar-applet.*
%dir %attr (-, root, other) %{_datadir}/icons/hicolor/48x48
%dir %attr (-, root, other) %{_datadir}/icons/hicolor/48x48/apps
%{_datadir}/icons/hicolor/48x48/apps/ax-applet*
%{_datadir}/icons/hicolor/48x48/apps/charpick*
%{_datadir}/icons/hicolor/48x48/apps/deskbar-applet*
%{_datadir}/icons/hicolor/48x48/apps/quick-lounge*
%dir %attr (-, root, other) %{_datadir}/icons/hicolor/scalable
%dir %attr (-, root, other) %{_datadir}/icons/hicolor/scalable/apps
%{_datadir}/icons/hicolor/scalable/apps/deskbar-applet*
%{_datadir}/icons/hicolor/scalable/apps/gnome-sticky-notes-applet.*
%{_datadir}/quick-lounge-applet
%{_datadir}/deskbar-applet

%files -n SUNWgnome-utility-applets-root
%defattr(-, root, sys)
%dir %attr(0755, root, sys) %{_sysconfdir}
%{_sysconfdir}/gconf/schemas/charpick.schemas
%{_sysconfdir}/gconf/schemas/stickynotes.schemas
%{_sysconfdir}/gconf/schemas/quick-lounge.schemas
%{_sysconfdir}/gconf/schemas/deskbar-applet.schemas
%{_sysconfdir}/gconf/schemas/multiload.schemas
%{_sysconfdir}/gconf/schemas/battstat.schemas
%{_sysconfdir}/gconf/schemas/panel-default-setup-laptop.entries
%{_sysconfdir}/sound/events/battstat_applet.soundlist

%files -n SUNWgnome-utility-applets-devel
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_libdir}
%dir %attr (0755, root, other) %{_libdir}/pkgconfig
%{_libdir}/pkgconfig/deskbar-applet.pc

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

# Put back in when localized help is delivered from l10n 
# %{_datadir}/omf/gnome-desktop/*-[a-z][a-z].omf
# %{_datadir}/omf/gnome-desktop/*-[a-z][a-z]_*.omf
# %{_datadir}/omf/gnome-feedback/*-[a-z][a-z].omf
# %{_datadir}/omf/gnome-feedback/*-[a-z][a-z]_*.omf
# %{_datadir}/omf/gnome-netstatus/*-[a-z][a-z].omf
# %{_datadir}/omf/gnome-netstatus/*-[a-z][a-z]_*.omf

%changelog
* Thu Sep 27 2007 - [email protected]
- add postrun script that rebuilds the icon cache for each package that
  installs icons
* Sat Aug 18 2007 - [email protected]
- Comment out removal of %{_prefix}/var dir as it's no longer created.
* Tue Aug 07 2007 - [email protected]
- Update l10n %files for new deskbar-applet tarball.
* Wed Aug 01 2007 - [email protected]
- Update %files for new tarball.
* Tue Apr 24 2007 - [email protected]
- s/0755/-/ in defattr so that files are not made all executable
* Sun Apr 15 2007 - [email protected]
- Ship battstat applet on sparc.
* Wed Mar 07 2007 - [email protected]
- Delete en_GB locale files in %install as it breaks SUNWzz-gnome-l10n build. 
* Mon Feb 19 2007 - [email protected]
- Add now applet back to %files.
* Sun Feb 18 2007 - [email protected]
- Update the install location for the python files into vendor-packages.
* Tue Jan 23 2007 - [email protected]
- Rename %{_datadir}/quick-lounge to quick-lounge-applet.
* Wed Jan 10 2007 - [email protected]
- Add deskbar help files to %files.
* Wed Jan 03 2007 - [email protected]
- Changes in %files for 2.17.1 update. Remove GNOME_KeyboardApplet.server as the
  base patch that creates it has been removed. Added %{_datadir}/xmodmap dir.
* Fri Nov 03 2006 - [email protected]
- Remove the 'rm' of invest-big.png as it is referenced in %files.
* Thu Nov 02 2006 - [email protected]
- Remove the invest-chart files as it is not in the UI spec (#6488895).
* Thu Oct 19 2006 - [email protected]
- Remove obsolete 'rm -r' calls from %install.
* Tue Oct 17 2006 - [email protected]
- Remove webeyes from the build. deskbar-applet is the natural
  (and better) replacement. Compatibility is preserved through 
  user migration to the new applet.
* Mon Sep 04 2006 - [email protected]
- Remove libical since we no longer ship the now applet.  Also
  remove -g from CFLAGS.  Not good to have on by default for
  performance.
* Fri Aug 25 2006 - [email protected]
- More updates to %files for new deskbar-applet tarball.
* Thu Aug 24 2006 - [email protected]
- Minor update to %files.
* Wed Aug 23 2006 - [email protected]
- Update %files for new icons.
* Wed Aug 16 2006 - [email protected]
- Add invest-applet to internet-applets package.
* 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
* Thu Aug 03 2006 - [email protected]
- Add 'multiload' files back to %files.
* Tue Aug 01 2006 - [email protected]
- Add SUNWlibgtop build dependency for multiload
* Sat Jul 29 2006 - [email protected]
- Remove 'multiload' files from %files.
* Fri Jul 28 2006 - [email protected]
- Remove 'gtik' stuff and add deskbar stuff to %files. Fix dir perms.
* Fri Jul 28 2006 - [email protected]
- Add multiload applet.
* Fri Jul 14 2006 - [email protected]
- update %post/%postun/etc scripts to support diskless client setup,
  part of 6448317
* Sat Jul 15 2006 - [email protected]
- Remove gswitchit and friends.
* Thu Jun 29 2006 - [email protected]
- update postrun scripts
* Sun Jun 11 2006 - [email protected]
- change group from other to bin/sys
* Tue May 09 2006 - [email protected]
- merge -share pkg(s) into the base pkg(s)
* Wed Mar 15 2006 - [email protected]
- Add to Build/Requires after running check-deps.pl.
* Wed Mar 15 2006 - [email protected]
- Add deskbar-applet to the utility package.
* Fri Feb 17 2006 - [email protected]
- Update Build/Requires after running check-deps.pl script.
* Mon Feb 13 2006 - [email protected]
- Remove mini-commander stuff that is gone.
* Fri Jan 06 2006 - [email protected]
- Add internet-applets-devel for gweather files.
* Tue Nov 29 2005 - [email protected]
- remove javahelp stuff
* Wed Oct 19 2005 - [email protected]
- Add SUNWgnome-doc-utils build dependency for /usr/bin/xml2po.
* Tue Sep 13 2005 - [email protected]
- remove unpackaged files or add to %files
* Wed Jul 13 2005 - [email protected]
- Split from SUNWgnome-panel.spec.