Sophie

Sophie

distrib > Mandriva > 2006.0 > i586 > media > main-src > by-pkgid > 997cbfb24edbfe0378d9a744402e1363 > files > 7

tightvnc-1.2.9-6mdk.src.rpm

%define name	tightvnc
%define version	1.2.9
%define release	6mdk
%define vnc	vnc

Summary:	Remote graphical access	
Name:		%{name}
Version:	%{version}
Release:	%{release}
Group:		Networking/Remote access
License:	GPL
URL:		http://www.tightvnc.org/	
BuildPrereq:	/usr/bin/perl tcp_wrappers
ExclusiveArch:	%{ix86} alpha sparc ppc s390 s390x x86_64 amd64
BuildRequires:	XFree86-devel zlib-devel tcp_wrappers-devel libjpeg-devel xpm-devel X11
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot
Source:		http://prdownloads.sourceforge.net/vnc-tight/%{name}-%{version}_unixsrc.tar.bz2
Source1:	http://www.uk.research.att.com/vnc/dist/vnc-latest_doc.tar.bz2
Source2:	%{name}-icons.tar.bz2
Source3:	vncserverinit
Patch1:		vnc-xclients.patch.bz2
Patch2:		tightvnc-1.2.6-config-x86_64.patch.bz2
Patch3:		vncserver-vncpasswd-1.2.6.patch.bz2
Patch4:		vncserver-halfbaked.patch.bz2
Patch5:		vncviewer-fix-crash-when-lose-focus.patch.bz2
#deush
Patch6:		tightvnc-1.2.9-fix-build-when-fds_bits-not-defined.patch.bz2
Patch7:		tightvnc-1.2.9-use-stdlib-malloc.patch.bz2
Patch8:		tightvnc-1.2.9-includes.patch.bz2
Obsoletes:	vnc
Provides:	vnc

%description
VNC allows you to access to a remote graphical display through the network.

The enhanced version of VNC, called TightVNC (grown from the  VNC  Tight
Encoder  project), is  optimized  to  work  over  slow   network
connections such as low-speed modem links. While  original  VNC  may  be
very slow when your connection is not fast enough, with TightVNC you can
work  remotely  almost  in  real  time  in  most  environments.  Besides
bandwidth optimizations, TightVNC also includes many other improvements,
optimizations and  bugfixes  over  VNC.  Note  that  TightVNC  is  free,
cross-platform and compatible with the standard VNC.

%package	server
Summary:        A VNC server
Group:          System/Servers
Prereq:         /sbin/chkconfig /etc/init.d
Obsoletes:      vnc-server vnc-java
Provides:       vnc-server vnc-java

%description	server

The VNC system allows you to access the same desktop from a wide variety
of platforms. This package is a VNC server, allowing  others  to  access
the desktop on your machine.

%package	doc
Summary:        Complete documentation for VNC
Group:          Networking/Remote access
Obsoletes:	vnc-doc
Provides:	vnc-doc

%description	doc

This package contains HTML  documentation  about  VNC  (Virtual  Network
Computing) programs. Install the vnc-doc package if you  want  extensive
online documentation about VNC.


%prep
%setup -q -n vnc_unixsrc
%setup -q -T -D -a1 -n vnc_unixsrc
%setup -q -T -D -a2 -n vnc_unixsrc
%patch1 -p1 -b .orig
%patch2 -p1 -b .config-x86_64
%patch3 -p1 
%patch4 -p0 -b .halfbaked

%patch5 -p1 -b .fix_crash
%patch6 -p1 -b .fds_bits
%patch7 -p1 -b .stdlib_malloc
%patch8 -p1 -b .64bit-fixes

# nuke references to /usr/local
find . -name Imakefile | \
  xargs perl -pi -e "s,(-[IL]/usr/local/(include|lib)),,g"

# remove cvs-files from distribution.
find . -name "*,v" -exec rm -f {} \;
perl -pi -e "s|/usr/local/vnc/classes|%{_datadir}/vnc/classes|" vncserver
perl -pi -e "s|unix/:7100|unix/:-1|" vncserver


%build
%{serverbuild}
xmkmf -a
make CDEBUGFLAGS="%optflags" World
cd Xvnc
./configure
make EXTRA_LIBRARIES="-lwrap -lnss_nis" CDEBUGFLAGS="%optflags" World \
	EXTRA_DEFINES="-DUSE_LIBWRAP=1"


%install
rm -rf $RPM_BUILD_ROOT

install -D -m 755 vncviewer/vncviewer           $RPM_BUILD_ROOT/usr/X11R6/bin/vncviewer
install -D -m 755 vncpasswd/vncpasswd           $RPM_BUILD_ROOT/usr/X11R6/bin/vncpasswd
install -D -m 755 vncconnect/vncconnect         $RPM_BUILD_ROOT/usr/X11R6/bin/vncconnect
install -D -m 755 vncserver                     $RPM_BUILD_ROOT/usr/X11R6/bin/vncserver
install -D -m 755 Xvnc/programs/Xserver/Xvnc    $RPM_BUILD_ROOT/usr/X11R6/bin/Xvnc

# Debugging support
if ! [ $DEBUG ]; then
        strip   $RPM_BUILD_ROOT/usr/X11R6/bin/vncconnect \
                $RPM_BUILD_ROOT/usr/X11R6/bin/vncpasswd  \
                $RPM_BUILD_ROOT/usr/X11R6/bin/vncviewer
fi

install -D -m 644 vncviewer/vncviewer.man               $RPM_BUILD_ROOT/usr/X11R6/man/man1/vncviewer.1
install -D -m 644 vncpasswd/vncpasswd.man               $RPM_BUILD_ROOT/usr/X11R6/man/man1/vncpasswd.1
install -D -m 644 vncconnect/vncconnect.man             $RPM_BUILD_ROOT/usr/X11R6/man/man1/vncconnect.1
install -D -m 644 vncserver.man                         $RPM_BUILD_ROOT/usr/X11R6/man/man1/vncserver.1
install -D -m 644 Xvnc/programs/Xserver/Xvnc.man        $RPM_BUILD_ROOT/usr/X11R6/man/man1/Xvnc.1
# 1 extra man page; Xserver.man; This is the  original  Xserver  manpage
# and should only be installed if no X is on the system. I choose not to
# include it.

# bzip2 manpages (should be automatic, dirty);
bzip2 $RPM_BUILD_ROOT/%_prefix/X11R6/man/man1/*.1

mkdir -p                                $RPM_BUILD_ROOT/usr/share/%{vnc}
cp -R classes                           $RPM_BUILD_ROOT/usr/share/%{vnc}

# Some old docs, better than nothing.
mkdir -p                                $RPM_BUILD_ROOT/usr/share/%{name}/docs
cp -R vnc_docs/*                        $RPM_BUILD_ROOT/usr/share/%{name}/docs

# icons
install -D -m 644 %{name}48.png $RPM_BUILD_ROOT%{_liconsdir}/%{name}.png
install -D -m 644 %{name}32.png $RPM_BUILD_ROOT%{_iconsdir}/%{name}.png
install -D -m 644 %{name}16.png $RPM_BUILD_ROOT%{_miconsdir}/%{name}.png

# Menu entry
mkdir -p        %{buildroot}%{_menudir}

cat << EOF >%{buildroot}%{_menudir}/%{name}
?package(%name): \
needs="text" \
section="Networking/Remote Access" \
title="TightVNC" \
icon="tightvnc.png" \
longtitle="Control a pc from anywhere" \
command="vncviewer"
EOF

install -d -m0755 %buildroot%_sysconfdir/sysconfig
cat > %buildroot/%_sysconfdir/sysconfig/%{vnc}servers << EOF

# The VNCSERVERS variable is a list of display:user pairs.
#
# Uncomment the line below to start a VNC server on  display  :1  as  my
# 'myusername' (adjust this to your own). You will also need  to  set  a
# VNC password; run 'man vncpasswd' to see how to do that.
#
# DO NOT RUN THIS SERVICE if your local area network is untrusted. For a
# secure way of using VNC, see <URL:http://www.tightvnc.org>.

# VNCSERVERS="1:myusername"
EOF

install -m755 %SOURCE3 -D %buildroot/%{_initrddir}/%{vnc}server

# menu
mkdir -p $RPM_BUILD_ROOT%_menudir


%post
# menu
%{update_menus}
%{make_session}

%postun
# menu
%{clean_menus}
%{make_session}

%post server
if [ "$1" = 1 ]; then
        /sbin/chkconfig --add vncserver
fi

%preun server
if [ "$1" = 0 ]; then
        /sbin/service vncserver stop >/dev/null 2>&1
        /sbin/chkconfig --del vncserver
fi

%postun server
if [ "$1" -ge "1" ]; then
        /sbin/service vncserver condrestart >/dev/null 2>&1
fi


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,755)
/usr/X11R6/bin/vncviewer

%defattr(644,root,root,755)
/usr/X11R6/man/man1/vncviewer.1*

%{_datadir}/%{vnc}/classes/
%dir %{_datadir}/%{vnc}/
%doc ChangeLog README WhatsNew

%{_menudir}/%{name}

%{_liconsdir}/%{name}.png
%{_iconsdir}/%{name}.png
%{_miconsdir}/%{name}.png

%files doc
%defattr(644,root,root,755)
%doc README WhatsNew
%{_datadir}/%{name}/docs/*

%files server
%defattr(-,root,root,755)
%attr(0755,root,root) %config(noreplace) %_initrddir/%{vnc}server
%config(noreplace) %_sysconfdir/sysconfig/%{vnc}servers
/usr/X11R6/bin/Xvnc
/usr/X11R6/bin/vncserver
/usr/X11R6/bin/vncpasswd
/usr/X11R6/bin/vncconnect

#%_datadir/vnc
/usr/X11R6/man/man1/Xvnc.1*
/usr/X11R6/man/man1/vncserver.1*
/usr/X11R6/man/man1/vncconnect.1*
/usr/X11R6/man/man1/vncpasswd.1*


%changelog
* Mon May 30 2005 Gwenole Beauchesne <gbeauchesne@mandriva.com> 1.2.9-6mdk
- includes & 64-bit fixes

* Wed Dec 22 2004 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 1.2.9-5mdk
- fix buildrequires
- cosmetics

* Fri Sep  3 2004 Daouda LO <daouda@mandrakesoft.com> 1.2.9-4mdk
- The requirement for the fd_set structure to have a member fds_bits 
  has been removed as per The Open Group Base Resolution
- do not redefine malloc (use stdlib one) -> keep synced with Xorg.
- fix menu entry (fcrozat)

* Sat Apr 10 2004 Michael Scherer <misc@mandrake.org> 1.2.9-3mdk 
- [DIRM]
- A better description

* Tue Mar 16 2004 Laurent MONTEL <lmontel@mandrakesoft.com> 1.2.9-2mdk
- Add patch5: fix crash into kwin and co, patch from Lubos Lunak <l.lunak@suse.cz>

* Sat Dec 13 2003 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 1.2.9-1mdk
- 1.2.9

* Wed Aug 13 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.2.7-5mdk
- fix amd64 patch

* Tue Aug  5 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.2.7-4mdk
- amd64 rebuild

* Tue Jul 22 2003 Per Øyvind Karlsen <peroyvind@sintrax.net> 1.2.7-3mdk
- rebuild
- rm -rf $RPM_BUILD_ROOT at the beginning of %%install

* Tue Jul 22 2003 Per Øyvind Karlsen <peroyvind@sintrax.net> 1.2.7-3mdk
- rebuild

* Mon Feb 24 2003 Vincent Danen <vdanen@mandrakesoft.com> 1.2.7-2mdk
- fix some randomness issues

* Mon Jan  6 2003 Daouda LO <daouda@mandrakesoft.com> 1.2.7-1mdk
- release 1.2.7
  o In servers, decreased JPEG quality factors for low quality levels.
  o JPEG compression is now enabled by default
  o Bugfix for Xvnc's -localhost and -interface options
    that were broken on many systems 
  
* Thu Jan  2 2003 Daouda LO <daouda@mandrakesoft.com> 1.2.6-3mdk
- Don't ask for passwd if vncpasswd is already set ( Richard Neill)

* Wed Dec  4 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.2.6-2mdk
- Patch2: Add x86-64 support

* Mon Nov 25 2002 Daouda LO <daouda@mandrakesoft.com> 1.2.6-1mdk
- release 1.2.6
- Removed merged patch2 (Han Boetes) 

* Mon Aug 19 2002 Daouda LO <daouda@mandrakesoft.com> 1.2.5-2mdk
- use better name for patche and apply with -p1
	o Mon Aug 19 2002 Han Boetes <han@linux-mandrake.com> 1.2.5-2mdk
	  - Bugfix [ 596366 ] vncserver bug

* Wed Aug 14 2002 Daouda LO <daouda@mandrakesoft.com> 1.2.5-1mdk
- release 1.2.5

* Wed Aug  7 2002 Daouda LO <daouda@mandrakesoft.com> 1.2.4-2mdk
- superseded vnc by tightvnc in main
- obsoleted/provided vnc-doc

* Tue Jul 16 2002 Han Boetes <han@mijncomputer.nl> 1.2.4-1mdk
- Bump.
- added interesting patch from redhat srpm. Thief Baggins.
- Clean-ups also thanks to the rh-spec.

* Tue May 07 2002 Han Boetes <han@mijncomputer.nl> 1.2.3-2mdk
- Silly mistakes :(

* Tue Apr 16 2002 Lenny Cartier <lenny@mandrakesoft.com> 1.2.3-1mdk
- updated by Han Boetes <han@mijncomputer.nl>

* Tue Apr  2 2002 Han Boetes <han@mijncomputer.nl>
- Initial build

# end of file