From a6db380e6360e213b7ef93a7c53b6d4a3ff1ee82 Mon Sep 17 00:00:00 2001 From: Karel Klic Date: Aug 19 2010 14:29:36 +0000 Subject: Own /usr/bin/emacs (rhbz#614935) --- diff --git a/emacs.spec b/emacs.spec index c3d351f..fed42ea 100644 --- a/emacs.spec +++ b/emacs.spec @@ -4,7 +4,7 @@ Summary: GNU Emacs text editor Name: emacs Epoch: 1 Version: 23.2 -Release: 10%{?dist} +Release: 11%{?dist} License: GPLv3+ URL: http://www.gnu.org/software/emacs/ Group: Applications/Editors @@ -26,7 +26,7 @@ Source20: emacs-terminal.sh Patch0: glibc-open-macro.patch Patch1: rpm-spec-mode.patch Patch3: rpm-spec-mode-utc.patch -# Not sent to upstream. +# Upstream implemented the change in revno. 101105 Patch4: emacs-23.1-xdg.patch # Accepted by upstream. Patch5: emacs-23.2-m17ncheck.patch @@ -114,8 +114,9 @@ on a terminal. %package common Summary: Emacs common files Group: Applications/Editors -Requires(preun): %{_sbindir}/alternatives, /sbin/install-info, dev -Requires(posttrans): %{_sbindir}/alternatives +Requires(preun): /sbin/install-info, dev +Requires(post): %{_sbindir}/update-alternatives +Requires(postun): %{_sbindir}/update-alternatives Requires(post): /sbin/install-info, dev %description common @@ -259,6 +260,7 @@ cd .. # let alternatives manage the symlink rm %{buildroot}%{_bindir}/emacs +touch %{buildroot}%{_bindir}/emacs # do not compress the files which implement compression itself (#484830) gunzip %{buildroot}%{_datadir}/emacs/%{version}/lisp/jka-compr.el.gz @@ -346,6 +348,7 @@ touch --no-create %{_datadir}/icons/hicolor if [ -x %{_bindir}/gtk-update-icon-cache ] ; then %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : fi +%{_sbindir}/update-alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-%{version} 80 %postun update-desktop-database &> /dev/null || : @@ -353,18 +356,17 @@ touch --no-create %{_datadir}/icons/hicolor if [ -x %{_bindir}/gtk-update-icon-cache ] ; then %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : fi +if [ $1 -eq 0 ] ; then + %{_sbindir}/update-alternatives --remove emacs %{_bindir}/emacs-%{version} +fi -%preun -alternatives --remove emacs %{_bindir}/emacs-%{version} || : - -%posttrans -alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-%{version} 80 || : - -%preun nox -alternatives --remove emacs %{_bindir}/emacs-%{version}-nox || : +%post nox +%{_sbindir}/update-alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-%{version}-nox 70 -%posttrans nox -alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-%{version}-nox 70 || : +%postun nox +if [ $1 -eq 0 ] ; then + %{_sbindir}/update-alternatives --remove emacs %{_bindir}/emacs-%{version}-nox +fi %post common for f in %{info_files}; do @@ -392,6 +394,7 @@ update-desktop-database &> /dev/null || : %files %defattr(-,root,root) %{_bindir}/emacs-%{version} +%attr(0755,-,-) %ghost %{_bindir}/emacs %dir %{_libexecdir}/emacs %dir %{_libexecdir}/emacs/%{version} %dir %{emacs_libexecdir} @@ -404,6 +407,7 @@ update-desktop-database &> /dev/null || : %files nox %defattr(-,root,root) %{_bindir}/emacs-%{version}-nox +%attr(0755,-,-) %ghost %{_bindir}/emacs %dir %{_libexecdir}/emacs %dir %{_libexecdir}/emacs/%{version} %dir %{emacs_libexecdir} @@ -415,6 +419,7 @@ update-desktop-database &> /dev/null || : %doc etc/NEWS BUGS README etc/COPYING %exclude %{_bindir}/emacs-* %{_bindir}/* +%exclude %{_bindir}/emacs %{_mandir}/*/* %{_infodir}/* %dir %{_datadir}/emacs @@ -439,6 +444,11 @@ update-desktop-database &> /dev/null || : %{_datadir}/applications/emacs-terminal.desktop %changelog +* Tue Aug 17 2010 Karel Klic - 1:23.2-11 +- Own /usr/bin/emacs (rhbz#614935) +- Updated the handling of alternatives to match + https://fedoraproject.org/wiki/Packaging:Alternatives + * Mon Aug 16 2010 Karel Klic - 1:23.2-10 - Removed the png extension from the Icon entry in emacs.desktop (rhbz#507231)