diff --git a/tigervnc.changes b/tigervnc.changes index e34676f..97b8c4b 100644 --- a/tigervnc.changes +++ b/tigervnc.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 28 14:54:02 UTC 2014 - msrb@suse.com + +- Use update-alternatives. + ------------------------------------------------------------------- Tue May 20 13:55:30 UTC 2014 - msrb@suse.com diff --git a/tigervnc.spec b/tigervnc.spec index ef03ea4..a53fefd 100644 --- a/tigervnc.spec +++ b/tigervnc.spec @@ -19,7 +19,9 @@ Name: tigervnc Version: 1.3.1 Release: 0 -Conflicts: tightvnc +Provides: tightvnc = 1.3.9 +Obsoletes: tightvnc < 1.3.10 +Provides: vnc BuildRequires: Mesa-devel BuildRequires: autoconf BuildRequires: automake @@ -79,6 +81,8 @@ BuildRequires: pkgconfig(xkbfile) BuildRequires: pkgconfig(xorg-macros) >= 1.14 BuildRequires: pkgconfig(xproto) >= 7.0.17 BuildRequires: pkgconfig(xtrans) >= 1.2.2 +Requires(post): update-alternatives +Requires(postun): update-alternatives Url: http://sourceforge.net/apps/mediawiki/tigervnc/ BuildRoot: %{_tmppath}/%{name}-%{version}-build Summary: A high-performance, platform-neutral implementation of VNC @@ -189,6 +193,9 @@ popd %make_install +mv $RPM_BUILD_ROOT/usr/bin/vncviewer $RPM_BUILD_ROOT/usr/bin/vncviewer-tigervnc +mv $RPM_BUILD_ROOT/usr/share/man/man1/vncviewer.1 $RPM_BUILD_ROOT/usr/share/man/man1/vncviewer-tigervnc.1 + pushd unix/xserver %make_install popd @@ -211,13 +218,22 @@ install -D -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_datadir}/vnc/classes %find_lang '%{name}' +%post +"%_sbindir/update-alternatives" --install /usr/bin/vncviewer vncviewer /usr/bin/vncviewer-tigervnc 20 + +%postun +if [ "$1" = 0 ] ; then + "%_sbindir/update-alternatives" --remove vncviewer /usr/bin/vncviewer-tigervnc +fi + %files -f %{name}.lang %defattr(-,root,root,-) -%{_bindir}/vncviewer +%{_bindir}/vncviewer-tigervnc %exclude /usr/share/doc/tigervnc-1.3.1 %doc LICENCE.TXT %doc README.txt -%{_mandir}/man1/vncviewer.1* +%{_mandir}/man1/vncviewer-tigervnc.1* +%ghost %_sysconfdir/alternatives/vncviewer %files -n xorg-x11-Xvnc %defattr(-,root,root)