1 |
# most of the descriptions are stolen from the debian package |
2 |
# build section stolen from fedora spec |
3 |
%define _pkglibdir %{_libdir}/nx |
4 |
%define _pkgincdir %{_includedir}/nx |
5 |
%define _pkgdatadir %{_datadir}/nx |
6 |
%define _pkglibexecdir %{_libexecdir}/nx |
7 |
|
8 |
%define develname %mklibname -d %{name} |
9 |
|
10 |
# Do not provide certain libs to not create problems for other packages |
11 |
%define _exclude_files_from_autoprov .*Xcomposite.*\\|.*Xdamage.*\\|.*Xext.*\\|.*Xfixes.*\\|.*Xpm.*\\|.*Xrandr.*\\|.*Xrender.*\\|.*Xtst.*\\|.*X11.* |
12 |
|
13 |
Name: nx |
14 |
Version: 3.5.0 |
15 |
Release: %mkrel 3 |
16 |
Summary: NoMachine NX |
17 |
License: GPLv2+ and MIT |
18 |
Group: Networking/Remote access |
19 |
URL: http://www.nomachine.com/sources.php |
20 |
|
21 |
# Compression Libraries and Proxy Sources |
22 |
Source0: http://64.34.161.181/download/%{version}/sources/nxproxy-%{version}-1.tar.gz |
23 |
Source1: http://64.34.161.181/download/%{version}/sources/nxcomp-%{version}-2.tar.gz |
24 |
Source2: http://64.34.161.181/download/%{version}/sources/nxcompext-%{version}-1.tar.gz |
25 |
Source3: http://64.34.161.181/download/%{version}/sources/nxssh-%{version}-2.tar.gz |
26 |
# Shadowing Libraries |
27 |
Source4: http://64.34.161.181/download/%{version}/sources/nxcompshad-%{version}-2.tar.gz |
28 |
# X11 Support Programs and Libraries |
29 |
Source5: http://64.34.161.181/download/%{version}/sources/nx-X11-%{version}-2.tar.gz |
30 |
Source6: http://64.34.161.181/download/%{version}/sources/nxauth-%{version}-1.tar.gz |
31 |
Source7: http://64.34.161.181/download/%{version}/sources/nxwin-%{version}-2.tar.gz |
32 |
# X11 Agent Sources |
33 |
# use patched, redistributed sources from x2go |
34 |
Source8: http://code.x2go.org/releases/source/nx-libs/nxagent/nxagent-3.5.0-7.tar.gz |
35 |
# NX Example Scripts |
36 |
Source9: http://64.34.161.181/download/%{version}/sources/nxscripts-%{version}-1.tar.gz |
37 |
# Documentation |
38 |
Source10: docs.tar.bz2 |
39 |
Source11: GUUG-Presentation-NX.pdf |
40 |
|
41 |
Patch0: nx-3.5.0-fdr-optflags.patch |
42 |
Patch1: nx-X11-3.5.0-fdr-syslibs.patch |
43 |
Patch2: nx-X11-3.5.0-mga-mdv-fix-format-errors.patch |
44 |
Patch3: nxcomp-3.5.0-openbsd-png-1.5.patch |
45 |
Patch4: nxssh-3.5.0-mga-mdv-fix-format-errors.patch |
46 |
|
47 |
BuildRequires: gcc-c++ |
48 |
BuildRequires: libstdc++-devel |
49 |
BuildRequires: hardlink |
50 |
BuildRequires: expat-devel |
51 |
BuildRequires: pkgconfig(audiofile) |
52 |
BuildRequires: pkgconfig(openssl) |
53 |
BuildRequires: jpeg-devel |
54 |
BuildRequires: pkgconfig(libpng15) |
55 |
BuildRequires: pkgconfig(xt) |
56 |
BuildRequires: pkgconfig(xproto) |
57 |
BuildRequires: pkgconfig(xp) |
58 |
BuildRequires: imake |
59 |
BuildRequires: pkgconfig(xdamage) |
60 |
BuildRequires: pkgconfig(xrandr) |
61 |
BuildRequires: pkgconfig(xtst) |
62 |
BuildRequires: fontconfig-devel |
63 |
|
64 |
%description |
65 |
NoMachine NX is the next-generation X compression and roundtrip |
66 |
suppression scheme. It can operate remote X11 sessions over |
67 |
56k modem dialup links or anything better. |
68 |
|
69 |
############ |
70 |
# nx-devel # |
71 |
############ |
72 |
%package -n %{develname} |
73 |
Summary: Development files for %{name} |
74 |
Group: System/Libraries |
75 |
Provides: %{name}-devel |
76 |
|
77 |
%description -n %{develname} |
78 |
Development files needed for developing with the nx libraries |
79 |
|
80 |
#################### |
81 |
# xcompext lib # |
82 |
#################### |
83 |
%define lib_name_orig_xcompext libxcompext |
84 |
%define lib_major_xcompext 3 |
85 |
%define lib_name_xcompext %mklibname xcompext %{lib_major_xcompext} |
86 |
%package -n %{lib_name_xcompext} |
87 |
Summary: Xcompext/Xcompshad library for NX |
88 |
Group: System/Libraries |
89 |
Provides: xcompext = %{version}-%{release} |
90 |
Provides: xcompshad = %{version}-%{release} |
91 |
|
92 |
%description -n %{lib_name_xcompext} |
93 |
Xcompext and Xcompshad library needed by the NX framework |
94 |
|
95 |
############### |
96 |
# nx-X11 lib # |
97 |
############### |
98 |
%define lib_name_orig_nxx11 libnxX11 |
99 |
%define lib_major_nxx11 0 |
100 |
%define lib_name_nxx11 %mklibname nxX11_ %{lib_major_nxx11} |
101 |
%package -n %{lib_name_nxx11} |
102 |
Summary: Nx-X11 lib for NX |
103 |
Group: System/Libraries |
104 |
Provides: nxX11 = %{version}-%{release} |
105 |
|
106 |
%description -n %{lib_name_nxx11} |
107 |
NX-X11 lib for the NX framework |
108 |
|
109 |
########## |
110 |
# nxcomp # |
111 |
########## |
112 |
%define lib_name_orig_nxcomp libxcomp |
113 |
%define lib_major_nxcomp 3 |
114 |
%define lib_name_nxcomp %mklibname xcomp %{lib_major_nxcomp} |
115 |
|
116 |
%package -n %{lib_name_nxcomp} |
117 |
Summary: Xcomp library for NX |
118 |
Group: System/Libraries |
119 |
Provides: xcomp = %{version}-%{release} |
120 |
|
121 |
%description -n %{lib_name_nxcomp} |
122 |
Xcomp library for NX subsystem |
123 |
|
124 |
########### |
125 |
# nxproxy # |
126 |
########### |
127 |
%package -n nxproxy |
128 |
Summary: Provide the protocol compression and caching part of the NX scheme |
129 |
Group: Networking/Remote access |
130 |
|
131 |
%description -n nxproxy |
132 |
The nxproxy runs on the X server side of the wire and thus accompanies |
133 |
the nxagent running on X client side. It provides the protocol |
134 |
compression and caching part of the NX scheme. |
135 |
|
136 |
########### |
137 |
# nxagent # |
138 |
########### |
139 |
%package -n nxagent |
140 |
Summary: NX X server based on Xnest |
141 |
Group: Networking/Remote access |
142 |
|
143 |
%description -n nxagent |
144 |
The nxagent is an X server based on Xnest, but modified |
145 |
for the purpose of reducing roundtrips over high-latency |
146 |
networks significantly. It is run on the client side of X, |
147 |
that is, on the machine where X clients run. It connects, |
148 |
over the wire, to your regular X server, possibly through nxproxy. |
149 |
|
150 |
######### |
151 |
# nxssh # |
152 |
######### |
153 |
|
154 |
%package -n nxssh |
155 |
Summary: NX ssh client |
156 |
Group: Networking/Remote access |
157 |
|
158 |
%description -n nxssh |
159 |
Nx ssh client |
160 |
|
161 |
########## |
162 |
# nx-doc # |
163 |
########## |
164 |
|
165 |
%package -n nx-doc |
166 |
Summary: NX documentation |
167 |
Group: Networking/Remote access |
168 |
|
169 |
%description -n nx-doc |
170 |
Documentation for the nx libraries |
171 |
|
172 |
%prep |
173 |
%setup -q -c %{name}-%{version} -T -a0 -a1 -a2 -a3 -a4 -a5 -a6 -a7 -a8 -a9 |
174 |
%apply_patches |
175 |
|
176 |
cat <<EOF >>nx-X11/config/cf/host.def |
177 |
#define UseRpath YES |
178 |
#define UsrLibDir %{_pkglibdir} |
179 |
EOF |
180 |
find nx-X11 -name "*.[ch]" -print0 | xargs -0 chmod -c -x |
181 |
|
182 |
%build |
183 |
export CFLAGS="-O2 -g -pipe -Wformat -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4" |
184 |
%ifarch x86_64 ppc64 |
185 |
export CFLAGS="$CFLAGS -fPIC -DPIC" |
186 |
%endif |
187 |
export CXXFLAGS="$CFLAGS" |
188 |
export RPM_OPT_FLAGS="$CFLAGS" |
189 |
export LDFLAGS="%{?__global_ldflags} -Wl,-rpath,%{_pkglibdir}" |
190 |
|
191 |
# The commented parts show how the build would proceed step by step. |
192 |
# This information is important in case someone wants to split this package |
193 |
# (which would be the proper thing to do). |
194 |
# Within the commented area the make World invocation does all for |
195 |
# you. It isn't placed by accident in the middle of the commented |
196 |
# build instructions, as this is where the X11 libs would be built |
197 |
|
198 |
# build Compression Library and Proxy |
199 |
for i in nxcomp nxcompshad nxproxy; do |
200 |
pushd $i; ./configure; make %{?_smp_mflags} CCFLAGS="$CFLAGS"; popd |
201 |
done |
202 |
# build X11 Support Libraries and Agents |
203 |
SHLIBGLOBALSFLAGS="$LDFLAGS" make %{?_smp_mflags} -C nx-X11 World |
204 |
%if 0 |
205 |
# build Extended Compression Library |
206 |
pushd nxcompext |
207 |
./configure; make %{?_smp_mflags} |
208 |
popd |
209 |
%endif |
210 |
pushd nxssh |
211 |
./configure --without-zlib-version-check |
212 |
make %{?_smp_mflags} nxssh |
213 |
popd |
214 |
|
215 |
%install |
216 |
mkdir -p %{buildroot}%{_bindir} |
217 |
mkdir -p %{buildroot}%{_pkglibdir} |
218 |
mkdir -p %{buildroot}%{_pkglibexecdir} |
219 |
mkdir -p %{buildroot}%{_mandir}/man1 |
220 |
|
221 |
# install X11 Support Libraries and Agents |
222 |
install -p -m 0755 nx-X11/lib/X11/libX11.so.*.* \ |
223 |
nx-X11/lib/Xcomposite/libXcomposite.so.*.* \ |
224 |
nx-X11/lib/Xdamage/libXdamage.so.*.* \ |
225 |
nx-X11/lib/Xext/libXext.so.*.* \ |
226 |
nx-X11/lib/Xfixes/libXfixes.so.*.* \ |
227 |
nx-X11/lib/Xpm/libXpm.so.*.* \ |
228 |
nx-X11/lib/Xrandr/libXrandr.so.*.* \ |
229 |
nx-X11/lib/Xrender/libXrender.so.*.* \ |
230 |
nx-X11/lib/Xtst/libXtst.so.*.* \ |
231 |
%{buildroot}%{_pkglibdir} |
232 |
install -p -m 0755 nx-X11/programs/Xserver/nxagent \ |
233 |
%{buildroot}%{_pkglibexecdir} |
234 |
ln -s %{_pkglibexecdir}/nxagent %{buildroot}%{_bindir}/nxagent |
235 |
# install Compression Libraries and Proxy |
236 |
install -p -m 0755 nxcomp/libXcomp.so.*.* \ |
237 |
nxcompext/libXcompext.so.*.* \ |
238 |
nxcompshad/libXcompshad.so.*.* \ |
239 |
%{buildroot}%{_pkglibdir} |
240 |
install -p -m 0755 nxssh/nxssh %{buildroot}%{_pkglibexecdir} |
241 |
ln -s %{_pkglibexecdir}/nxssh %{buildroot}%{_bindir}/nxssh |
242 |
install -p -m 0755 nxproxy/nxproxy %{buildroot}%{_pkglibexecdir} |
243 |
ln -s %{_pkglibexecdir}/nxproxy %{buildroot}%{_bindir}/nxproxy |
244 |
# set up shared lib symlinks |
245 |
/sbin/ldconfig -n %{buildroot}%{_pkglibdir} |
246 |
for i in libX11 libXcompext libXcomposite libXcompshad libXcomp libXdamage \ |
247 |
libXext libXfixes libXpm libXrandr libXrender libXtst; do |
248 |
for j in $(seq 0 9); do |
249 |
[ -f %{buildroot}%{_pkglibdir}/$i.so.$j ] && ln -s \ |
250 |
%{_pkglibdir}/$i.so.$j %{buildroot}%{_pkglibdir}/$i.so |
251 |
done |
252 |
done |
253 |
# install scripts |
254 |
mkdir -p %{buildroot}%{_defaultdocdir}/%{name}-%{version} |
255 |
cp -a nxscripts %{buildroot}%{_defaultdocdir}/%{name}-%{version} |
256 |
# documentation and license |
257 |
# TODO: docs tarball contains dupes wrt nxscripts |
258 |
tar xjf %{SOURCE10} -C %{buildroot}%{_defaultdocdir}/%{name}-%{version} |
259 |
for i in nxcomp nxcompext nxcompshad nxproxy nxssh nx-X11 \ |
260 |
nx-X11/programs/nxauth nx-X11/programs/Xserver/hw/nxagent; do |
261 |
for j in CHANGELOG COPYING LICENSE; do |
262 |
[ -f $i/$j ] && install -Dpm 0644 $i/$j \ |
263 |
%{buildroot}%{_defaultdocdir}/%{name}-%{version}/${i##*/}/$j |
264 |
done |
265 |
done |
266 |
# save a bit of space |
267 |
%{_sbindir}/hardlink -cv %{buildroot}%{_defaultdocdir}/%{name}-%{version} |
268 |
|
269 |
install -m0644 %{SOURCE11} %{buildroot}%{_defaultdocdir}/%{name}-%{version} |
270 |
|
271 |
%files -n nxproxy |
272 |
%{_bindir}/nxproxy |
273 |
%{_pkglibdir}/nxproxy |
274 |
|
275 |
%files -n nxagent |
276 |
%{_bindir}/nxagent |
277 |
%{_pkglibdir}/nxagent |
278 |
|
279 |
%files -n %{develname} |
280 |
%{_pkglibdir}/*.so |
281 |
|
282 |
#---------- nxcomp |
283 |
%files -n %{lib_name_nxcomp} |
284 |
%{_pkglibdir}/libXcomp.so.* |
285 |
|
286 |
#---------- nx-x11 |
287 |
%files -n %{lib_name_nxx11} |
288 |
%{_pkglibdir}/libX11*.so.* |
289 |
%{_pkglibdir}/libXcomposite*.so.* |
290 |
%{_pkglibdir}/libXdamage*.so.* |
291 |
%{_pkglibdir}/libXext*.so.* |
292 |
%{_pkglibdir}/libXfixes*.so.* |
293 |
%{_pkglibdir}/libXpm*.so.* |
294 |
%{_pkglibdir}/libXrandr*.so.* |
295 |
%{_pkglibdir}/libXrender*.so.* |
296 |
%{_pkglibdir}/libXtst*.so.* |
297 |
|
298 |
#-------- lib xcompext |
299 |
%files -n %{lib_name_xcompext} |
300 |
%{_pkglibdir}/libXcompext.so.* |
301 |
%{_pkglibdir}/libXcompshad.so.* |
302 |
|
303 |
#-------- nxssh |
304 |
%files -n nxssh |
305 |
%{_bindir}/nxssh |
306 |
%{_pkglibdir}/nxssh |
307 |
|
308 |
#-------- docs |
309 |
%files -n nx-doc |
310 |
%{_datadir}/doc/nx-3.5.0 |
311 |
|
312 |
|