Own /usr/bin/emacs (rhbz#614935)

This commit is contained in:
Karel Klic 2010-08-19 16:29:36 +02:00
parent 901e80511d
commit a6db380e63

View File

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