gtk-vnc.spec.in 7.54 KB
Newer Older
1 2
# -*- rpm-spec -*-

3
# This spec file assumes you are building for Fedora 26 or newer,
4 5
# or for RHEL 6 or newer. It may need some tweaks for other distros.

6
%global with_gir 0
7
%if 0%{?fedora} || 0%{?rhel} >= 7
8
%global with_gir 1
9 10
%endif

11 12 13 14 15
%global with_gtk2 1
%if 0%{?rhel} >= 8
%global with_gtk2 0
%endif

16
%global with_gtk3 0
17
%if 0%{?fedora} || 0%{?rhel} >= 7
18
%global with_gtk3 1
19 20
%endif

21
%global with_vala 0
22
%if 0%{with_gtk3}
23
%global with_vala 1
24 25
%endif

26
%if 0%{?fedora} || 0%{?rhel} >= 8
27 28
    %global tls_priority "@LIBVIRT,SYSTEM"
%else
29
    %global tls_priority "NORMAL"
30
%endif
31

32
Summary: A GTK2 widget for VNC clients
33 34 35
Name: gtk-vnc
Version: @VERSION@
Release: 1%{?dist}%{?extra_release}
36
License: LGPLv2+
37
Source: http://ftp.gnome.org/pub/GNOME/sources/%{name}/0.5/%{name}-%{version}.tar.xz
38
URL: https://wiki.gnome.org/Projects/gtk-vnc
39
Requires: gvnc = %{version}-%{release}
40
%if %{with_gtk2}
41
BuildRequires: gtk2-devel >= 2.14
42 43 44 45 46 47 48 49 50
%endif
%if 0%{?fedora}
BuildRequires: python3
%else
%if 0%{?rhel} > 7
BuildRequires: python3-devel
%else
BuildRequires: python
%endif
51 52
%endif
BuildRequires: gnutls-devel libgcrypt-devel cyrus-sasl-devel zlib-devel intltool
53 54 55
%if %{with_gir}
BuildRequires: gobject-introspection-devel
%endif
56 57 58
%if %{with_gtk3}
BuildRequires: gtk3-devel
%endif
59 60 61
%if %{with_vala}
BuildRequires: vala-tools
%endif
62
BuildRequires: pulseaudio-libs-devel
63
BuildRequires: /usr/bin/pod2man
64 65

%description
66
gtk-vnc is a VNC viewer widget for GTK2. It is built using coroutines
67 68
allowing it to be completely asynchronous while remaining single threaded.

69
%if %{with_gtk2}
70
%package devel
71
Summary: Development files to build GTK2 applications with gtk-vnc
72
Requires: %{name} = %{version}-%{release}
73
Requires: pkgconfig
74
Requires: gtk2-devel
75 76

%description devel
77
gtk-vnc is a VNC viewer widget for GTK2. It is built using coroutines
78 79 80
allowing it to be completely asynchronous while remaining single threaded.

Libraries, includes, etc. to compile with the gtk-vnc library
81
%endif
82

83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
%package -n gvnc
Summary: A GObject for VNC connections

%description -n gvnc
gvnc is a GObject for managing a VNC connection. It provides all the
infrastructure required to build a VNC client without having to deal
with the raw protocol itself.

%package -n gvnc-devel
Summary: Libraries, includes, etc. to compile with the gvnc library
Requires: gvnc = %{version}-%{release}
Requires: pkgconfig

%description -n gvnc-devel
gvnc is a GObject for managing a VNC connection. It provides all the
infrastructure required to build a VNC client without having to deal
with the raw protocol itself.

Libraries, includes, etc. to compile with the gvnc library

103 104
%package -n gvncpulse
Summary: A Pulse Audio bridge for VNC connections
105
Requires: gvnc = %{version}-%{release}
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123

%description -n gvncpulse
gvncpulse is a bridge to the Pulse Audio system for VNC.
It allows VNC clients to play back audio on the local
system

%package -n gvncpulse-devel
Summary: Libraries, includes, etc. to compile with the gvncpulse library
Requires: gvncpulse = %{version}-%{release}
Requires: pkgconfig

%description -n gvncpulse-devel
gvncpulse is a bridge to the Pulse Audio system for VNC.
It allows VNC clients to play back audio on the local
system

Libraries, includes, etc. to compile with the gvnc library

124 125
%package -n gvnc-tools
Summary: Command line VNC tools
126
Requires: gvnc = %{version}-%{release}
127 128 129 130 131 132

%description -n gvnc-tools
Provides useful command line utilities for interacting with
VNC servers. Includes the gvnccapture program for capturing
screenshots of a VNC desktop

133 134 135
%if %{with_gtk3}
%package -n gtk-vnc2
Summary: A GTK3 widget for VNC clients
136
Requires: gvnc = %{version}-%{release}
137 138

%description -n gtk-vnc2
139
gtk-vnc is a VNC viewer widget for GTK3. It is built using coroutines
140 141 142 143
allowing it to be completely asynchronous while remaining single threaded.

%package -n gtk-vnc2-devel
Summary: Development files to build GTK3 applications with gtk-vnc
144
Requires: gtk-vnc2 = %{version}-%{release}
145 146 147 148 149 150 151 152 153 154
Requires: pkgconfig
Requires: gtk3-devel

%description -n gtk-vnc2-devel
gtk-vnc is a VNC viewer widget for GTK3. It is built using coroutines
allowing it to be completely asynchronous while remaining single threaded.

Libraries, includes, etc. to compile with the gtk-vnc library
%endif

155
%prep
156 157 158 159
%setup -q -n gtk-vnc-%{version} -c
%if %{with_gtk3}
cp -a gtk-vnc-%{version} gtk-vnc2-%{version}
%endif
160 161

%build
162 163 164 165 166 167
%if %{with_gir}
%define gir_arg --enable-introspection=yes
%else
%define gir_arg --enable-introspection=no
%endif

168
%if %{with_gtk2}
169
cd gtk-vnc-%{version}
170
%configure --with-gtk=2.0 %{gir_arg} \
171
	   --with-tls-priority=%{tls_priority}
172
%__make %{?_smp_mflags} V=1
173
chmod -x examples/*.pl examples/*.js examples/*.py
174
cd ..
175
%endif
176 177 178

%if %{with_gtk3}
cd gtk-vnc2-%{version}
179

180
%configure --with-gtk=3.0 %{gir_arg} \
181
	   --with-tls-priority=%{tls_priority}
182
%__make %{?_smp_mflags} V=1
183
chmod -x examples/*.pl examples/*.js examples/*.py
184 185
cd ..
%endif
186 187 188

%install
rm -fr %{buildroot}
189
%if %{with_gtk2}
190
cd gtk-vnc-%{version}
191
%__make install DESTDIR=%{buildroot}
192
cd ..
193
%endif
194 195 196 197 198 199 200

%if %{with_gtk3}
cd gtk-vnc2-%{version}
%__make install DESTDIR=%{buildroot}
cd ..
%endif

201 202
rm -f %{buildroot}%{_libdir}/*.a
rm -f %{buildroot}%{_libdir}/*.la
203

204
%find_lang %{name}
205

206
%post -p /sbin/ldconfig
207

208
%postun -p /sbin/ldconfig
209

210 211 212 213 214 215 216 217
%post -n gvnc -p /sbin/ldconfig

%postun -n gvnc -p /sbin/ldconfig

%post -n gvncpulse -p /sbin/ldconfig

%postun -n gvncpulse -p /sbin/ldconfig

218
%if %{with_gtk3}
219 220 221
%post -n gtk-vnc2 -p /sbin/ldconfig

%postun -n gtk-vnc2 -p /sbin/ldconfig
222
%endif
223

224
%if %{with_gtk2}
225
%files
226 227 228 229
%{_libdir}/libgtk-vnc-1.0.so.*
%if %{with_gir}
%{_libdir}/girepository-1.0/GtkVnc-1.0.typelib
%endif
230 231

%files devel
232
%doc gtk-vnc-%{version}/examples/gvncviewer.c
233
%{_libdir}/libgtk-vnc-1.0.so
234 235 236
%dir %{_includedir}/%{name}-1.0/
%{_includedir}/%{name}-1.0/*.h
%{_libdir}/pkgconfig/%{name}-1.0.pc
237 238 239
%if %{with_gir}
%{_datadir}/gir-1.0/GtkVnc-1.0.gir
%endif
240
%endif
241

242
%files -n gvnc -f %{name}.lang
243 244 245 246
%{_libdir}/libgvnc-1.0.so.*
%if %{with_gir}
%{_libdir}/girepository-1.0/GVnc-1.0.typelib
%endif
247
%if %{with_vala}
248
%{_datadir}/vala/vapi/gvnc-1.0.deps
249 250
%{_datadir}/vala/vapi/gvnc-1.0.vapi
%endif
251 252 253 254 255 256 257 258 259 260

%files -n gvnc-devel
%{_libdir}/libgvnc-1.0.so
%dir %{_includedir}/gvnc-1.0/
%{_includedir}/gvnc-1.0/*.h
%{_libdir}/pkgconfig/gvnc-1.0.pc
%if %{with_gir}
%{_datadir}/gir-1.0/GVnc-1.0.gir
%endif

261 262 263 264 265 266
%files -n gvncpulse -f %{name}.lang
%{_libdir}/libgvncpulse-1.0.so.*
%if %{with_gir}
%{_libdir}/girepository-1.0/GVncPulse-1.0.typelib
%endif
%if %{with_vala}
267
%{_datadir}/vala/vapi/gvncpulse-1.0.deps
268 269 270 271 272 273 274 275 276 277 278 279
%{_datadir}/vala/vapi/gvncpulse-1.0.vapi
%endif

%files -n gvncpulse-devel
%{_libdir}/libgvncpulse-1.0.so
%dir %{_includedir}/gvncpulse-1.0/
%{_includedir}/gvncpulse-1.0/*.h
%{_libdir}/pkgconfig/gvncpulse-1.0.pc
%if %{with_gir}
%{_datadir}/gir-1.0/GVncPulse-1.0.gir
%endif

280
%files -n gvnc-tools
281 282 283 284 285 286
%doc gtk-vnc-%{version}/AUTHORS
%doc gtk-vnc-%{version}/ChangeLog
%doc gtk-vnc-%{version}/ChangeLog-old
%doc gtk-vnc-%{version}/NEWS
%doc gtk-vnc-%{version}/README
%doc gtk-vnc-%{version}/COPYING.LIB
287 288 289
%{_bindir}/gvnccapture
%{_mandir}/man1/gvnccapture.1*

290 291 292 293 294 295
%if %{with_gtk3}
%files -n gtk-vnc2
%{_libdir}/libgtk-vnc-2.0.so.*
%if %{with_gir}
%{_libdir}/girepository-1.0/GtkVnc-2.0.typelib
%endif
296 297 298 299
%if %{with_vala}
%{_datadir}/vala/vapi/gtk-vnc-2.0.deps
%{_datadir}/vala/vapi/gtk-vnc-2.0.vapi
%endif
300 301 302 303 304

%files -n gtk-vnc2-devel
%doc gtk-vnc2-%{version}/examples/gvncviewer.c
%if %{with_gir}
%doc gtk-vnc2-%{version}/examples/gvncviewer.js
305
%doc gtk-vnc2-%{version}/examples/gvncviewer.pl
306
%doc gtk-vnc2-%{version}/examples/gvncviewer.py
307 308 309 310 311 312 313 314 315 316
%endif
%{_libdir}/libgtk-vnc-2.0.so
%dir %{_includedir}/%{name}-2.0/
%{_includedir}/%{name}-2.0/*.h
%{_libdir}/pkgconfig/%{name}-2.0.pc
%if %{with_gir}
%{_datadir}/gir-1.0/GtkVnc-2.0.gir
%endif
%endif

317
%changelog