2 # - the x11 libraires packaged to %{_libdir}/NX aren't used, still links (without rpath) to system xorg libs
3 # so get rid of the copies or make link with them!
7 %define compext_minor 1
8 %define compshad_minor 2
11 %define scripts_minor 1
13 Summary: NoMachine NX is the next-generation X compression scheme
14 Summary(pl.UTF-8): NoMachine NX to schemat kompresji nowej generacji dla X
20 #SourceDownload: http://www.nomachine.com/sources.php
21 Source0: http://64.34.173.142/download/%{version}/sources/%{name}-X11-%{version}-%{X11_minor}.tar.gz
22 # Source0-md5: 12060433a74ac61a1c776d1d6d136117
23 Source1: http://64.34.173.142/download/%{version}/sources/%{name}agent-%{version}-%{agent_minor}.tar.gz
24 # Source1-md5: 54f7391e457c2aa765a30f322ee68397
25 Source2: http://64.34.173.142/download/%{version}/sources/%{name}auth-%{version}-%{auth_minor}.tar.gz
26 # Source2-md5: cf38ec1e5a5f6453946cd387c14f2684
27 Source3: http://64.34.173.142/download/%{version}/sources/%{name}proxy-%{version}-%{proxy_minor}.tar.gz
28 # Source3-md5: 488bb4d9b8e9f82dc272b4e6e9c57d30
29 Source4: http://64.34.173.142/download/%{version}/sources/%{name}comp-%{version}-%{comp_minor}.tar.gz
30 # Source4-md5: ad8c0f133122c6d07732ca69c8759410
31 Source5: http://64.34.173.142/download/%{version}/sources/%{name}compext-%{version}-%{compext_minor}.tar.gz
32 # Source5-md5: abde2ccc33e31fc695031c2cfb60f3dd
33 Source6: http://64.34.173.142/download/%{version}/sources/%{name}compshad-%{version}-%{compshad_minor}.tar.gz
34 # Source6-md5: 90a762dd9eb19c8c97876ad837923857
35 Source7: http://64.34.173.142/download/%{version}/sources/%{name}scripts-%{version}-%{scripts_minor}.tar.gz
36 # Source7-md5: 17712cc9e9aff58f9fd22bf670a4a98b
37 Source8: http://64.34.173.142/download/%{version}/sources/%{name}ssh-%{version}-%{ssh_minor}.tar.gz
38 # Source8-md5: f52fcdb38e09f8dcfb9ff0344dfbbbd6
39 Patch0: nx-optflags.patch
40 Patch1: nx-syslibs.patch
41 Patch2: nx-libpng15.patch
42 Patch3: format-security.patch
44 Patch5: openssl-1.1.1.patch
45 URL: http://www.nomachine.com/
46 #BuildRequires: Xaw3d-devel
47 BuildRequires: autoconf
48 BuildRequires: automake
49 BuildRequires: libjpeg-devel
50 BuildRequires: libpng-devel
51 BuildRequires: libstdc++-devel
52 BuildRequires: openssl-devel
53 BuildRequires: sed >= 4.0
55 BuildRequires: xorg-cf-files
56 BuildRequires: xorg-lib-libX11-devel
57 BuildRequires: xorg-lib-libXdamage-devel
58 BuildRequires: xorg-lib-libXrandr-devel
59 BuildRequires: xorg-lib-libXt-devel
60 BuildRequires: xorg-lib-libXtst-devel
61 BuildRequires: xorg-util-imake
62 Requires: xorg-font-font-cursor-misc
63 Requires: xorg-font-font-misc-misc
64 Requires: xorg-font-font-misc-misc-base
71 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
73 # don't satisfy xorg deps for the rest of the distro
74 %define _noautoprovfiles %{_libdir}/NX
76 # and as we don't provide them, don't require either
77 %define _noautoreq libX11.so libXcomposite.so libXdamage.so libXext.so libXfixes.so libXpm.so libXrandr.so libXrender.so libXtst.so libXcomp.so libXcompext.so libXcompshad.so
79 # so check gets really confused in here
80 %define no_install_post_check_so 1
83 NoMachine NX is the next-generation X compression and roundtrip
84 suppression scheme. It can operate remote X11 sessions over 56k modem
85 dialup links or anything better.
87 %description -l pl.UTF-8
88 NoMachine NX to schemat kompresji dla X nowej generacji. Działa na
89 zdalnych sesjach X11 nawet przy prędkosci 56k albo większej.
92 %setup -q -c -a1 -a2 -a3 -a4 -a5 -a6 -a7 -a8
100 cat <<EOF >>nx-X11/config/cf/host.def
102 #define UsrLibDir %{_libdir}/NX
106 export CFLAGS="%{rpmcflags} -fPIC -DPIC"
107 export CXXFLAGS="%{rpmcflags} -fPIC -DPIC"
108 export CPPFLAGS="%{rpmcflags} -fPIC -DPIC"
109 export LDFLAGS="%{rpmldflags} -Wl,-rpath,%{_libdir}/NX"
111 perl -pi -e"s|CXXFLAGS=.-O.*|CXXFLAGS=\"$CXXFLAGS\"|" */configure
118 # build Compression Library and Proxy
119 for i in nxcomp nxcompshad nxproxy; do
126 # build X11 Support Libraries and Agents
128 %{__make} -C nx-X11 World
130 # build Extended Compression Library
143 --with-md5-passwords \
144 --with-ipaddr-display \
145 %{?with_libedit:--with-libedit} \
148 --with-tcp-wrappers \
149 %{?with_ldap:--with-libs="-lldap -llber"} \
150 %{?with_ldap:--with-cppflags="-DWITH_LDAP_PUBKEY"} \
151 %{?with_kerberos5:--with-kerberos5=%{_prefix}} \
152 --with-privsep-path=%{_privsepdir} \
153 --with-pid-dir=%{_localstatedir}/run \
154 --with-xauth=%{_bindir}/xauth \
158 echo '#define LOGIN_PROGRAM "/bin/login"' >>config.h
162 rm -rf $RPM_BUILD_ROOT
163 install -d $RPM_BUILD_ROOT{%{_libdir}/{pkgconfig,NX},%{_bindir}}
166 install nx-X11/lib/X11/libX11.so.* \
167 nx-X11/lib/Xcomposite/libXcomposite.so.* \
168 nx-X11/lib/Xdamage/libXdamage.so.* \
169 nx-X11/lib/Xext/libXext.so.* \
170 nx-X11/lib/Xfixes/libXfixes.so.* \
171 nx-X11/lib/Xpm/libXpm.so.* \
172 nx-X11/lib/Xrandr/libXrandr.so.* \
173 nx-X11/lib/Xrender/libXrender.so.* \
174 nx-X11/lib/Xtst/libXtst.so.* \
175 $RPM_BUILD_ROOT%{_libdir}/NX
177 install nx-X11/programs/Xserver/nxagent $RPM_BUILD_ROOT%{_bindir}
178 install nx-X11/programs/nxauth/nxauth $RPM_BUILD_ROOT%{_bindir}
180 # Compression Libraries
181 install nxcomp/libXcomp.so.* \
182 nxcompext/libXcompext.so.* \
183 nxcompshad/libXcompshad.so.* \
184 $RPM_BUILD_ROOT%{_libdir}/NX
187 install nxproxy/nxproxy $RPM_BUILD_ROOT%{_bindir}
190 install nxssh/nxssh $RPM_BUILD_ROOT%{_bindir}
193 rm -rf $RPM_BUILD_ROOT
196 %defattr(644,root,root,755)
198 %attr(755,root,root) %{_bindir}/nxagent
199 %attr(755,root,root) %{_bindir}/nxauth
200 %attr(755,root,root) %{_bindir}/nxproxy
201 %attr(755,root,root) %{_bindir}/nxssh
203 %attr(755,root,root) %{_libdir}/NX/*.so.*