Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > 4d5f1cc04155e4058309b3ddfa4b61b4 > files > 4

nx-3.2.0-4mdv2009.0.src.rpm

# most of the descriptions are stolen from the debian package

%define name nx
%define version 3.2.0
%define release %mkrel 4

Summary: 	NoMachine NX
Name: 		%{name}
Version: 	%{version}
Release: 	%{release}
Source0: 	nx-X11-%{version}-1.tar.bz2
Source1:	nxagent-%{version}-5.tar.bz2
Source2:	nxauth-%{version}-1.tar.bz2
Source4:	nxcompext-%{version}-1.tar.bz2
Source5:	nxcompshad-%{version}-3.tar.bz2
Source6:	nxwin-%{version}-3.tar.bz2
Source7:	nxcomp-%{version}-7.tar.bz2
Source8:	nxproxy-%{version}-1.tar.bz2
Source9:	nxssh-%{version}-1.tar.bz2

Source10:	GUUG-Presentation-NX.pdf

# rename libs with nx prefix => allow us to put them in %{_libdir} (from debian)
# rediffed for 2.0
Patch0:		nx-X11-3.1-libdir.patch

License: 	MIT/GPL
Group: 		Networking/Remote access
Url: 		http://www.nomachine.com/sources.php
BuildRoot: 	%{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildRequires:	X11-devel libfontconfig-devel
BuildRequires:	zlib-devel
BuildRequires:	libpng-devel
BuildRequires:	libjpeg-devel
BuildRequires:	automake1.7, automake1.4
BuildRequires:  openssl-devel
BuildRequires:	imake

%description
NoMachine NX is the next-generation X compression and roundtrip
suppression scheme. It can operate remote X11 sessions over 
56k modem dialup links or anything better. 

####################
#   xcompext lib   #
####################
%define lib_name_orig_xcompext libxcompext
%define lib_major_xcompext 3
%define lib_name_xcompext %mklibname xcompext %{lib_major_xcompext}
%package -n     %{lib_name_xcompext}
Summary:	Xcompext/Xcompshad library for NX
Group:		System/Libraries
Provides:	xcompext = %{version}-%{release}
Provides:	xcompshad = %{version}-%{release}

%description -n %{lib_name_xcompext}
Xcompext and Xcompshad library needed by the NX framework

%if %mdkversion < 200900
%post -n %{lib_name_xcompext} -p /sbin/ldconfig
%endif
%postun -n %{lib_name_xcompext}
%if %mdkversion < 200900
/sbin/ldconfig
%endif


###############
# nx-X11 lib  #
###############
%define lib_name_orig_nxx11 libnxX11
%define lib_major_nxx11 0
%define lib_name_nxx11 %mklibname nxX11_ %{lib_major_nxx11}
%package -n     %{lib_name_nxx11}
Summary:	Nx-X11 lib for NX
Group:		System/Libraries
Provides:	nxX11 = %{version}-%{release}

%description -n %{lib_name_nxx11}
NX-X11 lib for the NX framework

%if %mdkversion < 200900
%post -n %{lib_name_nxx11} -p /sbin/ldconfig
%endif
%postun -n %{lib_name_nxx11}
%if %mdkversion < 200900
/sbin/ldconfig
%endif

##########
# nxcomp #
##########
%define lib_name_orig_nxcomp libxcomp
%define lib_major_nxcomp 3
%define lib_name_nxcomp %mklibname xcomp %{lib_major_nxcomp}

%package -n	%{lib_name_nxcomp}
Summary:	Xcomp library for NX
Group:		System/Libraries
Provides:	xcomp = %{version}-%{release}

%description -n %{lib_name_nxcomp}
Xcomp library for NX subsystem

%if %mdkversion < 200900
%post -n %{lib_name_nxcomp} -p /sbin/ldconfig
%endif
%postun -n %{lib_name_nxcomp}
%if %mdkversion < 200900
/sbin/ldconfig
%endif

###########
# nxproxy #
###########
%package -n	nxproxy
Summary:	Provide the protocol compression and caching part of the NX scheme
Group:		Networking/Remote access

%description -n nxproxy
The nxproxy runs on the X server side of the wire and thus accompanies 
the nxagent running on X client side. It provides the protocol
compression and caching part of the NX scheme.

###########
# nxagent #
###########
%package -n 	nxagent
Summary:	NX X server based on Xnest
Group:		Networking/Remote access

%description -n nxagent
The nxagent is an X server based on Xnest, but modified
for the purpose of reducing roundtrips over high-latency
networks significantly. It is run on the client side of X,
that is, on the machine where X clients run. It connects,
over the wire, to your regular X server, possibly through nxproxy.

#########
# nxssh #
#########

%package -n	nxssh
Summary:	NX ssh client 
Group:		Networking/Remote access

%description -n nxssh
Nx ssh client

%prep
%setup -q -c -a 1 -a 2 -a 4 -a 5 -a 6 -a 7 -a 8 -a 9
%patch0

%build
# documentation explainig how NX works
cp %{SOURCE10} ./

# the build system Sux, or I haven't understand how it works
# We must build all the lib, and somes binaries at the same shot
# because -I ../nxFOO <-- It *sux*

#-------- Build nxcomp

pushd nxcomp
export CFLAGS="$RPM_OPT_FLAGS -fPIC"
export CXXFLAGS="$RPM_OPT_FLAGS -fPIC"
export CPPFLAGS="$RPM_OPT_FLAGS -fPIC"
%configure
# configure script doesn't care of CFLAGS
perl -pi -e "s/CXXFLAGS    = -O3/CXXFLAGS = $RPM_OPT_FLAGS -fPIC/" Makefile
perl -pi -e "s/LDFLAGS     = /LDFLAGS = -fPIC/" Makefile
perl -pi -e "s/CCFLAGS\s+=/CCFLAGS = $RPM_OPT_FLAGS -fPIC/" Makefile
make clean
%make
popd

#-------- build nxcompext lib
pushd nxcompext
export CFLAGS="$RPM_OPT_FLAGS -fPIC"
export CXXFLAGS="$RPM_OPT_FLAGS -fPIC"
export CPPFLAGS="$RPM_OPT_FLAGS -fPIC"
%configure
perl -pi -e "s/CXXFLAGS    = -O3/CXXFLAGS = $RPM_OPT_FLAGS -fPIC/" Makefile
perl -pi -e "s|LDFLAGS     = |LDFLAGS = -fPIC -L/usr/X11R6/%{_lib}|" Makefile
make clean
%make
popd

#-------- build nxcompshad lib
pushd nxcompshad
export CFLAGS="$RPM_OPT_FLAGS -fPIC"
export CXXFLAGS="$RPM_OPT_FLAGS -fPIC"
export CPPFLAGS="$RPM_OPT_FLAGS -fPIC"
%configure
perl -pi -e "s/CXXFLAGS    = -O3/CXXFLAGS = $RPM_OPT_FLAGS -fPIC/" Makefile
perl -pi -e "s|LDFLAGS     = |LDFLAGS = -fPIC -L/usr/X11R6/%{_lib}|" Makefile
perl -pi -e "s|LIBS        =   |LIBS        =   -lXext |" Makefile
make clean
%make
popd

#-------- Build nx X11 libs
pushd nx-X11
make World
popd

#-------- build nxproxy
pushd nxproxy
%configure
%make
popd

#-------- build nxssh
pushd nxssh
%configure
%make
popd 

%install
rm -rf $RPM_BUILD_ROOT
#create the directory tree
install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/pkgconfig
install -d -m 755 $RPM_BUILD_ROOT%{_bindir}
install -d -m 755 $RPM_BUILD_ROOT%{_includedir}
install -d -m 755 $RPM_BUILD_ROOT%{_includedir}/nxcompsh

#----------- nxcomp 
install -m 755 nxcomp/libXcomp.so.* $RPM_BUILD_ROOT%{_libdir}
rm -f $RPM_BUILD_ROOT%{_libdir}/libXcomp.so.3
ln -s libXcomp.so.3.1.0 $RPM_BUILD_ROOT%{_libdir}/libXcomp.so.3

#----------- nxX11
install -m 755 nx-X11/lib/X11/libX11-nx.so.* $RPM_BUILD_ROOT%{_libdir}
install -m 755 nx-X11/lib/Xext/libXext-nx.so.*  $RPM_BUILD_ROOT%{_libdir}
install -m 755 nx-X11/lib/Xrender/libXrender-nx.so.* $RPM_BUILD_ROOT%{_libdir}
install -m 755 nx-X11/programs/Xserver/nxagent $RPM_BUILD_ROOT%{_bindir}
rm -f $RPM_BUILD_ROOT%{_libdir}/libX11-nx.so.6
ln -s libX11.so.6.2 $RPM_BUILD_ROOT%{_libdir}/libX11-nx.so.6
rm -f $RPM_BUILD_ROOT%{_libdir}/libXext-nx.so.6
ln -s libXext.so.6.4 $RPM_BUILD_ROOT%{_libdir}/libXext-nx.so.6
rm -f $RPM_BUILD_ROOT%{_libdir}/libXrender-nx.so.1
ln -s libXrender.so.1.2.2 $RPM_BUILD_ROOT%{_libdir}/libXrender-nx.so.1

#----------- nxcompext
install -m 755 nxcompext/libXcompext.so.* $RPM_BUILD_ROOT%{_libdir}
rm -f $RPM_BUILD_ROOT%{_libdir}/libXcompext.so.3
ln -s libXcompext.so.3.1.0 $RPM_BUILD_ROOT%{_libdir}/libXcompext.so.3
install -m 755 nxcompshad/libXcompshad.so.* $RPM_BUILD_ROOT%{_libdir}
rm -f $RPM_BUILD_ROOT%{_libdir}/libXcompshad.so.3
ln -s libXcompshad.so.3.1.0 $RPM_BUILD_ROOT%{_libdir}/libXcompshad.so.3

#----------- nxproxy 
install -m 755 nxproxy/nxproxy $RPM_BUILD_ROOT%{_bindir}

#----------- nxssh
install -m 755 nxssh/nxssh $RPM_BUILD_ROOT%{_bindir}

%clean
rm -rf $RPM_BUILD_ROOT

%files -n nxproxy
%defattr(-,root,root)
%{_bindir}/nxproxy

%files -n nxagent
%defattr(-,root,root)
%{_bindir}/nxagent

#---------- nxcomp
%files -n %{lib_name_nxcomp}
%defattr(-,root,root)
%{_libdir}/libXcomp.so.*

#---------- nx-x11
%files -n  %{lib_name_nxx11}
%defattr(-,root,root)
%doc GUUG-Presentation-NX.pdf
%{_libdir}/libX11-nx.so.*
%{_libdir}/libXext-nx.so.*
%{_libdir}/libXrender-nx.so.*

#-------- lib xcompext
%files -n  %{lib_name_xcompext}
%defattr(-,root,root)
%{_libdir}/libXcompext.so.*
%{_libdir}/libXcompshad.so.*

#-------- nxssh
%files -n nxssh
%defattr(-,root,root)
%{_bindir}/nxssh




%changelog
* Fri Sep 05 2008 Adam Williamson <awilliamson@mandriva.com> 3.2.0-4mdv2009.0
+ Revision: 280995
- fix a typo
- remove now unneeded patches
- remove everything related to nxdesktop and nxviewer (these are dropped)

* Fri Aug 08 2008 Thierry Vignaud <tvignaud@mandriva.com> 3.2.0-3mdv2009.0
+ Revision: 268318
- rebuild early 2009.0 package (before pixel changes)

  + Pixel <pixel@mandriva.com>
    - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers

* Sat Jun 07 2008 Emmanuel Blindauer <blindauer@mandriva.org> 3.2.0-2mdv2009.0
+ Revision: 216667
- updated to latest release

* Thu Apr 17 2008 Emmanuel Blindauer <blindauer@mandriva.org> 3.2.0-1mdv2009.0
+ Revision: 195059
- update to 3.2.0
- update to 3.2.0

* Tue Mar 25 2008 Emmanuel Blindauer <blindauer@mandriva.org> 3.1.0-4mdv2008.1
+ Revision: 189986
- updated to latest tarballs from nomachine, fixes several CVE related to xorg

* Mon Feb 18 2008 Thierry Vignaud <tvignaud@mandriva.com> 3.1.0-3mdv2008.1
+ Revision: 171004
- rebuild
- fix "foobar is blabla" summary (=> "blabla") so that it looks nice in rpmdrake

* Tue Jan 29 2008 Emmanuel Blindauer <blindauer@mandriva.org> 3.1.0-2mdv2008.1
+ Revision: 159655
- update nx-X11 to 3.1.0-3

* Sun Jan 27 2008 Emmanuel Blindauer <blindauer@mandriva.org> 3.1.0-1mdv2008.1
+ Revision: 158607
- Fix compilation on x86_64
- rediff patch
- revert nx directory and re-user X11-nx name
  rediff patch0
- fix buildrequires
- updated sources
- Updated to 3.1.0, including Xcompshad

* Fri Dec 21 2007 Olivier Blin <oblin@mandriva.com> 2.1.0-1mdv2008.1
+ Revision: 136633
- restore BuildRoot

  + Thierry Vignaud <tvignaud@mandriva.com>
    - kill re-definition of %%buildroot on Pixel's request


* Tue Jan 02 2007 Emmanuel Blindauer <blindauer@mandriva.org> 2.1.0-1mdv2007.0
+ Revision: 103403
- fix x86_64 build (patch 4)
- 2.1.0 release

  + Jérôme Soyer <saispo@mandriva.org>
    - Import nx

* Sun Aug 27 2006 Couriousous <couriousous@mandriva.org> 2.0.0-1mdv2007.0
- 2.0.0
- Rediff patches

* Fri Dec 16 2005 Couriousous <couriousous@mandriva.org> 1.5.0-4mdk
- Sync with NoMachine NX 1.5 release

* Tue Oct 04 2005 Nicolas Lécureuil <neoclust@mandriva.org> 1.5.0-3mdk
- BuildRequires fix

* Sun Aug 21 2005 Couriousous <couriousous@mandriva.org> 1.5.0-2mdk
- Sync with NoMachine NX 1.5 release

* Sun Jul 24 2005 Couriousous <couriousous@mandriva.org> 1.5.0-1mdk
- 1.5
- Rediff some patch
- Patch to fix compilation with gcc4

* Fri Feb 11 2005 Couriousous <couriousous@mandrake.org> 1.4.0-3mdk
- Update nx-X11 (fix security bug)
- Various others updates
- Remove patch 4 & 5, fixed upstream

* Sun Jan 30 2005 Couriousous <couriousous@mandrake.org> 1.4.0-2mdk
- Update current 1.4 release
- Some spec fix
- Sync with debian patch
- x86_64 fix

* Fri Nov 12 2004 Couriousous <couriousous@zarb.org> 1.4.0-1mdk
- First Mandrakelinux release
- Take some fix from debian package
- Take doc from suse package
- Patch from Fabian Franz for gcc 3.4