File nx.spec of Package nx
%define srcname %{name}-libs
%define _pkglibdir %{_libdir}/nx
%define _pkgincdir %{_includedir}/nx
%define _pkgdatadir %{_datadir}/nx
%define _pkglibexecdir %{_libexecdir}/nx
%define lib_major_xcompext 3
%define lib_name_xcompext libxcompext%{lib_major_xcompext}
%define lib_major_nxx11 0
%define lib_name_nxx11 libnxX11_%{lib_major_nxx11}
%define lib_major_nxcomp 3
%define lib_name_nxcomp libxcomp%{lib_major_nxcomp}
Name: nx
Version: 3.5.0.16
Release: %mkrel 5
Summary: NX core libraries
License: GPLv2
Group: Networking/Remote access
Url: http://x2go.org/
Source0: http://code.x2go.org/releases/source/%{srcname}/%{srcname}-%{version}-full.tar.gz
BuildRequires: autoconf
BuildRequires: gcc-c++
BuildRequires: libjpeg-turbo-devel
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(zlib)
BuildRequires: pkgconfig(liblzma)
%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.
This package uses the patched and redistributed sources from the
x2go project.
%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
%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
%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
%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.
%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.
%package -n x2goagent
Summary: Wrapper arround nxagent to use with x2goserver
Group: Networking/Remote access
Requires: nxagent
%description -n x2goagent
The x2goagent is a wrapper arround nxagent, that is used for running
x2goserver
%prep
%setup -q -n %{srcname}-%{version}
%build
cat >"tmp_configure" <<EOF
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}"
CONFIGURE_TOP=".";
/usr/lib/rpm/mageia/force-as-needed-for-shared-lib-in-libtool ;
/usr/lib/rpm/mageia/drop-ld-no-undefined-for-shared-lib-modules-in-libtool ;
/usr/lib/rpm/mageia/fix-libtool-ltmain-from-overlinking ;
/usr/lib/rpm/mageia/fix-libtool-from-moving-options-after-libs ;
/usr/lib/rpm/mageia/fix-dlsearch-path-in-libtool-for-multilib lib64 ;
(cd ; [ ! -f configure.in -a ! -f configure.ac ] || libtoolize --copy --force);
[ -f ./configure.in -o -f /configure.ac ] &&
CONFIGURE_XPATH="--x-includes=/usr/include --x-libraries=/usr/lib64"
./configure --prefix=%{_prefix} --exec-prefix=%{_prefix} --bindir=%{_bindir} \
--sbindir=%{_sbindir} --sysconfdir=%{_sysconfdir} --datadir=%{_datadir} \
--includedir=%{_includedir} --libdir=%{_libdir} --libexecdir=%{_libdir} \
--localstatedir=%{_localstatedir} --mandir=%{_mandir} \
--infodir=%{_infodir}
EOF
chmod a+x tmp_configure
make CONFIGURE="$PWD/tmp_configure"
%install
#%makeinstall_std PREFIX="%{_prefix}" \
# INSTALL_DIR="install -dm0755" \
# INSTALL_FILE="install -pm0644" \
# INSTALL_PROGRAM="install -pm0755"
#rm -rf %{buildroot}%{_sysconfdir}/fonts
#rm -rf %{buildroot}%{_includedir}/GL
#find %{buildroot} -name "*.la" -delete
#find %{buildroot} -name "*.a" -delete
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_pkglibdir}
mkdir -p %{buildroot}%{_pkglibexecdir}
mkdir -p %{buildroot}%{_mandir}/man1
# install X11 Support Libraries and Agents
install -pm0755 \
nx-X11/lib/freetype2/libNX_freetype.so.*.* \
nx-X11/lib/X11/libNX_X11.so.*.* \
nx-X11/lib/Xau/libNX_Xau.so.*.* \
nx-X11/lib/Xcomposite/libNX_Xcomposite.so.*.* \
nx-X11/lib/Xdamage/libNX_Xdamage.so.*.* \
nx-X11/lib/Xdmcp/libNX_Xdmcp.so.*.* \
nx-X11/lib/Xext/libNX_Xext.so.*.* \
nx-X11/lib/Xfixes/libNX_Xfixes.so.*.* \
nx-X11/lib/Xinerama/libNX_Xinerama.so.*.* \
nx-X11/lib/Xpm/libNX_Xpm.so.*.* \
nx-X11/lib/Xrandr/libNX_Xrandr.so.*.* \
nx-X11/lib/Xrender/libNX_Xrender.so.*.* \
nx-X11/lib/Xtst/libNX_Xtst.so.*.* \
%{buildroot}%{_pkglibdir}
install -pm0755 nx-X11/programs/Xserver/nxagent \
%{buildroot}%{_pkglibexecdir}
install -pm0755 nx-X11/programs/nxauth/nxauth \
%{buildroot}%{_pkglibexecdir}
# install Compression Libraries and Proxy
install -pm0755 nxcomp/libXcomp.so.*.* \
nxcompext/libXcompext.so.*.* \
nxcompshad/libXcompshad.so.*.* \
%{buildroot}%{_pkglibdir}
install -pm0755 nxproxy/nxproxy %{buildroot}%{_pkglibexecdir}
# set up shared lib symlinks
/sbin/ldconfig -n %{buildroot}%{_pkglibdir}
cat > %{buildroot}%{_bindir}/nxagent << EOF
#!/bin/sh
LD_LIBRARY_PATH="%{_pkglibdir}:\$LD_LIBRARY_PATH" exec "%{_pkglibexecdir}/nxagent" "\$@"
EOF
cat > %{buildroot}%{_bindir}/nxauth << EOF
#!/bin/sh
LD_LIBRARY_PATH="%{_pkglibdir}:\$LD_LIBRARY_PATH" exec "%{_pkglibexecdir}/nxauth" "\$@"
EOF
cat > %{buildroot}%{_bindir}/nxproxy << EOF
#!/bin/sh
LD_LIBRARY_PATH="%{_pkglibdir}:\$LD_LIBRARY_PATH" exec "%{_pkglibexecdir}/nxproxy" "\$@"
EOF
# create x2goagent symlink
ln -s %{_pkglibexecdir}/nxagent %{buildroot}%{_pkglibexecdir}/x2goagent
cat > %{buildroot}%{_bindir}/x2goagent << EOF
#!/bin/sh
LD_LIBRARY_PATH="%{_pkglibdir}:\$LD_LIBRARY_PATH" exec "%{_pkglibexecdir}/x2goagent" "\$@"
EOF
mkdir -p %{buildroot}%{_datadir}/pixmaps/
mkdir -p %{buildroot}%{_mandir}/man1/
install -pm0644 nx-X11/programs/Xserver/hw/nxagent/x2go.xpm %{buildroot}%{_datadir}/pixmaps/
install -pm0644 nx-X11/programs/Xserver/hw/nxagent/man/x2goagent.1 %{buildroot}%{_mandir}/man1/
install -pm0644 nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 %{buildroot}%{_mandir}/man1/
install -pm0644 nxproxy/man/nxproxy.1 %{buildroot}%{_mandir}/man1/
#install doc files
for i in nxcomp nxcompext nxcompshad nxproxy 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
%files -n nxproxy
%dir %{_pkglibexecdir}
%dir %{_defaultdocdir}/%{name}-%{version}
%{_pkglibexecdir}/nxproxy
%attr(0755,root,root) %{_bindir}/nxproxy
%{_mandir}/man1/nxproxy*
%doc %{_defaultdocdir}/%{name}-%{version}/nxproxy
%files -n nxagent
%dir %{_pkglibexecdir}
%dir %{_defaultdocdir}/%{name}-%{version}
%{_pkglibexecdir}/nxagent
%attr(0755,root,root) %{_bindir}/nxagent
%{_mandir}/man1/nxagent*
%doc %{_defaultdocdir}/%{name}-%{version}/nxagent
%files -n %{lib_name_nxx11}
%dir %{_pkglibdir}
%dir %{_pkglibexecdir}
%dir %{_defaultdocdir}/%{name}-%{version}
%{_pkglibdir}/libNX_freetype*.so.*
%{_pkglibdir}/libNX_X11*.so.*
%{_pkglibdir}/libNX_Xau*.so.*
%{_pkglibdir}/libNX_Xcomposite*.so.*
%{_pkglibdir}/libNX_Xdamage*.so.*
%{_pkglibdir}/libNX_Xdmcp*.so.*
%{_pkglibdir}/libNX_Xext*.so.*
%{_pkglibdir}/libNX_Xfixes*.so.*
%{_pkglibdir}/libNX_Xinerama*.so.*
%{_pkglibdir}/libNX_Xpm*.so.*
%{_pkglibdir}/libNX_Xrandr*.so.*
%{_pkglibdir}/libNX_Xrender*.so.*
%{_pkglibdir}/libNX_Xtst*.so.*
%{_pkglibexecdir}/nxauth
%attr(0755,root,root) %{_bindir}/nxauth
%doc %{_defaultdocdir}/%{name}-%{version}/nx-X11
%doc %{_defaultdocdir}/%{name}-%{version}/nxauth
%files -n %{lib_name_nxcomp}
%dir %{_pkglibdir}
%dir %{_defaultdocdir}/%{name}-%{version}
%{_pkglibdir}/libXcomp.so.*
%doc %{_defaultdocdir}/%{name}-%{version}/nxcomp
%files -n %{lib_name_xcompext}
%dir %{_pkglibdir}
%dir %{_defaultdocdir}/%{name}-%{version}
%{_pkglibdir}/libXcompext.so.*
%{_pkglibdir}/libXcompshad.so.*
%doc %{_defaultdocdir}/%{name}-%{version}/nxcompext
%doc %{_defaultdocdir}/%{name}-%{version}/nxcompshad
%files -n x2goagent
%{_pkglibexecdir}/x2goagent
%attr(0755,root,root) %{_bindir}/x2goagent
%{_mandir}/man1/x2goagent*
%{_datadir}/pixmaps/x2go.xpm
%changelog
* Mon Jun 03 2013 fwang <fwang> 3.5.0.16-5.mga4
+ Revision: 435510
- rebuild for new libpng
* Sun Jan 13 2013 barjac <barjac> 3.5.0.16-4.mga3
+ Revision: 369339
- remove duplicate define
- create _pkglibexecdir in sub pkgs
* Sun Jan 13 2013 barjac <barjac> 3.5.0.16-3.mga3
+ Revision: 361855
- fix build (libexec)
+ umeabot <umeabot>
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild
* Thu Dec 13 2012 obgr_seneca <obgr_seneca> 3.5.0.16-1.mga3
+ Revision: 330107
- new version
* Wed Sep 26 2012 obgr_seneca <obgr_seneca> 3.5.0.15-1.mga3
+ Revision: 297936
- New version
* Mon May 28 2012 obgr_seneca <obgr_seneca> 3.5.0.13-1.mga3
+ Revision: 247902
- new version 3.5.0.13
* Tue Apr 03 2012 obgr_seneca <obgr_seneca> 3.5.0.12-1.mga2
+ Revision: 228276
- New version 3.5.0.12
* Fri Mar 09 2012 obgr_seneca <obgr_seneca> 3.5.0.11-2.mga2
+ Revision: 222038
-changed x2goagent wrapper setup
* Thu Mar 01 2012 obgr_seneca <obgr_seneca> 3.5.0.11-1.mga2
+ Revision: 216547
- removed unneeded BR on x11-devel
- switched upstream to x2go
- parts of the spec borrowed from openSUSE
- added x2goagent wrapper arround nxagent
- use redistributed source by x2go instead of nomachine source od nxagent
* Sun Jan 29 2012 obgr_seneca <obgr_seneca> 3.5.0-2.mga2
+ Revision: 202856
- filtered provides so other packages are not confused (Bug #4325)
* Sat Jan 28 2012 obgr_seneca <obgr_seneca> 3.5.0-1.mga2
+ Revision: 202719
- spec file changes taken mainly from fedora spec
- added nxscripts
- new version 3.5.0
- added png-1.5 patch
- imported package nx