--- a/SUNWgnome-character-map.spec Wed Dec 05 09:36:05 2007 +0000
+++ b/SUNWgnome-character-map.spec Wed Dec 05 09:40:51 2007 +0000
@@ -27,6 +27,13 @@
BuildRequires: SUNWgnome-doc-utils
Requires: SUNWpostrun
+%package root
+Summary: %{summary} - / filesystem
+SUNW_BaseDir: /
+%include default-depend.inc
+Requires: SUNWpostrun-root
+Requires: SUNWgnome-config
+
%package devel
Summary: %{summary} - development files
SUNW_BaseDir: %{_basedir}
@@ -97,6 +104,33 @@
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/metacity.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}
@@ -114,6 +148,11 @@
%dir %attr(0755, root, bin) %{_mandir}/*
%{_mandir}/*/*char*map*
+%files root
+%defattr (-, root, sys)
+%attr (0755, root, sys) %dir %{_sysconfdir}
+%{_sysconfdir}/gconf/schemas/gucharmap.schemas
+
%files devel
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_libdir}
@@ -134,6 +173,8 @@
%endif
%changelog
+* Wed Nov 05 2007 - [email protected]
+- Add root package and post/preun scripts for gucharmap.schemas.
* Wed Oct 10 2007 - [email protected]
- Remove 'Requires: SUNWgnome-doc-utils' as it is only used during building;
change SUNWgnome-doc-utils-devel to SUNWgnome-doc-utils to match change in