[mate-notification-daemon/f17] fix mate-conf scriptlets

Dan Mashal vicodan at fedoraproject.org
Tue Sep 25 02:29:49 UTC 2012


commit c497f3d6fdb614878463065c7cc76f569e7d9fa8
Author: dmashal <dan.mashal at fedoraproject.org>
Date:   Mon Sep 24 19:29:22 2012 -0700

    fix mate-conf scriptlets

 mate-notification-daemon.spec |   50 +++++++++++++++++++++++-----------------
 1 files changed, 29 insertions(+), 21 deletions(-)
---
diff --git a/mate-notification-daemon.spec b/mate-notification-daemon.spec
index 5eed038..02208ef 100644
--- a/mate-notification-daemon.spec
+++ b/mate-notification-daemon.spec
@@ -7,7 +7,10 @@ URL:		http://mate-desktop.org
 Source0:	http://pub.mate-desktop.org/releases/1.4/%{name}-%{version}.tar.xz
 
 BuildRequires:	desktop-file-utils dbus-glib-devel GConf2 libcanberra-devel libmatenotify-devel libmatewnck-devel mate-common mate-doc-utils mate-conf-devel mate-corba-devel
-Provides:	desktop-notification-daemon
+Requires(pre):	mate-conf
+Requires(preun):	mate-conf
+Requires(post):	mate-conf
+Requires:	mate-conf
 
 %description
 Notification daemon for MATE Desktop
@@ -20,41 +23,46 @@ NOCONFIGURE=1 ./autogen.sh
 %configure --disable-static --disable-schemas-install 
 make %{?_smp_mflags} V=1
 
-%install
-make install DESTDIR=%{buildroot}
-find %{buildroot} -name '*.la' -exec rm -fv {} ';'
-%find_lang %{name} --all-name
-
-desktop-file-install									\
-	--remove-category="MATE"							\
-	--add-category="X-MATE"								\
-	--delete-original								\
-	--dir=%{buildroot}%{_datadir}/applications					\
-%{buildroot}/%{_datadir}/applications/mate-notification-properties.desktop
+%pre
+/sbin/ldconfig
+%mateconf_schema_obsolete mate-notification-daemon
+%mateconf_schema_prepare mate-notification-daemon
 
-%check
-desktop-file-validate %{buildroot}/%{_datadir}/applications/mate-notification-properties.desktop
+%preun
+%mateconf_schema_remove mate-notification-daemon
 
 %post
-/bin/touch --no-create %{_datadir}/icons/mate &>/dev/null || :
-%mateconf_schema_prepare mate-notification-daemon
+/sbin/ldconfig
 %mateconf_schema_upgrade mate-notification-daemon
+/bin/touch --no-create %{_datadir}/icons/mate &> /dev/null || :
 
 %postun
-%mateconf_schema_remove mate-notification-daemon
 if [ $1 -eq 0 ] ; then
-    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
-    /usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || :
+    /bin/touch --no-create %{_datadir}/icons/hicolor &> /dev/null
+    /usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &> /dev/null || :
 fi
 
 %posttrans
-/usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || :
+/usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &> /dev/null || :
 
+%install
+export MATECONF_DISABLE_MAKE_FILE_SCHEMA INSTALL=1
+make LIBTOOL="/usr/bin/libtool" DESTDIR=%{buildroot} install
+%find_lang %{name}
+find %{buildroot} -name '*.la' -exec rm -rf {} ';'
+find %{buildroot} -name '*.a' -exec rm -rf {} ';'
+
+desktop-file-install									\
+	--remove-category="MATE"							\
+	--add-category="X-Mate"								\
+	--delete-original								\
+	--dir=%{buildroot}%{_datadir}/applications					\
+%{buildroot}/%{_datadir}/applications/mate-notification-properties.desktop
 
 %files -f %{name}.lang
 %doc AUTHORS COPYING README
 %{_bindir}/mate-notification-properties
-%config(noreplace) %{_sysconfdir}/mateconf/schemas/mate-notification-daemon.schemas
+%{_sysconfdir}/mateconf/schemas/mate-notification-daemon.schemas
 %{_datadir}/applications/mate-notification-properties.desktop
 %{_datadir}/dbus-1/services/org.freedesktop.mate.Notifications.service
 %{_datadir}/mate-notification-daemon/mate-notification-properties.ui


More information about the scm-commits mailing list