fix the handling of alternatives (#684447)
This commit is contained in:
parent
77da56c5c1
commit
be557ba838
40
emacs.spec
40
emacs.spec
@ -3,7 +3,7 @@ Summary: GNU Emacs text editor
|
|||||||
Name: emacs
|
Name: emacs
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 23.3
|
Version: 23.3
|
||||||
Release: 1%{?dist}
|
Release: 2%{?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
|
||||||
@ -46,6 +46,8 @@ BuildRequires: python2-devel python3-devel
|
|||||||
BuildRequires: util-linux
|
BuildRequires: util-linux
|
||||||
%endif
|
%endif
|
||||||
Requires: desktop-file-utils
|
Requires: desktop-file-utils
|
||||||
|
Requires(preun): %{_sbindir}/alternatives
|
||||||
|
Requires(posttrans): %{_sbindir}/alternatives
|
||||||
Requires: emacs-common = %{epoch}:%{version}-%{release}
|
Requires: emacs-common = %{epoch}:%{version}-%{release}
|
||||||
Provides: emacs(bin) = %{epoch}:%{version}-%{release}
|
Provides: emacs(bin) = %{epoch}:%{version}-%{release}
|
||||||
|
|
||||||
@ -78,6 +80,8 @@ This package provides an emacs binary with support for X windows.
|
|||||||
%package nox
|
%package nox
|
||||||
Summary: GNU Emacs text editor without X support
|
Summary: GNU Emacs text editor without X support
|
||||||
Group: Applications/Editors
|
Group: Applications/Editors
|
||||||
|
Requires(preun): %{_sbindir}/alternatives
|
||||||
|
Requires(posttrans): %{_sbindir}/alternatives
|
||||||
Requires: emacs-common = %{epoch}:%{version}-%{release}
|
Requires: emacs-common = %{epoch}:%{version}-%{release}
|
||||||
Provides: emacs(bin) = %{epoch}:%{version}-%{release}
|
Provides: emacs(bin) = %{epoch}:%{version}-%{release}
|
||||||
|
|
||||||
@ -94,8 +98,8 @@ on a terminal.
|
|||||||
Summary: Emacs common files
|
Summary: Emacs common files
|
||||||
Group: Applications/Editors
|
Group: Applications/Editors
|
||||||
Requires(preun): /sbin/install-info, dev
|
Requires(preun): /sbin/install-info, dev
|
||||||
Requires(post): %{_sbindir}/update-alternatives
|
Requires(preun): %{_sbindir}/alternatives
|
||||||
Requires(postun): %{_sbindir}/update-alternatives
|
Requires(posttrans): %{_sbindir}/alternatives
|
||||||
Requires(post): /sbin/install-info, dev
|
Requires(post): /sbin/install-info, dev
|
||||||
Requires: %{name}-filesystem
|
Requires: %{name}-filesystem
|
||||||
|
|
||||||
@ -232,8 +236,6 @@ cat > macros.emacs << EOF
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
|
||||||
|
|
||||||
cd build-gtk
|
cd build-gtk
|
||||||
make install INSTALL="%{__install} -p" DESTDIR=%{buildroot}
|
make install INSTALL="%{__install} -p" DESTDIR=%{buildroot}
|
||||||
cd ..
|
cd ..
|
||||||
@ -331,7 +333,9 @@ 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
|
|
||||||
|
%preun
|
||||||
|
%{_sbindir}/alternatives --remove emacs %{_bindir}/emacs-%{version}
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
update-desktop-database &> /dev/null || :
|
update-desktop-database &> /dev/null || :
|
||||||
@ -339,17 +343,15 @@ 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
|
|
||||||
|
|
||||||
%post nox
|
%posttrans
|
||||||
%{_sbindir}/update-alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-%{version}-nox 70
|
%{_sbindir}/alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-%{version} 80
|
||||||
|
|
||||||
%postun nox
|
%preun nox
|
||||||
if [ $1 -eq 0 ] ; then
|
%{_sbindir}/alternatives --remove emacs %{_bindir}/emacs-%{version}-nox
|
||||||
%{_sbindir}/update-alternatives --remove emacs %{_bindir}/emacs-%{version}-nox
|
|
||||||
fi
|
%posttrans nox
|
||||||
|
%{_sbindir}/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
|
||||||
@ -357,7 +359,7 @@ for f in %{info_files}; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
%preun common
|
%preun common
|
||||||
alternatives --remove emacs.etags %{_bindir}/etags.emacs || :
|
%{_sbindir}/alternatives --remove emacs.etags %{_bindir}/etags.emacs
|
||||||
if [ "$1" = 0 ]; then
|
if [ "$1" = 0 ]; then
|
||||||
for f in %{info_files}; do
|
for f in %{info_files}; do
|
||||||
/sbin/install-info --delete %{_infodir}/$f %{_infodir}/dir 2> /dev/null || :
|
/sbin/install-info --delete %{_infodir}/$f %{_infodir}/dir 2> /dev/null || :
|
||||||
@ -365,7 +367,7 @@ if [ "$1" = 0 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
%posttrans common
|
%posttrans common
|
||||||
alternatives --install %{_bindir}/etags emacs.etags %{_bindir}/etags.emacs 80 \
|
%{_sbindir}/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
|
||||||
|
|
||||||
%post terminal
|
%post terminal
|
||||||
@ -432,6 +434,10 @@ update-desktop-database &> /dev/null || :
|
|||||||
%dir %{_datadir}/emacs/site-lisp/site-start.d
|
%dir %{_datadir}/emacs/site-lisp/site-start.d
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Mar 15 2011 Karel Klic <kklic@redhat.com> - 1:23.3-2
|
||||||
|
- Another attempt to fix the handling of alternatives (rhbz#684447)
|
||||||
|
- Removed 'rm -rf %%{buildroot}' from %%install section
|
||||||
|
|
||||||
* Thu Mar 10 2011 Karel Klic <kklic@redhat.com> - 1:23.3-1
|
* Thu Mar 10 2011 Karel Klic <kklic@redhat.com> - 1:23.3-1
|
||||||
- New upstream release
|
- New upstream release
|
||||||
- Depend on util-linux directly, as the package no longer provides setarch
|
- Depend on util-linux directly, as the package no longer provides setarch
|
||||||
|
Loading…
Reference in New Issue
Block a user