Sisyphus repositório
Última atualização: 24 março 2018 | SRPMs: 18251 | Visitas: 11201834
en ru br
ALT Linux repositórios
5.0: 3.3.0-alt10
4.1: 3.3.0-alt7.M41.8
4.0: 3.3.0-alt7.M40.8

Group :: Rede/Acesso Remoto
RPM: nx

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

%define tjpg_ver 1.0.1
%def_without tjpg

Name: nx
Release: alt1

Summary: Next Generation Remote Display

Packager: Vitaly Lipatov <lav at>

Group: Networking/Remote access
License: GPL, MIT/X11 for X11 bits

Source: /var/ftp/pvt/Etersoft/RX at Etersoft/last/source/tarball/nxagent-%version-11.tar
Source1: nxauth-%version-3.tar
Source3: nxcomp-%version-7.tar
Source4: nxcompext-%version-1.tar
Source5: nxcompsh-%version-2.tar
Source6: nxcompshad-%version-3.tar
Source7: nxesd-%version-2.tar
Source9: nxproxy-%version-2.tar
Source10: nxscripts-%version-1.tar
Source12: nxservice-%version-2.tar
Source16: nx-X11-%version-4.tar
%if_with tjpg
Source17: libjpeg-turbo-%tjpg_ver.tar
Source18: docs.tar
Source21: rgb.txt
Source50: nxagent.1
Source51: nxagent.keyboard
Source60: Makefile.alt

# alt

Patch1: nx-X11-alt-SecurityPolicy-path.patch
Patch2: nxcomp-3.2.0-gcc43.patch
Patch3: nxcompsh-3.2.0-gcc43.patch
Patch4: nxcompshad-3.2.0-gcc43.patch
Patch5: nxcompshad-3.3.0-Xext.patch
Patch6: nx-X11-utf8_copy_clipboard.patch
Patch7: nxesd-3.3.0-esd.patch
Patch9: nxcomp-mdv.patch
Patch10: nxservice-3.5.0-cygwin_ifdef.patch


Patch40: nx-X11-dimbor.patch
Patch41: nxagent.MotifWMHints_Utf8Names.dimbor.patch
Patch42: nxa_wine_close_delay.patch
Patch43: nx-X11-dimbor_x64.patch
Patch44: nxcomp-1.5.0-pic.patch

# gentoo

Patch50: nx-3.3.0-cflags.patch

# list

Patch60: createpixmap_bounds_check.patch
Patch61: nx-X11-fix_format.patch
Patch62: 204_nxagent_repaint-solidpict.full.patch

# debian

Patch85: 85_nx-X11_debian-ld.patch
Patch90: 90_set_X0-config_path.patch
Patch91: 91_enable_debug.patch
Patch93: 93_export_remote_keyboard_config.patch


Patch100: wmclass.patch
Patch101: byerace.patch
Patch102: sa_restorer.patch


Patch110: nx-3.5.0-libpng15.patch

Obsoletes: NX
Provides: NX = %version

Obsoletes: nxproxy
Provides: nxproxy = %version

Obsoletes: libXcomp
Provides: libXcomp = %version

Obsoletes: libXcompext
Provides: libXcompext = %version

Obsoletes: libXcompshad
Provides: libXcompshad = %version

BuildRequires: docbook-utils gcc-c++ groff-base makedepend
BuildRequires: libXdamage-devel libXrandr-devel libXt-devel libXtst-devel
BuildRequires: libpam-devel libesd-devel libpng-devel
BuildRequires: libssl-devel libstdc++-devel zlib-devel
BuildRequires: libfreetype-devel libXmu-devel libXcomposite-devel libXpm-devel libXext-devel
BuildRequires: libalsa-devel libpng-devel zlib-devel libpam-devel

%if_with tjpg
BuildRequires: nasm
BuildRequires: libjpeg-devel
BuildRequires: libaudiofile-devel

# due "can't find 'fixed' font"

Requires: fonts-bitmap-misc
Requires: xkeyboard-config

NX is an exciting new technology for remote display. It provides near local
speed application responsiveness over high latency, low bandwidth links. The
core libraries for NX are provided by NoMachine under the GPL.

%package devel
Summary: Header files for development with nx
Group: Development/C
Requires: %name = %version-%release
%description devel
Header files for development with nx

%setup -c -a1 -a3 -a4 -a5 -a6 -a7 -a9 -a10 -a12 -a16
%if_with tjpg
%setup -c -a17

%patch1 -p0
%patch2 -p0
%patch3 -p0
%patch4 -p0
%patch5 -p0
%patch6 -p0
%patch7 -p0
%patch9 -p1
%patch10 -p1

%patch40 -p0
%patch41 -p0
%patch42 -p0
%patch43 -p0
%patch44 -p0

%patch50 -p0

%patch60 -p0

cd nx-X11
%patch61 -p2
%patch62 -p2
%patch85 -p1
%patch90 -p1
# disable debug?
# %patch91 -p2
%patch93 -p1
cd ..

cd nxproxy
%patch100 -p1
cd ..

cd nxcomp
%patch101 -p1
%patch102 -p1
%patch110 -p1
cd ..

cat >> nx-X11/config/cf/host.def << EOF
#ifdef  i386Architecture
#undef  DefaultGcc2i386Opt
#define DefaultGcc2i386Opt      $RPM_OPT_FLAGS -fno-strict-aliasing
#ifdef  MipsArchitecture
#undef  DefaultGcc2MipsOpt
#define DefaultGcc2MipsOpt      $RPM_OPT_FLAGS -fno-strict-aliasing
#ifdef s390xArchitecture
#undef OptimizedCDebugFlags
#define OptimizedCDebugFlags $RPM_OPT_FLAGS -fno-strict-aliasing
#ifdef  AMD64Architecture
#undef  DefaultGcc2AMD64Opt
#define DefaultGcc2AMD64Opt $RPM_OPT_FLAGS -fno-strict-aliasing
#define ProjectRoot %_libdir/nxserver
#define MotifDir %_libdir/nxserver
#define XPrintDir %_libdir/nxserver/server

%__subst "s:/usr/lib/xserver/SecurityPolicy:%_libdir/nxserver/xserver/SecurityPolicy:" nx-X11/programs/Xserver/Xext/security.c
%__subst "s:\$(NLSSUBDIR):nls:" nx-X11/Imakefile

cp %SOURCE60 nx-X11

export CFLAGS="%optflags"
export CXXFLAGS="%optflags"
# allow use rpm optflags
%__subst "s|^C.*FLAGS=.*-O.*||" */configure*

# prepare X11 includes

pushd nx-X11
%make_build -f Makefile.alt Includes

%if_with tjpg
%__subst "s|-ljpeg|-ljpeg-turbo|" nx*/ nx*/configure
# turbo-jpeg
cd libjpeg-turbo-%tjpg_ver
sed -i -e 's|libjpeg|libjpeg-turbo|g' -e 's|-ljpeg|-ljpeg-turbo|g' Makefile.* configure
export LDFLAGS="-L`pwd`/.libs -Wl,-rpath-link,`pwd`/.libs"
cd -

# build Compression Library and Proxy and Extended Compression Library

for i in nxcomp nxproxy nxcompshad nxcompext nxcompsh; do
pushd $i
%configure \
%__subst "s,/usr/X11R6/lib ,/usr/X11R6/%_lib ,g" Makefile

# build nxesd

pushd nxesd
%__subst "s|\.\./audiofile-0.2.3/libaudiofile/\.libs/libaudiofile\.a|-laudiofile|" configure
%configure \
# multi proc build is broken on many systems
%make_build nxesd || %make nxesd

# build nxservice

pushd nxservice

# build X11 Support Libraries and Agents

pushd nx-X11
%if_with tjpg
%make_build TURBOJPG="$LDFLAGS" World
%make_build World

pushd nx-X11
%makeinstall_std -C lib
%makeinstall_std -C nls
%makeinstall_std -C programs/Xserver/Xext

mkdir -p %buildroot%_bindir
mkdir -p %buildroot%_libdir
mkdir -p %buildroot%_sysconfdir/nxagent
mkdir -p %buildroot%_man1dir

# install X11 Support Libraries and Agents

cp -a nx-X11/lib/X11/* \
    nx-X11/lib/Xext/* \
    nx-X11/lib/Xrender/* \

install -m 755 nx-X11/programs/Xserver/nxagent \

%if_with tjpg
cp -a libjpeg-turbo-%tjpg_ver/.libs/* %buildroot%_libdir/

# install Compression Libraries and Proxy

cp -a nxcomp/* %buildroot%_libdir/
cp -a nxcompext/* %buildroot%_libdir/
cp -a nxcompshad/* %buildroot%_libdir/
cp -a nxcompsh/* %buildroot%_libdir/
install -m 755 nxproxy/nxproxy %buildroot%_bindir/
# install nxesd
pushd nxesd
install -m755 nxesd %buildroot%_bindir/

pushd nxservice
install -m755 nxservice %buildroot%_bindir/

# install scripts

mkdir -p %buildroot%_docdir/%name-%version/
cp -r nxscripts %buildroot%_docdir/%name-%version/
# documentation and license
tar xf %SOURCE18 -C %buildroot%_docdir/%name-%version/
install -m 644 nxcomp/LICENSE %buildroot%_docdir/%name-%version/

mkdir -p %buildroot%_docdir/%name-%version/nxcomp/
install -m 644 nxcomp/README %buildroot%_docdir/%name-%version/nxcomp

install %SOURCE50 %buildroot%_man1dir/
gzip -3 %buildroot%_man1dir/*
install %SOURCE51 %buildroot%_sysconfdir/nxagent/

# for backcompat

ln -s ../bin/nxagent %buildroot%_libdir

# lost secpol file

mkdir -p %buildroot%_libdir/nxserver/xserver
mv %buildroot%_sysconfdir/X11/xserver/SecurityPolicy %buildroot%_libdir/nxserver/xserver/SecurityPolicy

# fix keyboard layout switch

mkdir -p %buildroot%_sysconfdir/nxagent/xkb/compiled/
#ln -fs ../../../var/lib/xkb %buildroot%_sysconfdir/nxagent/xkb/compiled
ln -fs ../../../../../%_sysconfdir/nxagent/xkb %buildroot%_libdir/nxserver/lib/X11/

rm -rf %buildroot%_sysconfdir/X11
rm -rf %buildroot%_sysconfdir/fonts
rm -rf %buildroot%_includedir
rm -rf %buildroot%_libdir/nxserver/bin
rm -rf %buildroot%_libdir/nxserver/include
rm -rf %buildroot%_libdir/nxserver/lib*/X11/*.so*
rm -rf %buildroot%_libdir/nxserver/lib*/X11/config
rm -rf %buildroot%_libdir/nxserver/lib*/X11/config
rm -rf %buildroot%_libdir/nxserver/lib*/X11/xserver
rm -rf %buildroot%_libdir/nxserver/lib*/pkgconfig
rm -rf %buildroot%_libdir/nxserver/lib*/*.so*
rm -rf %buildroot%_libdir/nxserver/lib*/*.a

ln -fs ../ %buildroot%_libdir/nxserver/
ln -fs ../ %buildroot%_libdir/nxserver/
ln -fs ../ %buildroot%_libdir/nxserver/

mkdir -p %buildroot%_datadir/nxserver/
install -m644 %SOURCE21 %buildroot%_datadir/nxserver/rgb.txt

# install files for development

mkdir -p %buildroot%_includedir/%name
cp -a nxcomp/NX.h %buildroot%_includedir/%name/
cp -a nxcomp/ %buildroot%_libdir/

%doc %_docdir/%name-%version
%dir %_sysconfdir/nxagent
%config %_sysconfdir/nxagent/nxagent.keyboard
%dir %_libdir/nxserver
%dir %_libdir/nxserver/lib
%dir %_libdir/nxserver/lib/X11
%dir %_libdir/nxserver/xserver
%dir %_datadir/nxserver/

%files devel


Todas as alterações você pod ver aqui

projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009