# most of the descriptions are stolen from the debian package # build section stolen from fedora spec %define _pkglibdir %{_libdir}/nx %define _pkgdatadir %{_datadir}/nx %define _pkglibexecdir %{_libexecdir}/nx Name: nx Version: 3.5.0 Release: %mkrel 1 Summary: NoMachine NX License: GPLv2+ and MIT Group: Networking/Remote access URL: http://www.nomachine.com/sources.php # Compression Libraries and Proxy Sources Source0: http://64.34.161.181/download/%{version}/sources/nxproxy-%{version}-1.tar.gz Source1: http://64.34.161.181/download/%{version}/sources/nxcomp-%{version}-2.tar.gz Source2: http://64.34.161.181/download/%{version}/sources/nxcompext-%{version}-1.tar.gz Source3: http://64.34.161.181/download/%{version}/sources/nxssh-%{version}-2.tar.gz # Shadowing Libraries Source4: http://64.34.161.181/download/%{version}/sources/nxcompshad-%{version}-2.tar.gz # X11 Support Programs and Libraries Source5: http://64.34.161.181/download/%{version}/sources/nx-X11-%{version}-2.tar.gz Source6: http://64.34.161.181/download/%{version}/sources/nxauth-%{version}-1.tar.gz Source7: http://64.34.161.181/download/%{version}/sources/nxwin-%{version}-2.tar.gz # X11 Agent Sources Source8: http://64.34.161.181/download/%{version}/sources/nxagent-%{version}-5.tar.gz # NX Example Scripts Source9: http://64.34.161.181/download/%{version}/sources/nxscripts-%{version}-1.tar.gz # Documentation Source10: docs.tar.bz2 Source11: GUUG-Presentation-NX.pdf Patch0: nx-3.5.0-fdr-optflags.patch Patch1: nx-X11-3.5.0-fdr-syslibs.patch Patch2: nx-X11-3.5.0-mga-mdv-fix-format-errors.patch Patch3: nxcomp-3.5.0-openbsd-png-1.5.patch Patch4: nxssh-3.5.0-mga-mdv-fix-format-errors.patch BuildRequires: gcc-c++ BuildRequires: libstdc++-devel BuildRequires: hardlink BuildRequires: expat-devel BuildRequires: pkgconfig(audiofile) BuildRequires: pkgconfig(openssl) BuildRequires: jpeg-devel BuildRequires: pkgconfig(libpng15) BuildRequires: pkgconfig(xt) BuildRequires: pkgconfig(xproto) BuildRequires: pkgconfig(xp) BuildRequires: imake BuildRequires: pkgconfig(xdamage) BuildRequires: pkgconfig(xrandr) BuildRequires: pkgconfig(xtst) BuildRequires: fontconfig-devel %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 ############### # 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 ########## # 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 ########### # 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 ########## # nx-doc # ########## %package -n nx-doc Summary: NX documentation Group: Networking/Remote access %description -n nx-doc Documentation for the nx libraries %prep %setup -q -c %{name}-%{version} -T -a0 -a1 -a2 -a3 -a4 -a5 -a6 -a7 -a8 -a9 %apply_patches cat <>nx-X11/config/cf/host.def #define UseRpath YES #define UsrLibDir %{_pkglibdir} EOF find nx-X11 -name "*.[ch]" -print0 | xargs -0 chmod -c -x %build export CFLAGS="-O2 -g -pipe -Wformat -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4" %ifarch x86_64 ppc64 export CFLAGS="$CFLAGS -fPIC -DPIC" %endif export CXXFLAGS="$CFLAGS" export RPM_OPT_FLAGS="$CFLAGS" export LDFLAGS="%{?__global_ldflags} -Wl,-rpath,%{_pkglibdir}" # The commented parts show how the build would proceed step by step. # This information is important in case someone wants to split this package # (which would be the proper thing to do). # Within the commented area the make World invocation does all for # you. It isn't placed by accident in the middle of the commented # build instructions, as this is where the X11 libs would be built # build Compression Library and Proxy for i in nxcomp nxcompshad nxproxy; do pushd $i; ./configure; make %{?_smp_mflags} CCFLAGS="$CFLAGS"; popd done # build X11 Support Libraries and Agents SHLIBGLOBALSFLAGS="$LDFLAGS" make %{?_smp_mflags} -C nx-X11 World %if 0 # build Extended Compression Library pushd nxcompext ./configure; make %{?_smp_mflags} popd %endif pushd nxssh ./configure --without-zlib-version-check make %{?_smp_mflags} nxssh popd %install mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_pkglibdir} mkdir -p %{buildroot}%{_pkglibexecdir} mkdir -p %{buildroot}%{_mandir}/man1 # install X11 Support Libraries and Agents install -p -m 0755 nx-X11/lib/X11/libX11.so.*.* \ nx-X11/lib/Xcomposite/libXcomposite.so.*.* \ nx-X11/lib/Xdamage/libXdamage.so.*.* \ nx-X11/lib/Xext/libXext.so.*.* \ nx-X11/lib/Xfixes/libXfixes.so.*.* \ nx-X11/lib/Xpm/libXpm.so.*.* \ nx-X11/lib/Xrandr/libXrandr.so.*.* \ nx-X11/lib/Xrender/libXrender.so.*.* \ nx-X11/lib/Xtst/libXtst.so.*.* \ %{buildroot}%{_pkglibdir} install -p -m 0755 nx-X11/programs/Xserver/nxagent \ %{buildroot}%{_pkglibexecdir} ln -s %{_pkglibexecdir}/nxagent %{buildroot}%{_bindir}/nxagent # install Compression Libraries and Proxy install -p -m 0755 nxcomp/libXcomp.so.*.* \ nxcompext/libXcompext.so.*.* \ nxcompshad/libXcompshad.so.*.* \ %{buildroot}%{_pkglibdir} install -p -m 0755 nxssh/nxssh %{buildroot}%{_pkglibexecdir} ln -s %{_pkglibexecdir}/nxssh %{buildroot}%{_bindir}/nxssh install -p -m 0755 nxproxy/nxproxy %{buildroot}%{_pkglibexecdir} ln -s %{_pkglibexecdir}/nxproxy %{buildroot}%{_bindir}/nxproxy # set up shared lib symlinks /sbin/ldconfig -n %{buildroot}%{_pkglibdir} # install scripts mkdir -p %{buildroot}%{_defaultdocdir}/%{name}-%{version} cp -a nxscripts %{buildroot}%{_defaultdocdir}/%{name}-%{version} # documentation and license # TODO: docs tarball contains dupes wrt nxscripts tar xjf %{SOURCE10} -C %{buildroot}%{_defaultdocdir}/%{name}-%{version} for i in nxcomp nxcompext nxcompshad nxproxy nxssh nx-X11 \ nx-X11/programs/nxauth nx-X11/programs/Xserver/hw/nxagent; do for j in CHANGELOG COPYING LICENSE; do [ -f $i/$j ] && install -Dpm 0644 $i/$j \ %{buildroot}%{_defaultdocdir}/%{name}-%{version}/${i##*/}/$j done done # save a bit of space %{_sbindir}/hardlink -cv %{buildroot}%{_defaultdocdir}/%{name}-%{version} install -m0644 %{SOURCE11} %{buildroot}%{_defaultdocdir}/%{name}-%{version} %files -n nxproxy %{_bindir}/nxproxy %{_pkglibdir}/nxproxy %files -n nxagent %{_bindir}/nxagent %{_pkglibdir}/nxagent #---------- nxcomp %files -n %{lib_name_nxcomp} %{_pkglibdir}/libXcomp.so.* #---------- nx-x11 %files -n %{lib_name_nxx11} %{_pkglibdir}/libX11*.so.* %{_pkglibdir}/libXcomposite*.so.* %{_pkglibdir}/libXdamage*.so.* %{_pkglibdir}/libXext*.so.* %{_pkglibdir}/libXfixes*.so.* %{_pkglibdir}/libXpm*.so.* %{_pkglibdir}/libXrandr*.so.* %{_pkglibdir}/libXrender*.so.* %{_pkglibdir}/libXtst*.so.* #-------- lib xcompext %files -n %{lib_name_xcompext} %{_pkglibdir}/libXcompext.so.* %{_pkglibdir}/libXcompshad.so.* #-------- nxssh %files -n nxssh %{_bindir}/nxssh %{_pkglibdir}/nxssh #-------- docs %files -n nx-doc %{_datadir}/doc/nx-3.5.0