Accepting request 235694 from home:michalsrb:branches:X11:XOrg

- Use update-alternatives.

OBS-URL: https://build.opensuse.org/request/show/235694
OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/tigervnc?expand=0&rev=29
This commit is contained in:
Michal Srb 2014-05-28 15:05:40 +00:00 committed by Git OBS Bridge
parent bac2b6338f
commit a6b08fbc40
2 changed files with 24 additions and 3 deletions

View File

@ -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 Tue May 20 13:55:30 UTC 2014 - msrb@suse.com

View File

@ -19,7 +19,9 @@
Name: tigervnc Name: tigervnc
Version: 1.3.1 Version: 1.3.1
Release: 0 Release: 0
Conflicts: tightvnc Provides: tightvnc = 1.3.9
Obsoletes: tightvnc < 1.3.10
Provides: vnc
BuildRequires: Mesa-devel BuildRequires: Mesa-devel
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
@ -79,6 +81,8 @@ BuildRequires: pkgconfig(xkbfile)
BuildRequires: pkgconfig(xorg-macros) >= 1.14 BuildRequires: pkgconfig(xorg-macros) >= 1.14
BuildRequires: pkgconfig(xproto) >= 7.0.17 BuildRequires: pkgconfig(xproto) >= 7.0.17
BuildRequires: pkgconfig(xtrans) >= 1.2.2 BuildRequires: pkgconfig(xtrans) >= 1.2.2
Requires(post): update-alternatives
Requires(postun): update-alternatives
Url: http://sourceforge.net/apps/mediawiki/tigervnc/ Url: http://sourceforge.net/apps/mediawiki/tigervnc/
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: A high-performance, platform-neutral implementation of VNC Summary: A high-performance, platform-neutral implementation of VNC
@ -189,6 +193,9 @@ popd
%make_install %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 pushd unix/xserver
%make_install %make_install
popd popd
@ -211,13 +218,22 @@ install -D -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_datadir}/vnc/classes
%find_lang '%{name}' %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 %files -f %{name}.lang
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_bindir}/vncviewer %{_bindir}/vncviewer-tigervnc
%exclude /usr/share/doc/tigervnc-1.3.1 %exclude /usr/share/doc/tigervnc-1.3.1
%doc LICENCE.TXT %doc LICENCE.TXT
%doc README.txt %doc README.txt
%{_mandir}/man1/vncviewer.1* %{_mandir}/man1/vncviewer-tigervnc.1*
%ghost %_sysconfdir/alternatives/vncviewer
%files -n xorg-x11-Xvnc %files -n xorg-x11-Xvnc
%defattr(-,root,root) %defattr(-,root,root)