diff --git a/gtk-vnc.spec b/gtk-vnc.spec index 9f17855..af64ef3 100644 --- a/gtk-vnc.spec +++ b/gtk-vnc.spec @@ -1,6 +1,6 @@ # -*- rpm-spec -*- -# This spec file assumes you are building for Fedora 20 or newer, +# This spec file assumes you are building for Fedora 26 or newer, # or for RHEL 6 or newer. It may need some tweaks for other distros. %global with_gir 0 @@ -18,28 +18,30 @@ %global with_vala 1 %endif -%if 0%{?fedora} >= 25 +%global with_python 1 +%if 0%{?fedora} || 0%{?rhel} >= 8 +%global with_python 0 +%endif + +%if 0%{?fedora} || 0%{?rhel} >= 8 %global tls_priority "@LIBVIRT,SYSTEM" %else - %if 0%{?fedora} >= 21 - %global tls_priority "@SYSTEM" - %else - %global tls_priority "NORMAL" - %endif + %global tls_priority "NORMAL" %endif Summary: A GTK2 widget for VNC clients Name: gtk-vnc -Version: 0.7.1 -Release: 7%{?dist}%{?extra_release} +Version: 0.7.2 +Release: 1%{?dist}%{?extra_release} License: LGPLv2+ -Group: Development/Libraries Source: http://ftp.gnome.org/pub/GNOME/sources/%{name}/0.5/%{name}-%{version}.tar.xz URL: https://wiki.gnome.org/Projects/gtk-vnc Requires: gvnc = %{version}-%{release} BuildRequires: gtk2-devel >= 2.14 -BuildRequires: pygtk2-devel python2-devel zlib-devel -BuildRequires: gnutls-devel libgcrypt-devel cyrus-sasl-devel intltool +%if %{with_python} +BuildRequires: pygtk2-devel python2-devel +%endif +BuildRequires: gnutls-devel libgcrypt-devel cyrus-sasl-devel zlib-devel intltool %if %{with_gir} BuildRequires: gobject-introspection-devel %endif @@ -58,7 +60,6 @@ allowing it to be completely asynchronous while remaining single threaded. %package devel Summary: Development files to build GTK2 applications with gtk-vnc -Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: pkgconfig Requires: gtk2-devel @@ -69,6 +70,7 @@ allowing it to be completely asynchronous while remaining single threaded. Libraries, includes, etc. to compile with the gtk-vnc library +%if %{with_python} %package -n python2-gtk-vnc %{?python_provide:%python_provide python2-gtk-vnc} # Remove before F30 @@ -76,14 +78,14 @@ Provides: %{name}-python = %{version}-%{release} Provides: %{name}-python%{?_isa} = %{version}-%{release} Obsoletes: %{name}-python < %{version}-%{release} Summary: Python bindings for the gtk-vnc library -Group: Development/Libraries -Requires: %{name} = %{version} +Requires: %{name} = %{version}-%{release} %description -n python2-gtk-vnc gtk-vnc is a VNC viewer widget for GTK2. It is built using coroutines allowing it to be completely asynchronous while remaining single threaded. A module allowing use of the GTK-VNC widget from python +%endif %package -n gvnc Summary: A GObject for VNC connections @@ -95,7 +97,6 @@ with the raw protocol itself. %package -n gvnc-devel Summary: Libraries, includes, etc. to compile with the gvnc library -Group: Development/Libraries Requires: gvnc = %{version}-%{release} Requires: pkgconfig @@ -108,6 +109,7 @@ Libraries, includes, etc. to compile with the gvnc library %package -n gvncpulse Summary: A Pulse Audio bridge for VNC connections +Requires: gvnc = %{version}-%{release} %description -n gvncpulse gvncpulse is a bridge to the Pulse Audio system for VNC. @@ -116,7 +118,6 @@ system %package -n gvncpulse-devel Summary: Libraries, includes, etc. to compile with the gvncpulse library -Group: Development/Libraries Requires: gvncpulse = %{version}-%{release} Requires: pkgconfig @@ -129,7 +130,7 @@ Libraries, includes, etc. to compile with the gvnc library %package -n gvnc-tools Summary: Command line VNC tools -Group: Applications/Internet +Requires: gvnc = %{version}-%{release} %description -n gvnc-tools Provides useful command line utilities for interacting with @@ -139,7 +140,6 @@ screenshots of a VNC desktop %if %{with_gtk3} %package -n gtk-vnc2 Summary: A GTK3 widget for VNC clients -Group: Applications/Internet Requires: gvnc = %{version}-%{release} %description -n gtk-vnc2 @@ -148,7 +148,6 @@ 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 -Group: Development/Libraries Requires: gtk-vnc2 = %{version}-%{release} Requires: pkgconfig Requires: gtk3-devel @@ -173,8 +172,14 @@ cp -a gtk-vnc-%{version} gtk-vnc2-%{version} %define gir_arg --enable-introspection=no %endif +%if %{with_python} +%define py_arg --with-python +%else +%define py_arg --without-python +%endif + cd gtk-vnc-%{version} -%configure --with-gtk=2.0 %{gir_arg} \ +%configure --with-gtk=2.0 %{gir_arg} %{py_arg} \ --with-tls-priority=%{tls_priority} %__make %{?_smp_mflags} V=1 chmod -x examples/*.pl examples/*.js examples/*.py @@ -182,7 +187,8 @@ cd .. %if %{with_gtk3} cd gtk-vnc2-%{version} -%configure --with-gtk=3.0 %{gir_arg} \ + +%configure --with-gtk=3.0 %{gir_arg} %{py_arg} \ --with-tls-priority=%{tls_priority} %__make %{?_smp_mflags} V=1 chmod -x examples/*.pl examples/*.js examples/*.py @@ -244,10 +250,12 @@ rm -f %{buildroot}%{_libdir}/python*/site-packages/*.la %{_datadir}/gir-1.0/GtkVnc-1.0.gir %endif +%if %{with_python} %files -n python2-gtk-vnc %defattr(-, root, root) %doc gtk-vnc-%{version}/examples/gvncviewer-bindings.py %{_libdir}/python*/site-packages/gtkvnc.so +%endif %files -n gvnc -f %{name}.lang %defattr(-, root, root) @@ -332,6 +340,10 @@ rm -f %{buildroot}%{_libdir}/python*/site-packages/*.la %endif %changelog +* Fri Mar 23 2018 Daniel P. Berrangé <berrange@redhat.com> - 0.7.2-1 +- Rebase to 0.7.2 release +- Disable python2 sub-RPM + * Wed Feb 14 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.7.1-7 - Update Python 2 dependency declarations to new packaging standards (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) diff --git a/sources b/sources index 69a8d04..9d9122e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gtk-vnc-0.7.1.tar.xz) = 5d62f60e1c9fe70f93a9d21c529145459f0d59d588631597d533ecba94864271d1095599db9447ac4843814be61af7a7c947f69e5a9cd26db7e811f2c4e95f0c +SHA512 (gtk-vnc-0.7.2.tar.xz) = b95b1da6ff512c466feaa6efc831e9c36c5a77390b518c647c60fddda9dd850eea8658174682ae135b95bfca7bf2b4e85a5e5ac9adb43e3ddd7aa690288655ce