--- a/SUNWgnome-help-viewer.spec Wed Jan 23 21:26:24 2008 +0000
+++ b/SUNWgnome-help-viewer.spec Thu Jan 24 02:00:27 2008 +0000
@@ -20,6 +20,7 @@
SUNW_BaseDir: %{_basedir}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%include default-depend.inc
+Requires: SUNWgnome-help-viewer
Requires: SUNWgnome-libs
Requires: SUNWgnome-vfs
Requires: SUNWgnome-component
@@ -47,6 +48,13 @@
BuildRequires: SUNWlxml
BuildRequires: SUNWlxsl
+%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
@@ -84,9 +92,6 @@
cd %{_builddir}/%name-%version/sun-manpages
make install DESTDIR=$RPM_BUILD_ROOT
-# TODO: Should we keep the gconf files?
-rm -rf $RPM_BUILD_ROOT%{_sysconfdir}
-
%if %build_l10n
%else
# REMOVE l10n FILES
@@ -109,6 +114,28 @@
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 'retval=0';
+ echo 'for schemas in yelp; do' ;
+ echo ' $PKG_INSTALL_ROOT/usr/bin/gconftool-2 --makefile-uninstall-rule $SDIR/$schemas.schemas || retval=1';
+ echo 'done';
+ echo 'exit $retval'
+) | $BASEDIR/var/lib/postrun/postrun -i -c JDS -a
+
%files
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_bindir}
@@ -122,6 +149,11 @@
%dir %attr(0755, root, bin) %{_mandir}/*
%{_mandir}/*/*
+%files root
+%defattr (-, root, sys)
+%attr (0755, root, sys) %dir %{_sysconfdir}
+%{_sysconfdir}/gconf/schemas/yelp.schemas
+
%if %build_l10n
%files l10n
%defattr (-, root, bin)
@@ -130,7 +162,9 @@
%endif
%changelog
-* Wed Nov 28 2007 - [email protected]
+* Thu Jan 24 2008 - [email protected]
+- Fix up gconf install
+* Wed Nov 28 2008 - [email protected]
- Add -DI_KNOW_RARIAN_0_8_IS_UNSTABLE to CFLAGS as required by rarian-info.h.
* Thu Oct 11 2007 - [email protected]
- Remove install dependency on SUNWgnome-doc-utils and change the build