rpms/emacs/devel emacs.spec,1.119,1.120

Michel Alexandre Salim salimma at fedoraproject.org
Wed Mar 4 17:34:12 UTC 2009


Author: salimma

Update of /cvs/pkgs/rpms/emacs/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv27039

Modified Files:
	emacs.spec 
Log Message:
* Wed Mar  4 2009 Michel Salim <salimma at fedoraproject.org> - 1:22.3-8
- Use desktop-file-utils to handle desktop file
- Update icon cache if GTK2 is installed



Index: emacs.spec
===================================================================
RCS file: /cvs/pkgs/rpms/emacs/devel/emacs.spec,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -r1.119 -r1.120
--- emacs.spec	25 Feb 2009 12:30:53 -0000	1.119
+++ emacs.spec	4 Mar 2009 17:33:41 -0000	1.120
@@ -4,7 +4,7 @@
 Name: emacs
 Epoch: 1
 Version: 22.3
-Release: 7%{?dist}
+Release: 8%{?dist}
 License: GPLv3+
 URL: http://www.gnu.org/software/emacs/
 Group: Applications/Editors
@@ -37,6 +37,10 @@
 %endif
 Requires: xorg-x11-fonts-ISO8859-1-100dpi
 Requires: emacs-common = %{epoch}:%{version}-%{release}
+Requires: hicolor-icon-theme
+# Desktop integration
+BuildRequires: desktop-file-utils
+Requires:      desktop-file-utils
 Conflicts: gettext < 0.10.40
 Provides: emacs(bin)
 
@@ -219,9 +223,9 @@
 rm -f %{buildroot}%{_infodir}/dir
 rm %{buildroot}%{_localstatedir}/games/emacs/*
 
-# Open desktop application
-mkdir -p %{buildroot}%{_datadir}/applications
-install -m 0644 %SOURCE1 %{buildroot}%{_datadir}/applications/emacs.desktop
+# install desktop file
+desktop-file-install --dir=%{buildroot}%{_datadir}/applications \
+                     %SOURCE1
 
 # put the icons where they belong
 for i in 16 24 32 48 ; do
@@ -254,6 +258,20 @@
 
 %define info_files ada-mode autotype calc ccmode cl dired-x ebrowse ediff efaq eintr elisp0 elisp1 elisp emacs emacs-mime emacs-xtra erc eshell eudc flymake forms gnus idlwave info message mh-e newsticker org pcl-cvs pgg rcirc reftex sc ses sieve smtpmail speedbar tramp url viper vip widget woman
 
+%post
+update-desktop-database &> /dev/null || :
+touch --no-create %{_datadir}/icons/hicolor
+if [ -x %{_bindir}/gtk-update-icon-cache ] ; then
+  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
+fi
+
+%postun
+update-desktop-database &> /dev/null || :
+touch --no-create %{_datadir}/icons/hicolor
+if [ -x %{_bindir}/gtk-update-icon-cache ] ; then
+  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
+fi
+
 %preun
 alternatives --remove emacs %{_bindir}/emacs-%{version} || :
 
@@ -297,7 +315,7 @@
 
 %posttrans common
 alternatives --install %{_bindir}/etags emacs.etags %{_bindir}/etags.emacs 80 \
-	--slave %{_mandir}/man1/etags.1.gz emacs.etags.man %{_mandir}/man1/etags.emacs.1.gz
+       --slave %{_mandir}/man1/etags.1.gz emacs.etags.man %{_mandir}/man1/etags.emacs.1.gz
 
 %files
 %defattr(-,root,root)
@@ -339,6 +357,10 @@
 %dir %{_datadir}/emacs/%{version}
 
 %changelog
+* Wed Mar  4 2009 Michel Salim <salimma at fedoraproject.org> - 1:22.3-8
+- Use desktop-file-utils to handle desktop file
+- Update icon cache if GTK2 is installed
+
 * Wed Feb 25 2009 Daniel Novotny <dnovotny at redhat.com> 1:22.3-7
 - site-lisp/default.el is now config(noreplace)
 




More information about the fedora-extras-commits mailing list