Sophie

Sophie

distrib > Mageia > 1 > i586 > media > core-updates-src > by-pkgid > 4549dbcf740e66faa76bacf2b0a26d12 > files > 6

tigervnc-1.1.0-0.1.mga1.src.rpm

# snapshotver is year-month-day-svnrevision, generated by "make dist"
%define snapshot        0
%define snapshotversion 201106280527
%define version         1.1.0
%define rel             0
%define subrel          1

%define _disable_ld_as_needed 1

Name:    tigervnc
Version: %{version}
%if %{snapshot}
Release: %mkrel 0.%{snapshotversion}.%{rel}
%else
Release: %mkrel %{rel}
%endif

License:   GPLv2+
URL:       http://www.tigervnc.com/

Source0:        %{name}-%{version}.tar.gz
Source6:        vncviewer.desktop
Source7:        xserver110.patch

Patch0:        tigervnc-102434.patch
Patch4:        tigervnc-cookie.patch
Patch8:        tigervnc-viewer-reparent.patch
Patch10:       tigervnc11-ldnow.patch
Patch11:       tigervnc11-gethomedir.patch
Patch13:       tigervnc11-rh692048.patch
Patch14:	tigervnc-1.1.0-link.patch

BuildRequires: x11-server-source
BuildRequires: gettext-devel
BuildRequires: libx11-devel
BuildRequires: libxext-devel
BuildRequires: x11-font-util
BuildRequires: x11-util-macros
BuildRequires: x11-xtrans-devel
BuildRequires: mesagl-devel
BuildRequires: libxkbfile-devel
BuildRequires: libxfont-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

#------------------------------------------------------------------------------

# package tigervnc

Summary: Viewer for the VNC remote display system
Group:   Networking/Remote access

%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.

%files -f %{name}.lang
%defattr(-,root,root,-)
%{_bindir}/vncviewer
%{_iconsdir}/*
%{_datadir}/applications/*
%{_mandir}/man1/vncviewer.1*


#------------------------------------------------------------------------------

%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.


%files server
%defattr(-,root,root,-)
%{_bindir}/vncconfig
%{_bindir}/vncpasswd
%{_bindir}/x0vncserver
%{_bindir}/Xvnc
%{_bindir}/vncserver
%{_mandir}/man1/Xvnc.1*
%{_mandir}/man1/vncpasswd.1*
%{_mandir}/man1/vncconfig.1*
%{_mandir}/man1/vncserver.1*
%{_mandir}/man1/x0vncserver.1*

#------------------------------------------------------------------------------

%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.

%files server-module
%defattr(-,root,root,-)
%{_libdir}/xorg/modules/extensions/libvnc.so

#------------------------------------------------------------------------------

%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.

%files java
%defattr(-,root,root)
%{_javadir}/*.jar
%{_datadir}/%{name}

#------------------------------------------------------------------------------

%prep

%setup -q -n %{name}-%{version}

%patch0 -p1 -b .102434
%patch4 -p1 -b .cookie
%patch8 -p1 -b .viewer-reparent
%patch10 -p1 -b .ldnow
%patch11 -p1 -b .gethomedir
%patch13 -p1 -b .rh692048
%patch14 -p1 -b .link

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
patch -p1 -b --suffix .vnc < %{SOURCE7}
popd

# Use newer gettext
sed -i 's/AM_GNU_GETTEXT_VERSION.*/AM_GNU_GETTEXT_VERSION([0.18.1])/' \
        configure.ac

%build
# Temporary build with -fno-omit-frame-pointer, it causes problems
export CFLAGS="$RPM_OPT_FLAGS -fno-omit-frame-pointer"
export CXXFLAGS="$CFLAGS"

autoreconf -fiv
%configure2_5x --disable-static --with-system-jpeg
%make

# XXX: I'm not sure this define is actually needed
# Need this for shared objects that reference X Server, or other modules symbols
%define _disable_ld_no_undefined 1
# Search for modules in extra_module_dir before the default path.
# This will allow fglrx to install its modified modules in more cleaner way.
%define extra_module_dir %{_libdir}/xorg/extra-modules

pushd unix/xserver
chmod +x configure
autoreconf -fiv

# After the "--disable-config-hal", most options are just a paste from
# Mandriva's x11-server. We need to check what we can clean here (without
# reducing features)
%configure2_5x  --disable-xorg \
		--disable-xwin \
		--disable-xvfb \
		--disable-xnest \
		--disable-dmx \
		--disable-xfbdev \
		--disable-xephyr \
		--disable-kdrive \
		--disable-config-dbus \
		--disable-config-hal \
		--with-log-dir=%{_logdir} \
		--with-os-vendor="%distribution" \
		--with-os-name="$(uname -s -r | sed -e s'/ /_/g')" \
		--with-vendor-web="http://bugs.mageia.org" \
		--with-extra-module-dir=%{extra_module_dir} \
		--enable-xwrapper \
		--enable-pam \
		--without-dtrace --disable-unit-tests \
		--disable-devel-docs --disable-docs \
		--with-default-font-path="catalogue:%{_sysconfdir}/X11/fontpath.d"

make
popd

# Build icons
pushd media
%make
popd

# Build java
pushd java/src/com/tigervnc/vncviewer
%make all
popd

%install
rm -rf %{buildroot}
%makeinstall_std

pushd unix/xserver/hw/vnc
%makeinstall_std
popd

# 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

mkdir %{buildroot}/%{_datadir}/applications
desktop-file-install \
	--dir %{buildroot}%{_datadir}/applications \
	%{_sourcedir}/vncviewer.desktop

%find_lang %{name} %{name}.lang

# remove unwanted files
rm -f  %{buildroot}/%{_libdir}/xorg/modules/extensions/libvnc.la


# java
install -d -m 755 %{buildroot}%{_javadir}
install -d -m 755 %{buildroot}%{_datadir}/%{name}/classes
pushd java/src/com/tigervnc/vncviewer
make install INSTALL_DIR=%{buildroot}%{_datadir}/%{name}/classes \
             ARCHIVE=vncviewer-%{version}.jar
popd
pushd %{buildroot}%{_datadir}/%{name}/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





%changelog

* Sat Dec 10 2011 dmorgan <dmorgan> 1.1.0-0.1.mga1
+ Revision: 180180
- Remove systemd files
- New stable version 1.1.0
- New snapshot
- Fix build against mga1 xserver
- Add P4 to fix CVE-2011-1775 ( mga #1963)

  + fwang <fwang>
    - fix linkage
    - xorg 1.11 patch is not needed for mga1

* Tue Feb 22 2011 dmorgan <dmorgan> 1.0.90-0.201012034210.6.mga1
+ Revision: 57070
- Remove Encoding from desktop file
- Fix bugzilla URL
- imported package tigervnc


* Thu Jan 13 2011 Paulo Ricardo Zanoni <pzanoni@mandriva.com> 1.0.90-0.201012034210.6mdv2011.0
+ Revision: 631010
- Obsolete RealVNC packages

* Tue Dec 28 2010 Paulo Ricardo Zanoni <pzanoni@mandriva.com> 1.0.90-0.201012034210.5mdv2011.0
+ Revision: 625668
- BR java-devel
- Add -java package
- Use %%makeinstall_std

* Thu Dec 23 2010 Paulo Ricardo Zanoni <pzanoni@mandriva.com> 1.0.90-0.201012034210.4mdv2011.0
+ Revision: 624170
- Remove sysconfig, initscript and require vnc-server-common
- Fix dekstop file categories
- Update summaries, descriptions, profiles, conflicts and groups (part of vnc
  packages standardization)

* Thu Dec 16 2010 Paulo Ricardo Zanoni <pzanoni@mandriva.com> 1.0.90-0.201012034210.3mdv2011.0
+ Revision: 622330
- Add patches to fix problems with scrollbars.

* Wed Dec 08 2010 Paulo Ricardo Zanoni <pzanoni@mandriva.com> 1.0.90-0.201012034210.2mdv2011.0
+ Revision: 616320
- Add initscript file
- Add sysconfig/vncservers file
- Use configure2_5x
- Use system jpeg
- Remove unrecognized configure options
- Don't chmod files copied by x11-server-source

* Mon Dec 06 2010 Paulo Ricardo Zanoni <pzanoni@mandriva.com> 1.0.90-0.201012034210.1mdv2011.0
+ Revision: 612395
- Update to newer revision
- Use xserver19 patch
- Fix linking

* Wed May 05 2010 Paulo Ricardo Zanoni <pzanoni@mandriva.com> 1.0.90-0.201004234031.2mdv2010.1
+ Revision: 542633
- Remove sed in Makefile.am (was breaking libvnc.so)
- Add URL tag

* Fri Apr 23 2010 Paulo Ricardo Zanoni <pzanoni@mandriva.com> 1.0.90-0.201004234031.1mdv2010.1
+ Revision: 538366
- import tigervnc