Name: tigervnc Version: 1.11.0 %define subrel 1 Release: %mkrel 4 Summary: Viewer for the VNC remote display system Group: Networking/Remote access License: GPLv2+ URL: http://www.tigervnc.com/ Source0: https://github.com/TigerVNC/tigervnc/archive/v%{version}/%{name}-%{version}.tar.gz Source1: xvnc.service Source2: xvnc.socket Source4: HOWTO.md Patch8: tigervnc-getmaster.patch # initially from openmdv Patch12: tigervnc-1.8.90-mga-buildir.patch #Patches from fedora # copied from debian Patch30: tigervnc-1.8.0-CVE-2014-8240.patch # This is tigervnc-%%{version}/unix/xserver120.patch rebased on the latest xorg Patch100: tigervnc-xserver120.patch BuildRequires: x11-server-source BuildRequires: gettext-devel BuildRequires: pkgconfig(x11) BuildRequires: libxext-devel BuildRequires: x11-font-util BuildRequires: x11-util-macros BuildRequires: x11-xtrans-devel BuildRequires: mesagl-devel BuildRequires: libxkbfile-devel BuildRequires: libxfont2-devel BuildRequires: pixman-devel BuildRequires: openssl-devel BuildRequires: libpciaccess-devel BuildRequires: libpam-devel BuildRequires: libxtst-devel BuildRequires: gnutls-devel BuildRequires: imagemagick BuildRequires: nasm BuildRequires: java-devel BuildRequires: desktop-file-utils BuildRequires: jpackage-utils BuildRequires: fltk-devel BuildRequires: libtool BuildRequires: autoconf BuildRequires: libxi-devel BuildRequires: libxinerama-devel BuildRequires: freetype-devel BuildRequires: libxdmcp-devel BuildRequires: pam-devel BuildRequires: libjpeg-devel BuildRequires: cmake BuildRequires: libxrandr-devel %description Virtual Network Computing (VNC) is a remote display system which allows you to view a computing 'desktop' environment not only on the machine where it is running, but from anywhere on the Internet and from a wide variety of machine architectures. This package contains a client which will allow you to connect to other desktops running a VNC server. #------------------------------------------------------------------------------ %package server Summary: Server for the VNC remote display system Group: Networking/Remote access Requires: vnc-server-common %description server The VNC system allows you to access the same desktop from a wide variety of platforms. This package is a TigerVNC server, allowing others to access the desktop on your machine. #------------------------------------------------------------------------------ %package server-module Summary: Xorg module for the VNC remote display system Group: Networking/Remote access Requires: x11-server-xorg %description server-module This package contains libvnc.so module to X server, allowing others to access the desktop on your machine. #------------------------------------------------------------------------------ %package java Summary: Java viewer for the VNC remote display system Group: Networking/Remote access # "TightVNC-specific" is not a typo, see the README file located inside the # java source tree %description java This distribution is based on the standard VNC source and includes new TightVNC-specific features and fixes, such as additional low-bandwidth optimizations, major GUI improvements, and more. There are three basic ways to use TigerVNC Java viewer: 1. Running applet as part of TigerVNC server installation. 2. Running applet hosted on a standalone Web server. 3. Running the viewer as a standalone application. #------------------------------------------------------------------------------ %prep %setup -q %patch12 -p1 -b .builddir cp -r /usr/share/x11-server-source/* unix/xserver pushd unix/xserver for all in `find . -type f -perm -001`; do chmod -x "$all" done %patch100 -p1 -b .xserver120-rebased popd # libvnc.so: don't use unexported GetMaster function (bug #744881 again). %patch8 -p1 -b .getmaster %patch30 -p1 -b .CVE-2014-8240 # make pam_selinux.so optional sed -i -e '/pam_selinux\.so/s/required/optional/g' unix/vncserver/tigervnc.pam %build %cmake %cmake_build pushd unix/xserver rm -f configure autoreconf -fiv %configure \ --disable-xorg --disable-xnest --disable-xvfb --disable-dmx \ --disable-xwin --disable-xephyr --disable-kdrive --disable-xwayland \ --with-pic --disable-static \ --with-default-font-path="catalogue:%{_sysconfdir}/X11/fontpath.d,built-ins" \ --with-fontrootdir=%{_datadir}/X11/fonts \ --with-xkb-output=%{_localstatedir}/lib/xkb \ --enable-glx --disable-dri --enable-dri2 --disable-dri3 \ --disable-unit-tests \ --disable-config-hal \ --disable-config-udev \ --without-dtrace \ --disable-devel-docs \ --disable-selective-werror %make_build popd # Build icons pushd media %cmake %cmake_build popd # Build Java applet pushd java %cmake JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8" \ %cmake_build popd %install %cmake_install %make_install -C unix/xserver/hw/vnc # Install systemd unit file install -m644 %{SOURCE1} %{buildroot}%{_unitdir}/xvnc@.service install -m644 %{SOURCE2} %{buildroot}%{_unitdir}/xvnc.socket # Install desktop stuff mkdir -p %{buildroot}%{_datadir}/icons/hicolor/{16x16,24x24,48x48}/apps pushd media/icons for s in 16 24 48; do install -m644 tigervnc_$s.png %{buildroot}%{_datadir}/icons/hicolor/${s}x$s/apps/tigervnc.png done popd # Install a replacement for /usr/bin/vncserver which will tell the user to read the # HOWTO.md file cat < %{buildroot}/%{_bindir}/vncserver #!/bin/bash echo "vncserver has been replaced by a systemd unit." echo "Please read /usr/share/doc/tigervnc/HOWTO.md for more information." EOF chmod +x %{buildroot}/%{_bindir}/vncserver install -m 644 %{SOURCE4} . %find_lang %{name} %{name}.lang # remove unwanted files rm -f %{buildroot}%{_libdir}/xorg/modules/extensions/libvnc.la # Install Java applet install -d -m 755 %{buildroot}%{_javadir} install -d -m 755 %{buildroot}%{_datadir}/vnc/classes pushd java/build install -m 755 VncViewer.jar %{buildroot}%{_datadir}/vnc/classes/vncviewer-%{version}.jar popd pushd %{buildroot}%{_datadir}/vnc/classes mv vncviewer-%{version}.jar %{buildroot}%{_javadir} ln -s %{_javadir}/vncviewer-%{version}.jar VncViewer.jar popd pushd %{buildroot}%{_javadir} ln -s vncviewer-%{version}.jar vncviewer.jar ln -s vncviewer-%{version}.jar VncViewer.jar popd %files -f %{name}.lang %doc README.rst %_defaultdocdir/%{name}/ %{_bindir}/vncviewer %{_iconsdir}/* %{_datadir}/applications/* %{_mandir}/man1/vncviewer.1* %files server %doc HOWTO.md %config(noreplace) %{_sysconfdir}/pam.d/tigervnc %config(noreplace) %{_sysconfdir}/tigervnc/vncserver-config-defaults %config(noreplace) %{_sysconfdir}/tigervnc/vncserver-config-mandatory %config(noreplace) %{_sysconfdir}/tigervnc/vncserver.users %{_unitdir}/vncserver@.service %{_unitdir}/xvnc@.service %{_unitdir}/xvnc.socket %{_bindir}/vncconfig %{_bindir}/vncpasswd %{_bindir}/Xvnc %{_bindir}/vncserver %{_bindir}/x0vncserver %{_sbindir}/vncsession %{_libexecdir}/vncserver %{_libexecdir}/vncsession-start %{_mandir}/man1/Xvnc.1* %{_mandir}/man1/vncpasswd.1* %{_mandir}/man1/vncconfig.1* %{_mandir}/man1/x0vncserver.1* %{_mandir}/man8/vncserver.8* %{_mandir}/man8/vncsession.8* %files server-module %{_libdir}/xorg/modules/extensions/libvnc.so %files java %{_javadir}/*.jar %{_datadir}/vnc