]> git.pld-linux.org Git - SPECS.git/blob - nx.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / nx.spec
1 # TODO
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!
4 %define         agent_minor     9
5 %define         auth_minor      1
6 %define         comp_minor      2
7 %define         compext_minor   1
8 %define         compshad_minor  2
9 %define         proxy_minor     1
10 %define         X11_minor       2
11 %define         scripts_minor   1
12 %define         ssh_minor       2
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
15 Name:           nx
16 Version:        3.5.0
17 Release:        8
18 License:        GPL
19 Group:          Libraries
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
43 Patch4:         openssl.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
54 BuildRequires:  which
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
65 Provides:       nx-X11
66 Obsoletes:      nxcomp
67 Obsoletes:      nxcompext
68 Obsoletes:      nxcompshad
69 Obsoletes:      nxproxy
70 Obsoletes:      nxssh
71 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
72
73 # don't satisfy xorg deps for the rest of the distro
74 %define         _noautoprovfiles        %{_libdir}/NX
75
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
78
79 # so check gets really confused in here
80 %define         no_install_post_check_so        1
81
82 %description
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.
86
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.
90
91 %prep
92 %setup -q -c -a1 -a2 -a3 -a4 -a5 -a6 -a7 -a8
93 %patch0 -p1
94 %patch1 -p1
95 %patch2 -p0
96 %patch3 -p1
97 %patch4 -p1
98 %patch5 -p1
99
100 cat <<EOF >>nx-X11/config/cf/host.def
101 #define UseRpath YES
102 #define UsrLibDir %{_libdir}/NX
103 EOF
104
105 %build
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"
110
111 perl -pi -e"s|CXXFLAGS=.-O.*|CXXFLAGS=\"$CXXFLAGS\"|" */configure
112
113 cd nxssh
114 %{__aclocal}
115 %{__autoconf}
116 cd ..
117
118 # build Compression Library and Proxy
119 for i in nxcomp nxcompshad nxproxy; do
120         cd $i
121         %configure
122         %{__make}
123         cd ..
124 done
125
126 # build X11 Support Libraries and Agents
127
128 %{__make} -C nx-X11 World
129
130 # build Extended Compression Library
131 cd nxcompext
132 %configure
133 %{__make}
134 cd ..
135
136 # build
137 cd nxssh
138 %configure \
139         PERL=%{__perl} \
140         --with-dns \
141         --with-pam \
142         --with-mantype=man \
143         --with-md5-passwords \
144         --with-ipaddr-display \
145         %{?with_libedit:--with-libedit} \
146         --with-4in6 \
147         --disable-suid-ssh \
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 \
155         --enable-utmpx \
156         --enable-wtmpx
157
158 echo '#define LOGIN_PROGRAM                "/bin/login"' >>config.h
159 %{__make} nxssh
160
161 %install
162 rm -rf $RPM_BUILD_ROOT
163 install -d $RPM_BUILD_ROOT{%{_libdir}/{pkgconfig,NX},%{_bindir}}
164
165 # X11
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
176
177 install nx-X11/programs/Xserver/nxagent $RPM_BUILD_ROOT%{_bindir}
178 install nx-X11/programs/nxauth/nxauth $RPM_BUILD_ROOT%{_bindir}
179
180 # Compression Libraries
181 install nxcomp/libXcomp.so.* \
182         nxcompext/libXcompext.so.* \
183         nxcompshad/libXcompshad.so.* \
184                 $RPM_BUILD_ROOT%{_libdir}/NX
185
186 # proxy
187 install nxproxy/nxproxy $RPM_BUILD_ROOT%{_bindir}
188
189 # nxssh
190 install nxssh/nxssh $RPM_BUILD_ROOT%{_bindir}
191
192 %clean
193 rm -rf $RPM_BUILD_ROOT
194
195 %files
196 %defattr(644,root,root,755)
197 %doc nxscripts/*
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
202 %dir %{_libdir}/NX
203 %attr(755,root,root) %{_libdir}/NX/*.so.*
This page took 0.460315 seconds and 3 git commands to generate.