File x11vnc.spec of Package x11vnc

# vim: set ts=4 sw=4 et:
#
# spec file for package x11vnc
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           x11vnc
Version:        0.9.13
Release:        0
Summary:        VNC Server for Real X Displays
License:        GPL-2.0+
Group:          System/X11/Utilities
# http://prdownloads.sourceforge.net/libvncserver/x11vnc-%{version}.tar.gz
Source:         x11vnc-%{version}.tar.bz2
Source1:        %{name}-tkx11vnc.desktop
Source2:        x11vnc_ssh
Source3:        x11vnc.png
Source99:       %{name}-rpmlintrc
Patch1:         %{name}-lib64.diff
Patch2:         %{name}-lame-libm.diff
Patch3:         stack-check
Patch5:         x11vnc-thread-auth.diff
Patch6:         x11vnc-examples.diff
Patch7:         x11vnc.desktop.generics
Patch8:         x11vnc-automake-1.13.patch
Patch9:         x11vnc-fix-buffer-overflow-in-snapshot_stack_list.patch
Patch10:        x11vnc-fix-buffer-overflow-in-record_CW.patch
Url:            http://www.karlrunge.com/x11vnc
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  gcc
BuildRequires:  libjpeg-devel
BuildRequires:  libtool
BuildRequires:  make
BuildRequires:  openssl-devel
BuildRequires:  unzip
BuildRequires:  update-desktop-files
BuildRequires:  zlib-devel
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(avahi-client) >= 0.6.4
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xdamage)
BuildRequires:  pkgconfig(xext)
BuildRequires:  pkgconfig(xfixes)
BuildRequires:  pkgconfig(xinerama)
BuildRequires:  pkgconfig(xrandr)
BuildRequires:  pkgconfig(xtst)

%description
x11vnc allows one to remotely view and interact with real X displays (i.e. a
display corresponding to a physical monitor, keyboard, and mouse) with any VNC
viewer. In this way it plays the role for Unix/X11 that WinVNC plays for
Windows.

For Unix, the VNC implementation includes a virtual X11 server Xvnc (usually
launched via the vncserver command) that is not associated with a real
display, but provides a "fake" one X11 clients (xterm, mozilla, etc.) can
attach to. A remote user then connects to Xvnc via the VNC client vncviewer
from anywhere on the network to view and interact with the whole virtual X11
desktop.

The VNC protocol is in most cases better suited for remote connections with
low bandwidth and high latency than is the X11 protocol. Also, with no state
maintained the viewing-end can crash, be rebooted, or relocated and the
applications and desktop continue running. Not so with X11.

%package frontend
Summary:        Simple GUI Frontend to x11vnc
Group:          System/X11/Utilities
Requires:       %{name} = %{version}-%{release}
Requires:       tcl tk

%description frontend
x11vnc allows one to remotely view and interact with real X displays (i.e. a
display corresponding to a physical monitor, keyboard, and mouse) with any VNC
viewer. In this way it plays the role for Unix/X11 that WinVNC plays for
Windows.

This package adds a simple GUI frontend to run x11vnc.

%prep
%setup -q
%if "%{_lib}"=="lib64"
%patch1
%endif
%patch2
%patch3
# workaround for Factory, as maintaining that patch with fuzz==0 is
# too annoying (it patches files that are modified by other patches):
%__patch -p0 -i "%{PATCH5}"
%patch6
%patch7
%patch8 -p1
%patch9 -p1
%patch10 -p1
mv x11vnc/misc x11vnc/examples

%build
autoreconf -fiv

CFLAGS="%{optflags} -D_REENTRANT -fno-strict-aliasing" \
%configure \
    --enable-shared \
    --with-gnu-ld \
%if 0%{?_with_ffmpeg:1}
    --with-ffmpeg \
%else
    --without-ffmpeg \
%endif
    --with-x \
    --with-24bpp \
    --with-filetransfer \
    --with-jpeg="%{_usr}" \
    --with-zlib="%{_usr}" \
    %{_target_cpu}-suse-linux

%__make %{?_smp_flags}

%install
%makeinstall
%__install -m 0755 x11vnc/tkx11vnc "%{buildroot}%{_bindir}/"
%__install -m 0755 "%{SOURCE2}" "%{buildroot}%{_bindir}/"
%__install -D -m 0644 "%{SOURCE3}" "%{buildroot}%{_datadir}/pixmaps/x11vnc.png"
%__install -D -m 0644 "%{SOURCE1}" "%{buildroot}%{_datadir}/applications/tkx11vnc.desktop"
for d in tkx11vnc x11vnc; do
    %suse_update_desktop_file -r "$d" System RemoteAccess
done

%__rm -rf "%{buildroot}%{_includedir}/rfb"

find x11vnc/examples/ -name 'Makefile*' -exec %__rm {} \;
find x11vnc/examples/ -type f -exec %__chmod 0644 {} \;

%clean
%{?buildroot:%__rm -rf "%{buildroot}"}

%files
%defattr(-,root,root)
%doc AUTHORS README NEWS ChangeLog TODO COPYING
%doc x11vnc/examples
%{_bindir}/x11vnc
%{_bindir}/x11vnc_ssh
%doc %{_mandir}/man1/x11vnc.1%{ext_man}
%dir %{_datadir}/x11vnc
%{_datadir}/x11vnc/*
%{_datadir}/applications/x11vnc.desktop
%{_datadir}/pixmaps/x11vnc.png

%files frontend
%defattr(-,root,root)
%{_bindir}/tkx11vnc
%{_datadir}/applications/tkx11vnc.desktop

%changelog
openSUSE Build Service is sponsored by