#
# Conditional build:
-%bcond_without gtk2 # GTK+ 2 interfaces
-%bcond_without gtk3 # GTK+ 3 interfaces
%bcond_without smartcard # Smartcard support
%bcond_without usbredir # USB redirection
-%bcond_without static_libs # static libraries
-#
+
Summary: A GTK+ client and libraries for SPICE remote desktop servers
Summary(pl.UTF-8): Klient i biblioteki GTK+ dla serwerów zdalnych pulpitów SPICE
Name: spice-gtk
-Version: 0.29
-Release: 1
+Version: 0.39
+Release: 2
License: LGPL v2.1+
Group: X11/Applications
-Source0: http://www.spice-space.org/download/gtk/%{name}-%{version}.tar.bz2
-# Source0-md5: f84b8fd6a5e926dce07ec5ebb5f0caf3
-Patch0: %{name}-builddir.patch
-Patch1: %{name}-am.patch
-URL: http://spice-space.org/
-BuildRequires: autoconf >= 2.57
-BuildRequires: automake >= 1.6
+Source0: https://www.spice-space.org/download/gtk/%{name}-%{version}.tar.xz
+# Source0-md5: 5bdc76d5105d2b4b4472063fe04ef033
+URL: https://spice-space.org/
BuildRequires: cairo-devel >= 1.2.0
-BuildRequires: celt051-devel >= 0.5.1.1
BuildRequires: cyrus-sasl-devel >= 2.0
BuildRequires: gcc >= 5:3.0
-BuildRequires: gettext-tools >= 0.17
+BuildRequires: gettext-tools >= 0.19.8
+BuildRequires: glib2-devel >= 1:2.52
BuildRequires: gobject-introspection-devel >= 0.9.4
-BuildRequires: glib2-devel >= 1:2.44
+BuildRequires: gstreamer-devel >= 1.10
+BuildRequires: gstreamer-plugins-base-devel >= 1.10
+BuildRequires: gtk+3-devel >= 3.22
BuildRequires: gtk-doc >= 1.14
-%{?with_gtk2:BuildRequires: gtk+2-devel >= 2:2.18.0}
-%{?with_gtk3:BuildRequires: gtk+3-devel >= 3.0}
-BuildRequires: intltool >= 0.40.0
-%{?with_smartcard:BuildRequires: libcacard-devel >= 0.1.2}
+BuildRequires: json-glib-devel
+%{?with_smartcard:BuildRequires: libcacard-devel >= 2.5.1}
+BuildRequires: libepoxy-devel
BuildRequires: libjpeg-devel
BuildRequires: libsoup-devel >= 2.50
BuildRequires: libstdc++-devel
-BuildRequires: libtool >= 2:2.0
+BuildRequires: libva-x11-devel
BuildRequires: lz4-devel
-BuildRequires: openssl-devel
+BuildRequires: meson >= 0.53
+BuildRequires: ninja >= 1.5
+BuildRequires: openssl-devel >= 1.0.0
BuildRequires: opus-devel >= 0.9.14
-BuildRequires: perl-Text-CSV
-BuildRequires: perl-base >= 1:5.8.1
BuildRequires: phodav-devel >= 2.0
BuildRequires: pixman-devel >= 0.17.7
BuildRequires: pkgconfig
-BuildRequires: pulseaudio-devel
+BuildRequires: rpmbuild(macros) >= 1.736
BuildRequires: sed >= 4.0
-BuildRequires: spice-protocol >= 0.10.1
+BuildRequires: spice-protocol >= 0.14.3
+BuildRequires: tar >= 1:1.22
+BuildRequires: vala >= 0.14
+BuildRequires: wayland-devel >= 1.17.0
+BuildRequires: wayland-protocols >= 1.17
BuildRequires: xorg-lib-libX11-devel
BuildRequires: xorg-lib-libXrandr-devel
+BuildRequires: xz
BuildRequires: zlib-devel
-%if %{with gtk2}
-BuildRequires: gtk+2-devel >= 2:2.18.0
-BuildRequires: python-devel >= 2.0
-BuildRequires: python-pygtk-devel >= 2:2.0.0
-%endif
%if %{with usbredir}
BuildRequires: acl-devel
-BuildRequires: libusb-devel >= 1.0.16
-BuildRequires: polkit-devel >= 0.96
-BuildRequires: usbredir-devel >= 0.5.2
+BuildRequires: libusb-devel >= 1.0.21
+BuildRequires: polkit-devel >= 0.101
+BuildRequires: usbredir-devel >= 0.7.1
%endif
-%{?with_smartcard:Requires: libcacard >= 0.1.2}
+Requires: gtk+3 >= 3.22
Requires: spice-glib = %{version}-%{release}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Summary(pl.UTF-8): Pliki nagłówkowe biblioteki klienckiej SPICE GTK 3.0
Group: X11/Development/Libraries
Requires: %{name} = %{version}-%{release}
+Requires: gtk+3-devel >= 3.22
+Requires: libepoxy-devel
+Requires: libva-x11-devel
Requires: spice-glib-devel = %{version}-%{release}
-Requires: gtk+3-devel >= 3.0
+Requires: xorg-lib-libX11-devel
%description devel
Header files for SPICE GTK 3.0 client library.
%description static -l pl.UTF-8
Statyczna biblioteka kliencka SPICE GTK 3.0.
+%package -n vala-spice-gtk
+Summary: Vala API for SPICE GTK client library
+Summary(pl.UTF-8): Interfejs języka Vala do biblioteki klienckiej SPICE GTK
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
+Requires: vala >= 2:0.14
+Requires: vala-spice-glib = %{version}-%{release}
+BuildArch: noarch
+
+%description -n vala-spice-gtk
+Vala API for SPICE GTK client library.
+
+%description -n vala-spice-gtk -l pl.UTF-8
+Interfejs języka Vala do biblioteki klienckiej SPICE GTK.
+
%package apidocs
Summary: SPICE GTK API documentation
Summary(pl.UTF-8): Dokumentacja API bibliotek SPICE GTK
Group: Documentation
+BuildArch: noarch
%description apidocs
API documentation for SPICE GTK libraries.
Summary: SPICE Client GLib library
Summary(pl.UTF-8): Biblioteka kliencka SPICE GLib
Group: Libraries
-Requires: celt051 >= 0.5.1.1
-Requires: glib2 >= 1:2.44
-%{?with_smartcard:Requires: libcacard >= 0.1.2}
+Requires: cairo >= 1.2.0
+Requires: glib2 >= 1:2.52
+%{?with_smartcard:Requires: libcacard >= 2.5.1}
Requires: libsoup >= 2.50
+Requires: gstreamer >= 1.10
+Requires: gstreamer-plugins-base >= 1.10
+Requires: openssl >= 1.0.0
Requires: opus >= 0.9.14
Requires: pixman >= 0.17.7
%if %{with usbredir}
-Requires: libusb >= 1.0.16
-Requires: usbredir >= 0.5.2
+Requires: libusb >= 1.0.21
+Requires: usbredir >= 0.7.1
%endif
%description -n spice-glib
Summary: Header files for SPICE Client GLib library
Summary(pl.UTF-8): Pliki nagłówkowe biblioteki klienckiej SPICE GLib
Group: Development/Libraries
-Requires: celt051-devel >= 0.5.1.1
+Requires: cairo-devel >= 1.2.0
Requires: cyrus-sasl-devel >= 2.0
-Requires: glib2-devel >= 1:2.44
-%{?with_smartcard:Requires: libcacard-devel >= 0.1.2}
+Requires: glib2-devel >= 1:2.52
+Requires: gobject-introspection-devel >= 0.9.4
+Requires: gstreamer-devel >= 1.10
+Requires: gstreamer-plugins-base-devel >= 1.10
+Requires: json-glib-devel
+%{?with_smartcard:Requires: libcacard-devel >= 2.5.1}
+Requires: libcap-ng-devel
Requires: libjpeg-devel
-Requires: openssl-devel
+Requires: libsoup-devel >= 2.50
+Requires: lz4-devel
+Requires: openssl-devel >= 1.0.0
+Requires: opus-devel >= 0.9.14
+Requires: phodav-devel >= 2.0
Requires: pixman-devel >= 0.17.7
-Requires: pulseaudio-devel
Requires: spice-glib = %{version}-%{release}
-Requires: spice-protocol >= 0.10.1
+Requires: spice-protocol >= 0.14.3
+Requires: zlib-devel
%if %{with usbredir}
-Requires: libusb-devel >= 1.0.16
-Requires: usbredir-devel >= 0.5.2
+Requires: libusb-devel >= 1.0.21
+Requires: usbredir-devel >= 0.7.1
%endif
%description -n spice-glib-devel
%description -n spice-glib-static -l pl.UTF-8
Statyczna biblioteka kliencka SPICE GLib.
+%package -n vala-spice-glib
+Summary: Vala API for SPICE GLib client library
+Summary(pl.UTF-8): Interfejs języka Vala do biblioteki klienckiej SPICE GLib
+Group: Development/Libraries
+Requires: spice-glib-devel = %{version}-%{release}
+Requires: vala >= 2:0.14
+# versions 0.35 through 0.38-1 were actually spice-client-glib + spice-client-gtk vapis
+Obsoletes: vala-spice-protocol < 0.38-2
+BuildArch: noarch
+
+%description -n vala-spice-glib
+Vala API for SPICE GLib client library.
+
+%description -n vala-spice-glib -l pl.UTF-8
+Interfejs języka Vala do biblioteki klienckiej SPICE GLib.
+
%package -n spice-glib-usb
Summary: USB redirection ACL helper for SPICE Client GLib library
Summary(pl.UTF-8): Program pomocniczy ACL do przekierowań USB dla biblioteki klienckiej SPICE GLib
Group: Applications/System
+Requires: polkit >= 0.101
Requires: spice-glib = %{version}-%{release}
-Requires: polkit >= 0.96
%description -n spice-glib-usb
USB redirection ACL helper for SPICE Client GLib library.
Program pomocniczy ACL do przekierowań USB dla biblioteki klienckiej
SPICE GLib.
-%package -n spice-gtk2
-Summary: SPICE Client GTK 2.0 library
-Summary(pl.UTF-8): Biblioteka kliencka SPICE GTK 2.0
-Group: X11/Libraries
-Requires: gtk+2 >= 2:2.18.0
-Requires: spice-glib = %{version}-%{release}
-
-%description -n spice-gtk2
-SPICE Client GTK 2.0 library.
-
-%description -n spice-gtk2 -l pl.UTF-8
-Biblioteka kliencka SPICE GTK 2.0.
-
-%package -n spice-gtk2-devel
-Summary: Header files for SPICE Client GTK 2.0 library
-Summary(pl.UTF-8): Pliki nagłówkowe biblioteki klienckiej SPICE GTK 2.0
-Group: X11/Development/Libraries
-Requires: gtk+2-devel >= 2:2.18.0
-Requires: spice-glib-devel = %{version}-%{release}
-
-%description -n spice-gtk2-devel
-Header files for SPICE Client GTK 2.0 library.
-
-%description -n spice-gtk2-devel -l pl.UTF-8
-Pliki nagłówkowe biblioteki klienckiej SPICE GTK 2.0.
-
-%package -n spice-gtk2-static
-Summary: SPICE Client GTK 2.0 static library
-Summary(pl.UTF-8): Statyczna biblioteka kliencka SPICE GTK 2.0
-Group: X11/Development/Libraries
-Requires: spice-gtk2-devel = %{version}-%{release}
-
-%description -n spice-gtk2-static
-SPICE Client GTK 2.0 static library.
-
-%description -n spice-gtk2-static -l pl.UTF-8
-Statyczna biblioteka kliencka SPICE GTK 2.0.
-
-%package -n python-spice-gtk
-Summary: Python interface to SPICE client GTK library
-Summary(pl.UTF-8): Pythonowy interfejs do biblioteki klienckiej SPICE GTK
-Group: Libraries/Python
-Requires: spice-gtk2 = %{version}-%{release}
-
-%description -n python-spice-gtk
-Python interface to SPICE client GTK library.
-
-%description -n python-spice-gtk -l pl.UTF-8
-Pythonowy interfejs do biblioteki klienckiej SPICE GTK.
-
-%package -n vala-spice-protocol
-Summary: Vala API for SPICE client library
-Summary(pl.UTF-8): Interfejs języka Vala do biblioteki klienckiej SPICE
-Group: Development/Libraries
-Requires: spice-protocol >= 0.10.1
-Requires: vala >= 2:0.14
-
-%description -n vala-spice-protocol
-Vala API for SPICE client library.
-
-%description -n vala-spice-protocol -l pl.UTF-8
-Interfejs języka Vala do biblioteki klienckiej SPICE.
-
%prep
%setup -q
-%patch0 -p1
-%patch1 -p1
-
-mkdir %{?with_gtk2:gtk2} %{?with_gtk3:gtk3}
%build
-%{__intltoolize}
-%{__libtoolize}
-%{__aclocal} -I m4
-%{__autoconf}
-%{__autoheader}
-%{__automake}
-
-%if %{with gtk2}
-cd gtk2
-../%configure \
- --enable-lz4 \
- --disable-silent-rules \
- %{!?with_smartcard:--disable-smartcard} \
- %{?with_static_libs:--enable-static} \
- %{!?with_usbredir:--disable-usbredir} \
- --with-gtk=2.0 \
- --with-html-dir=%{_gtkdocdir}
-%{__make}
-cd ..
-%endif
+%meson build \
+ -Dgtk_doc=enabled \
+ -Dlz4=enabled \
+ -Dpolkit=%{?with_usbredir:enabled}%{!?with_smartcard:usbredir} \
+ -Dsmartcard=%{?with_smartcard:enabled}%{!?with_smartcard:disabled} \
+ -Dusbredir=%{?with_usbredir:enabled}%{!?with_smartcard:usbredir} \
+ -Dusb-ids-path=/lib/hwdata/usb.ids \
+ -Dvapi=enabled
-%if %{with gtk3}
-cd gtk3
-../%configure \
- --enable-gtk-doc \
- --enable-lz4 \
- --disable-silent-rules \
- %{!?with_smartcard:--disable-smartcard} \
- %{?with_static_libs:--enable-static} \
- %{!?with_usbredir:--disable-usbredir} \
- --with-gtk=3.0 \
- --with-html-dir=%{_gtkdocdir}
-%{__make}
-%endif
+%ninja_build -C build
%install
rm -rf $RPM_BUILD_ROOT
-# gtk2 first, so executables will use gtk3 libs
-%if %{with gtk2}
-%{__make} -C gtk2 install -j1 \
- DESTDIR=$RPM_BUILD_ROOT
-%endif
-
-%if %{with gtk3}
-%{__make} -C gtk3 install -j1 \
- DESTDIR=$RPM_BUILD_ROOT
-%endif
-
-%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/SpiceClientGtk.la
-%if %{with static_libs}
-%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/SpiceClientGtk.a
-%endif
-# obsoleted by pkg-config
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
+%ninja_install -C build
%find_lang %{name}
%post -n spice-glib -p /sbin/ldconfig
%postun -n spice-glib -p /sbin/ldconfig
-%post -n spice-gtk2 -p /sbin/ldconfig
-%postun -n spice-gtk2 -p /sbin/ldconfig
-
-%if %{with gtk3}
%files -f %{name}.lang
%defattr(644,root,root,755)
-%doc AUTHORS NEWS README THANKS TODO
+%doc AUTHORS CHANGELOG.md README.md
%attr(755,root,root) %{_bindir}/spicy
%attr(755,root,root) %{_bindir}/spicy-screenshot
%attr(755,root,root) %{_bindir}/spicy-stats
%attr(755,root,root) %{_libdir}/libspice-client-gtk-3.0.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libspice-client-gtk-3.0.so.4
+%attr(755,root,root) %ghost %{_libdir}/libspice-client-gtk-3.0.so.5
%{_libdir}/girepository-1.0/SpiceClientGtk-3.0.typelib
%{_mandir}/man1/spice-client.1*
%{_pkgconfigdir}/spice-client-gtk-3.0.pc
%{_datadir}/gir-1.0/SpiceClientGtk-3.0.gir
-%if %{with static_libs}
%files static
%defattr(644,root,root,755)
%{_libdir}/libspice-client-gtk-3.0.a
-%endif
+
+%files -n vala-spice-gtk
+%defattr(644,root,root,755)
+%{_datadir}/vala/vapi/spice-client-gtk-3.0.deps
+%{_datadir}/vala/vapi/spice-client-gtk-3.0.vapi
%files apidocs
%defattr(644,root,root,755)
%{_gtkdocdir}/spice-gtk
-%endif
%files -n spice-glib
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libspice-client-glib-2.0.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libspice-client-glib-2.0.so.8
-%attr(755,root,root) %{_libdir}/libspice-controller.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libspice-controller.so.0
%{_libdir}/girepository-1.0/SpiceClientGLib-2.0.typelib
%files -n spice-glib-devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libspice-client-glib-2.0.so
-%attr(755,root,root) %{_libdir}/libspice-controller.so
%{_includedir}/spice-client-glib-2.0
-%{_includedir}/spice-controller
%{_pkgconfigdir}/spice-client-glib-2.0.pc
-%{_pkgconfigdir}/spice-controller.pc
%{_datadir}/gir-1.0/SpiceClientGLib-2.0.gir
-%if %{with static_libs}
%files -n spice-glib-static
%defattr(644,root,root,755)
%{_libdir}/libspice-client-glib-2.0.a
-%{_libdir}/libspice-controller.a
-%endif
+
+%files -n vala-spice-glib
+%defattr(644,root,root,755)
+%{_datadir}/vala/vapi/spice-client-glib-2.0.deps
+%{_datadir}/vala/vapi/spice-client-glib-2.0.vapi
%if %{with usbredir}
%files -n spice-glib-usb
%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/spice-client-glib-usb-acl-helper
+%attr(755,root,root) %{_libexecdir}/spice-client-glib-usb-acl-helper
%{_datadir}/polkit-1/actions/org.spice-space.lowlevelusbaccess.policy
%endif
-
-%if %{with gtk2}
-%files -n spice-gtk2
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libspice-client-gtk-2.0.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libspice-client-gtk-2.0.so.4
-%{_libdir}/girepository-1.0/SpiceClientGtk-2.0.typelib
-
-%files -n spice-gtk2-devel
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libspice-client-gtk-2.0.so
-%{_includedir}/spice-client-gtk-2.0
-%{_pkgconfigdir}/spice-client-gtk-2.0.pc
-%{_datadir}/gir-1.0/SpiceClientGtk-2.0.gir
-
-%if %{with static_libs}
-%files -n spice-gtk2-static
-%defattr(644,root,root,755)
-%{_libdir}/libspice-client-gtk-2.0.a
-%endif
-
-%files -n python-spice-gtk
-%defattr(644,root,root,755)
-%attr(755,root,root) %{py_sitedir}/SpiceClientGtk.so
-%endif
-
-%files -n vala-spice-protocol
-%defattr(644,root,root,755)
-%{_datadir}/vala/vapi/spice-protocol.vapi