[packages/gtk2-vnc] - last gtk+2 based gtk-vnc (0.9.0) as gtk2-vnc-* packages
qboosh
qboosh at pld-linux.org
Wed Jun 24 18:36:31 CEST 2020
commit da2e8560f7dca0a934361548289bb072413404ff
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Wed Jun 24 18:37:33 2020 +0200
- last gtk+2 based gtk-vnc (0.9.0) as gtk2-vnc-* packages
gtk-vnc-pc.patch => gtk2-vnc-pc.patch | 0
gtk-vnc.spec => gtk2-vnc.spec | 175 ++++++++--------------------------
2 files changed, 42 insertions(+), 133 deletions(-)
---
diff --git a/gtk-vnc.spec b/gtk2-vnc.spec
similarity index 64%
rename from gtk-vnc.spec
rename to gtk2-vnc.spec
index 43b0332..52f26b1 100644
--- a/gtk-vnc.spec
+++ b/gtk2-vnc.spec
@@ -1,16 +1,21 @@
#
# Conditional build:
%bcond_without static_libs # static libraries
-%bcond_without vala # Vala API
+%bcond_with vala # Vala API (for libgvnc)
+%bcond_with libgvnc # package libgvnc %{version} and tools
+%if %{without libgvnc}
+%undefine with_vala
+%endif
Summary: A GTK+ widget for VNC clients (GTK+ 2.x version)
Summary(pl.UTF-8): Widget GTK+ dla klientów VNC (wersja dla GTK+ 2.x)
-Name: gtk-vnc
+Name: gtk2-vnc
+# 0.9.x is the last version with GTK+ 2.x support
Version: 0.9.0
-Release: 1
+Release: 2
License: LGPL v2+
Group: X11/Libraries
-Source0: http://ftp.gnome.org/pub/GNOME/sources/gtk-vnc/0.9/%{name}-%{version}.tar.xz
+Source0: http://ftp.gnome.org/pub/GNOME/sources/gtk-vnc/0.9/gtk-vnc-%{version}.tar.xz
# Source0-md5: 1eed0aa5d71f849eae9fa00ecf28e247
Patch0: %{name}-pc.patch
URL: https://wiki.gnome.org/Projects/gtk-vnc
@@ -25,13 +30,11 @@ BuildRequires: gnome-common
BuildRequires: gnutls-devel >= 3.1.18
BuildRequires: gobject-introspection-devel >= 0.9.4
BuildRequires: gtk+2-devel >= 2:2.18.0
-BuildRequires: gtk+3-devel >= 3.0.0
BuildRequires: intltool >= 0.40.0
BuildRequires: libgcrypt-devel >= 1.5.0
BuildRequires: libgpg-error-devel
BuildRequires: libtool >= 2:2.2.6
BuildRequires: libview-devel >= 0.6.0
-BuildRequires: perl-Text-CSV
BuildRequires: perl-tools-pod
BuildRequires: pkgconfig
BuildRequires: pulseaudio-devel
@@ -43,7 +46,9 @@ BuildRequires: xz
BuildRequires: zlib-devel
Requires: cairo >= 1.2.0
Requires: gtk+2 >= 2:2.18.0
-Requires: libgvnc = %{version}-%{release}
+Requires: libgvnc >= 0.9.0
+Provides: gtk-vnc = %{version}-%{release}
+Obsoletes: gtk-vnc < %{version}-%{release}
Obsoletes: python-gtk-vnc < 0.8.0
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -68,8 +73,10 @@ Group: X11/Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: cairo-devel >= 1.2.0
Requires: gtk+2-devel >= 2:2.18.0
-Requires: libgvnc-devel = %{version}-%{release}
+Requires: libgvnc-devel >= 0.9.0
Requires: xorg-lib-libX11-devel
+Provides: gtk-vnc-devel = %{version}-%{release}
+Obsoletes: gtk-vnc-devel < %{version}-%{release}
%description devel
Header files for gtk-vnc library (GTK+ 2.x version).
@@ -82,7 +89,8 @@ Summary: Static gtk-vnc library (GTK+ 2.x version)
Summary(pl.UTF-8): Statyczna biblioteka gtk-vnc (wersja dla GTK+ 2.x)
Group: X11/Development/Libraries
Requires: %{name}-devel = %{version}-%{release}
-Requires: libgvnc-static = %{version}-%{release}
+Provides: gtk-vnc-static = %{version}-%{release}
+Obsoletes: gtk-vnc-static < %{version}-%{release}
%description static
Static gtk-vnc library (GTK+ 2.x version).
@@ -90,74 +98,6 @@ Static gtk-vnc library (GTK+ 2.x version).
%description static -l pl.UTF-8
Statyczna biblioteka gtk-vnc (wersja dla GTK+ 2.x).
-%package -n gtk3-vnc
-Summary: A GTK+ widget for VNC clients (GTK+ 3.x version)
-Summary(pl.UTF-8): Widget GTK+ dla klientów VNC
-Group: X11/Libraries
-Requires: cairo >= 1.2.0
-Requires: gtk+3 >= 3.0.0
-Requires: libgvnc = %{version}-%{release}
-
-%description -n gtk3-vnc
-gtk-vnc is a VNC viewer widget for GTK+. It is built using coroutines
-allowing it to be completely asynchronous while remaining single
-threaded.
-
-This package contains version for GTK+ 3.x.
-
-%description -n gtk3-vnc -l pl.UTF-8
-gtk-vnc to widget przeglądarki VNC dla GTK+. Jest skonstruowany z
-użyciem korutyn, dzięki czemu mogą być w pełni asynchroniczne
-pozostając jednowątkowymi.
-
-Ten pakiet zawiera wersję dla GTK+ 3.x.
-
-%package -n gtk3-vnc-devel
-Summary: Header files for gtk-vnc library (GTK+ 3.x version)
-Summary(pl.UTF-8): Pliki nagłówkowe biblioteki gtk-vnc (wersja dla GTK+ 3.x)
-Group: X11/Development/Libraries
-Requires: cairo-devel >= 1.2.0
-Requires: gtk+3-devel >= 3.0.0
-Requires: gtk3-vnc = %{version}-%{release}
-Requires: libgcrypt-devel >= 1.5.0
-Requires: libgvnc-devel = %{version}-%{release}
-Requires: xorg-lib-libX11-devel
-
-%description -n gtk3-vnc-devel
-Header files for gtk-vnc library (GTK+ 3.x version).
-
-%description -n gtk3-vnc-devel -l pl.UTF-8
-Pliki nagłówkowe biblioteki gtk-vnc (wersja dla GTK+ 3.x).
-
-%package -n gtk3-vnc-static
-Summary: Static gtk-vnc library (GTK+ 3.x version)
-Summary(pl.UTF-8): Statyczna biblioteka gtk-vnc (wersja dla GTK+ 3.x)
-Group: X11/Development/Libraries
-Requires: gtk3-vnc-devel = %{version}-%{release}
-Requires: libgvnc-static = %{version}-%{release}
-
-%description -n gtk3-vnc-static
-Static gtk-vnc library (GTK+ 3.x version).
-
-%description -n gtk3-vnc-static -l pl.UTF-8
-Statyczna biblioteka gtk-vnc (wersja dla GTK+ 3.x).
-
-%package -n vala-gtk3-vnc
-Summary: Vala API for gtk-vnc library (GTK+ 3.x version)
-Summary(pl.UTF-8): API języka Vala dla biblioteki gtk-vnc (wersja dla GTK+3)
-Group: Development/Languages
-Requires: gtk3-vnc-devel = %{version}-%{release}
-Requires: vala-libgvnc = %{version}-%{release}
-%if "%{_rpmversion}" >= "4.6"
-BuildArch: noarch
-%endif
-
-%description -n vala-gtk3-vnc
-Vala API for gtk-vnc library (GTK+ 3.x version).
-
-%description -n vala-gtk3-vnc -l pl.UTF-8
-API języka Vala dla biblioteki gtk-vnc (wersja dla GTK+3).
-
%package -n libgvnc
Summary: A library for VNC clients
Summary(pl.UTF-8): Biblioteka dla klientów VNC
@@ -219,20 +159,20 @@ Vala API for libgvnc library.
%description -n vala-libgvnc -l pl.UTF-8
API języka Vala dla biblioteki libgvnc.
-%package tools
+%package -n gtk-vnc-tools
Summary: Command line tools for VNC
Summary(pl.UTF-8): Narzędzia linii poleceń dla VNC
Group: Applications/Networking
Requires: libgvnc = %{version}-%{release}
-%description tools
+%description -n gtk-vnc-tools
Command line utilities for interacting with VNC servers.
-%description tools -l pl.UTF-8
+%description -n gtk-vnc-tools -l pl.UTF-8
Narzędzia linii poleceń do interakcji z serwerami VNC.
%prep
-%setup -q
+%setup -q -n gtk-vnc-%{version}
%patch0 -p1
%{__sed} -i -e '1s,/usr/bin/python$,%{__python},' examples/gvncviewer.py
@@ -243,27 +183,15 @@ Narzędzia linii poleceń do interakcji z serwerami VNC.
%{__autoconf}
%{__autoheader}
%{__automake}
-# force enums regeneration
-touch src/vncconnection.h src/vncdisplay.h
-mkdir gtk{2,3}
+mkdir gtk2
cd gtk2
../%configure \
--with-gtk=2.0 \
--with-libview \
%{?with_static_libs:--enable-static} \
--disable-plugin \
- --disable-silent-rules
-%{__make}
-
-cd ../gtk3
-# libview not ported to gtk+3
-../%configure \
- --with-gtk=3.0 \
- --without-libview \
- %{?with_static_libs:--enable-static} \
- --disable-plugin \
--disable-silent-rules \
- %{!?with_vala:--disable-vala}
+ %{?with_vala:--enable-vala}
%{__make}
%install
@@ -272,11 +200,7 @@ rm -rf $RPM_BUILD_ROOT
%{__make} -C gtk2 -j1 install \
DESTDIR=$RPM_BUILD_ROOT
-%{__make} -C gtk3 -j1 install \
- DESTDIR=$RPM_BUILD_ROOT
-
install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
-
cp -p examples/gvncviewer.{c,js,pl,py} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
%{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
@@ -284,7 +208,19 @@ cp -p examples/gvncviewer.{c,js,pl,py} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{
# not supported by glibc (as of 2.25)
%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/guc
-%find_lang %{name}
+%find_lang gtk-vnc
+
+%if %{without libgvnc}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libgvnc*-1.0.*
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/girepository-1.0/GVnc*.typelib
+%{__rm} $RPM_BUILD_ROOT%{_datadir}/gir-1.0/GVnc*.gir
+%{__rm} $RPM_BUILD_ROOT%{_localedir}/*/LC_MESSAGES/gtk-vnc.mo
+%{__rm} -r $RPM_BUILD_ROOT%{_includedir}/gvnc*-1.0
+%{__rm} $RPM_BUILD_ROOT%{_pkgconfigdir}/gvnc*-1.0.pc
+# -tools
+%{__rm} $RPM_BUILD_ROOT%{_bindir}/gvnccapture
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/gvnccapture.1*
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
@@ -292,9 +228,6 @@ rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
-%post -n gtk3-vnc -p /sbin/ldconfig
-%postun -n gtk3-vnc -p /sbin/ldconfig
-
%post -n libgvnc -p /sbin/ldconfig
%postun -n libgvnc -p /sbin/ldconfig
@@ -307,9 +240,9 @@ rm -rf $RPM_BUILD_ROOT
%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libgtk-vnc-1.0.so
-%{_includedir}/%{name}-1.0
+%{_includedir}/gtk-vnc-1.0
%{_datadir}/gir-1.0/GtkVnc-1.0.gir
-%{_pkgconfigdir}/%{name}-1.0.pc
+%{_pkgconfigdir}/gtk-vnc-1.0.pc
%{_examplesdir}/%{name}-%{version}
%if %{with static_libs}
@@ -318,33 +251,8 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/libgtk-vnc-1.0.a
%endif
-%files -n gtk3-vnc
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libgtk-vnc-2.0.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libgtk-vnc-2.0.so.0
-%{_libdir}/girepository-1.0/GtkVnc-2.0.typelib
-
-%files -n gtk3-vnc-devel
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libgtk-vnc-2.0.so
-%{_includedir}/gtk-vnc-2.0
-%{_pkgconfigdir}/gtk-vnc-2.0.pc
-%{_datadir}/gir-1.0/GtkVnc-2.0.gir
-
-%if %{with static_libs}
-%files -n gtk3-vnc-static
-%defattr(644,root,root,755)
-%{_libdir}/libgtk-vnc-2.0.a
-%endif
-
-%if %{with vala}
-%files -n vala-gtk3-vnc
-%defattr(644,root,root,755)
-%{_datadir}/vala/vapi/gtk-vnc-2.0.deps
-%{_datadir}/vala/vapi/gtk-vnc-2.0.vapi
-%endif
-
-%files -n libgvnc -f %{name}.lang
+%if %{with libgvnc}
+%files -n libgvnc -f gtk-vnc.lang
%defattr(644,root,root,755)
%doc AUTHORS ChangeLog NEWS README
%attr(755,root,root) %{_libdir}/libgvnc-1.0.so.*.*.*
@@ -381,7 +289,8 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/vala/vapi/gvncpulse-1.0.vapi
%endif
-%files tools
+%files -n gtk-vnc-tools
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/gvnccapture
%{_mandir}/man1/gvnccapture.1*
+%endif
diff --git a/gtk-vnc-pc.patch b/gtk2-vnc-pc.patch
similarity index 100%
rename from gtk-vnc-pc.patch
rename to gtk2-vnc-pc.patch
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/gtk2-vnc.git/commitdiff/da2e8560f7dca0a934361548289bb072413404ff
More information about the pld-cvs-commit
mailing list