diff --git a/gnucash.spec b/gnucash.spec index d07b7f2..afef275 100644 --- a/gnucash.spec +++ b/gnucash.spec @@ -3,6 +3,8 @@ %define buildsvn 0 %define docver 2.0.1 +%define schemas /etc/gconf/schemas/apps_gnucash_dialog_business_common.schemas /etc/gconf/schemas/apps_gnucash_dialog_commodities.schemas /etc/gconf/schemas/apps_gnucash_dialog_common.schemas /etc/gconf/schemas/apps_gnucash_dialog_hbci.schemas /etc/gconf/schemas/apps_gnucash_dialog_prices.schemas /etc/gconf/schemas/apps_gnucash_dialog_print_checks.schemas /etc/gconf/schemas/apps_gnucash_dialog_reconcile.schemas /etc/gconf/schemas/apps_gnucash_dialog_scheduled_transctions.schemas /etc/gconf/schemas/apps_gnucash_dialog_totd.schemas /etc/gconf/schemas/apps_gnucash_general.schemas /etc/gconf/schemas/apps_gnucash_history.schemas /etc/gconf/schemas/apps_gnucash_import_generic_matcher.schemas /etc/gconf/schemas/apps_gnucash_warnings.schemas /etc/gconf/schemas/apps_gnucash_window_pages_account_tree.schemas /etc/gconf/schemas/apps_gnucash_window_pages_register.schemas + Name: gnucash Summary: GnuCash is an application to keep track of your finances Version: 2.0.4 @@ -34,8 +36,9 @@ Requires: slib >= 3a1-5, yelp # hack Requires: perl(Date::Manip) Requires: perl(Crypt::SSLeay) -Requires(post): /sbin/ldconfig, scrollkeeper >= 0.3.4, GConf2 -Requires(postun): /sbin/ldconfig, scrollkeeper >= 0.3.4 +Requires(pre): GConf2 +Requires(post): /sbin/ldconfig, scrollkeeper >= 0.3.4 +Requires(postun): /sbin/ldconfig, scrollkeeper >= 0.3.4, GConf2 %define __perl_requires %{nil} Obsoletes: gnucash-backend-postgres @@ -95,7 +98,7 @@ make install DESTDIR=$RPM_BUILD_ROOT || : mkdir -p $RPM_BUILD_ROOT/%{_datadir}/applications/ desktop-file-install --vendor gnome --delete-original \ --dir $RPM_BUILD_ROOT%{_datadir}/applications \ - --delete-category Application \ + --remove-category Application \ --add-category Office \ $RPM_BUILD_ROOT%{_datadir}/applications/gnucash.desktop echo "StartupWMClass=GnuCash" >> $RPM_BUILD_ROOT%{_datadir}/applications/gnome-gnucash.desktop @@ -116,16 +119,26 @@ chmod 644 $RPM_BUILD_ROOT/%{_datadir}/gnome/help/gnucash/C/custom.xml %clean rm -rf $RPM_BUILD_ROOT +%pre +if [ "$1" -gt 1 ]; then + export GCONF_CONFIG_SOURCE=$(gconftool-2 --get-default-source) + gconftool-2 --makefile-uninstall-rule %{schemas} >/dev/null || : +fi + %post /sbin/ldconfig /usr/bin/scrollkeeper-update -o %{_datadir}/omf/gnucash-docs export GCONF_CONFIG_SOURCE=$(gconftool-2 --get-default-source) -SCHEMAS="apps_gnucash_dialog_business_common.schemas apps_gnucash_dialog_commodities.schemas apps_gnucash_dialog_common.schemas apps_gnucash_dialog_hbci.schemas apps_gnucash_dialog_prices.schemas apps_gnucash_dialog_print_checks.schemas apps_gnucash_dialog_reconcile.schemas apps_gnucash_dialog_scheduled_transctions.schemas apps_gnucash_dialog_totd.schemas apps_gnucash_general.schemas apps_gnucash_history.schemas apps_gnucash_import_generic_matcher.schemas apps_gnucash_warnings.schemas apps_gnucash_window_pages_account_tree.schemas apps_gnucash_window_pages_register.schemas" -for S in $SCHEMAS; do - gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/$S >/dev/null +gconftool-2 --makefile-install-rule %{schemas} >/dev/null || : done +%preun +if [ "$1" -eq 0 ]; then + export GCONF_CONFIG_SOURCE=$(gconftool-2 --get-default-source) + gconftool-2 --makefile-uninstall-rule %{schemas} >/dev/null || : +fi + %postun /sbin/ldconfig /usr/bin/scrollkeeper-update