File LibVNCServer.spec of Package LibVNCServer.1485

#
# spec file for package LibVNCServer
#
# Copyright (c) 2015 SUSE LINUX 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:           LibVNCServer
Version:        0.9.9
Release:        0
Summary:        VNC Development Library
License:        GPL-2.0+
Group:          Development/Libraries/X11
Url:            http://sourceforge.net/projects/libvncserver
Source0:        http://downloads.sourceforge.net/project/libvncserver/libvncserver/%{version}/%{name}-%{version}.tar.gz
Source1:        baselibs.conf
#PATCH-FIX-OPENSUSE: multilib support
Patch1:         libvncserver-0.9.1-multilib.patch
#PATCH-FIX-OPENSUSE: redefine keysyms only if needed
Patch7:         redef-keysym.patch
#PATCH-FIX-OPENSUSE: disable x11vnc build
Patch10:        LibVNCServer-0.9.9-no_x11vnc.patch
#PATCH_FIX-OPENSUSE: Use system fast byteswap routines.
Patch11:        libvncserver-byteswap.patch
Patch12:        libvncserver-ossl.patch
Patch13:        LibVNCServer-CVE-2014-6051.patch
Patch14:        LibVNCServer-CVE-2014-6052.patch
Patch15:        LibVNCServer-CVE-2014-6053.patch
Patch16:        LibVNCServer-CVE-2014-6054.patch
Patch17:        LibVNCServer-CVE-2014-6055.patch
Patch18:        LibVNCServer-ciphersuite.patch

BuildRequires:  libavahi-devel
BuildRequires:  libgcrypt-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libpng-devel
BuildRequires:  libtool
BuildRequires:  lzo-devel
BuildRequires:  openssl-devel
BuildRequires:  pkgconfig
BuildRequires:  slang-devel
BuildRequires:  xorg-x11-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
VNC is a set of programs using the RFB (Remote Frame Buffer) protocol.
They are designed to "export" a frame buffer via the network. It is
already in wide use for administration, but it is not that easy to
program a server yourself. This has been changed by LibVNCServer.

X.org already has a virtual Xvnc server which you can start as an own
screen (e.g. :1) and connect to with a VNC client (e.g. vncviewer from
tightvnc). The x11vnc binary (that allows you to export the window of a
real running X11 server) has been split off into its own package on
2007-07-16.

%package -n linuxvnc
Summary:        A sample VNC server which exports /dev/vcsaN over RFB
Group:          Productivity/Networking/Remote Desktop
# O/P added for 12.3
Obsoletes:      LibVNCServer < %version-%release
Provides:       LibVNCServer = %version-%release

%description -n linuxvnc
LinuxVNC monitors a virtual console (text mode) of Linux by reading
/dev/vcsaN, and makes it available via RFB.

%package -n libvncclient0
Summary:        Library implementing a VNC client
Group:          System/Libraries
Conflicts:      LibVNCServer < %version

%description -n libvncclient0
LibVNCServer/LibVNCClient are cross-platform C libraries that allow
implementing VNC server or client functionality in your program.

%package -n libvncserver0
Summary:        Library implementing a VNC server
Group:          System/Libraries

%description -n libvncserver0
LibVNCServer/LibVNCClient are cross-platform C libraries that allow
implementing VNC server or client functionality in your program.

%package devel
Requires:       gnutls-devel
Requires:       libvncclient0 = %version
Requires:       libvncserver0 = %version
Requires:       zlib-devel
Summary:        VNC Development Library
Group:          Development/Libraries/X11

%description devel
VNC is a set of programs using the RFB (Remote Frame Buffer) protocol.
They are designed to "export" a frame buffer via the network. It is
already in wide use for administration, but it is not that easy to
program a server yourself. This has been changed by LibVNCServer.

X.org already has a virtual Xvnc server which you can start as an own
screen (e.g. :1) and connect to with a VNC client (e.g. vncviewer from
tightvnc).

The LibVNCServer-devel package contains the static libraries and header
files for LibVNCServer.

%prep
%setup -q
%patch1 -p1 -b .multilib
#%patch2 -p1 -b .system_minilzo
%patch7 -p1
%patch10 -p1 -b .no_x11vnc
# aclocal; autoheader; automake --add-missing --copy; autoconf
# ./configure --enable-maintainer-mode
# sh ./autogen.sh
%patch11
%patch12
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
# fix encoding
for file in AUTHORS ChangeLog ; do
mv ${file} ${file}.OLD && \
iconv -f ISO_8859-1 -t UTF8 ${file}.OLD > ${file} && \
touch --reference ${file}.OLD $file 
done

#nuke bundled minilzo
#rm -f common/lzodefs.h common/lzoconf.h commmon/minilzo.h common/minilzo.c

# needed by patch 2 (and to nuke rpath's)
#autoreconf

%build
CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -D_REENTRANT" \

# Plase note that tightvn cause a problem; need to be fix
%configure --disable-static --with-pic --enable-shared --with-gnu-ld --without-tightvnc-filetransfer

make %{?_smp_mflags}

%{__install} -d -m0755 RPM_BUILD_ROOT%{_datadir}/x11vnc/classes

%check 
make check

%install
%makeinstall
%{__rm} -f %{buildroot}%{_libdir}/*.la
%{__rm} -f %{buildroot}%{_libdir}/*.a

%post   -n libvncclient0 -p /sbin/ldconfig
%postun -n libvncclient0 -p /sbin/ldconfig
%post   -n libvncserver0 -p /sbin/ldconfig
%postun -n libvncserver0 -p /sbin/ldconfig

%files -n linuxvnc
%defattr(-,root,root)
%doc COPYING vncterm/README
%{_bindir}/linuxvnc

%files -n libvncserver0
%defattr(-,root,root)
%_libdir/libvncserver.so.0*

%files -n libvncclient0
%defattr(-,root,root)
%_libdir/libvncclient.so.0*

%files devel
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README TODO
%{_bindir}/libvncserver-config
%{_includedir}/rfb/*
%dir /usr/include/rfb
%{_libdir}/libvncclient.so
%{_libdir}/libvncserver.so
%{_libdir}/pkgconfig/*.pc

%changelog
openSUSE Build Service is sponsored by