File vte.spec of Package vte
#
# spec file for package vte
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define _sover -2_91-0
%define _apiver 2.91
%define _binver 2.91
%define _gtkver 3.0
Name: vte
%define _name vte
Url: http://www.gnome.org
Version: 0.44.2
Release: 0
Summary: Terminal Emulator Library
License: LGPL-2.0 and GPL-2.0+
Group: Development/Libraries/GNOME
Source: http://download.gnome.org/sources/vte/0.44/%{_name}-%{version}.tar.xz
# PATCH-FIX-UPSTREAM vte-widget_get_preferred_height.patch bgo#760944 zaitor@opensuse.org -- widget_get_preferred_height: use vertical padding, not horizontal
Patch0: vte-widget_get_preferred_height.patch
# PATCH-FIX-UPSTREAM vte-Fix-memory-leak-in_set_colors.patch bsc#1021684 bgo#777653 vliaskovitis@suse.com -- widget: Fix a memory leak in set_colors
Patch1: vte-Fix-memory-leak-in_set_colors.patch
# PATCH-FIX-UPSTREAM vte-Fix-memory-leak-in_vte_file_stream_init.patch bsc#1021684 bgo#777653 vliaskovitis@suse.com -- widget: Fix memory leak in _vte_file_stream_init()
Patch2: vte-Fix-memory-leak-in_vte_file_stream_init.patch
# PATCH-FIX-UPSTREAM vte-Fix-recount-leak-in-child_watch_done.patch bsc#1021684 bgo#777653 vliaskovitis@suse.com -- widget: Fix refcount leak in child_watch_done
Patch3: vte-Fix-refcount-leak-in-child_watch_done.patch
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: gobject-introspection-devel
BuildRequires: intltool
BuildRequires: translation-update-upstream
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(gio-unix-2.0)
BuildRequires: pkgconfig(gladeui-2.0)
BuildRequires: pkgconfig(glib-2.0) >= 2.40.0
BuildRequires: pkgconfig(gnutls) >= 3.2.7
BuildRequires: pkgconfig(gobject-2.0)
BuildRequires: pkgconfig(gtk+-3.0) >= 3.16.0
# This got reverted just before release, please re-enable once version > 0.44.x
#BuildRequires: pkgconfig(libpcre2-8)
BuildRequires: pkgconfig(pango) >= 1.22.0
BuildRequires: pkgconfig(vapigen) >= 0.18
BuildRequires: pkgconfig(zlib)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
VTE is a terminal emulator library that provides a terminal widget for
use with GTK+ as well as handling of child process and terminal
emulation settings.
%package -n libvte%{_sover}
Summary: Terminal Emulator Library
License: LGPL-2.0
Group: System/Libraries
Recommends: %{name}-lang
# Needed to make lang package installable (and because we used to
# have a vte package earlier).
Provides: %{name} = %{version}
Obsoletes: %{name} < %{version}
# gnome-pty-helper was dropped in 0.41.90
Obsoletes: gnome-pty-helper
%description -n libvte%{_sover}
VTE is a terminal emulator library that provides a terminal widget for
use with GTK+ as well as handling of child process and terminal
emulation settings.
%package -n typelib-1_0-Vte-%{?_binver}
Summary: Terminal Emulator Library -- Introspection bindings
License: LGPL-2.0
Group: System/Libraries
%description -n typelib-1_0-Vte-%{?_binver}
VTE is a terminal emulator library that provides a terminal widget for
use with GTK+ as well as handling of child process and terminal
emulation settings.
This package provides the GObject Introspection bindings for VTE.
%package tools
Summary: Terminal Emulator Library -- Tools
License: LGPL-2.0
Group: System/Libraries
%description tools
VTE is a terminal emulator library that provides a terminal widget for
use with GTK+ as well as handling of child process and terminal
emulation settings.
This package provides tools using VTE.
%package -n glade-catalog-vte
Summary: Terminal Emulator Library -- Catalog for Glade
License: LGPL-2.0 and GPL-2.0
Group: Development/Tools/GUI Builders
Requires: glade
Requires: libvte%{_sover} = %{version}
Supplements: packageand(glade:%{name}-devel)
%description -n glade-catalog-vte
VTE is a terminal emulator library that provides a terminal widget for
use with GTK+ as well as handling of child process and terminal
emulation settings.
This package provides a catalog for Glade, to allow the use of VTE
widgets in Glade.
%package devel
Summary: Terminal Emulator Library -- Development Files
License: LGPL-2.0
Group: Development/Libraries/GNOME
Requires: libvte%{_sover} = %{version}
Requires: typelib-1_0-Vte-%{?_binver} = %{version}
Provides: vte-doc = %{version}
Obsoletes: vte-doc < %{version}
%description devel
VTE is a terminal emulator library that provides a terminal widget for
use with GTK+ as well as handling of child process and terminal
emulation settings.
This package contains the files needed for building applications using
VTE.
%lang_package
%prep
%setup -q -n %{_name}-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
translation-update-upstream
%build
export SUID_CFLAGS="-fPIE"
export SUID_LDFLAGS="-pie"
%configure --with-pic\
--with-gtk=%{_gtkver}\
--disable-static \
--enable-glade-catalogue \
--enable-introspection
%__make %{?jobs:-j%jobs} V=1
%install
%makeinstall
%if 0%{?suse_version} <= 1120
%{__rm} %{buildroot}%{_datadir}/locale/en@shaw/LC_MESSAGES/*
%endif
%find_lang vte-%{_apiver}
find %{buildroot}%{_libdir} -name '*.la' -type f -delete -print
%fdupes $RPM_BUILD_ROOT
%post -n libvte%{_sover} -p /sbin/ldconfig
%postun -n libvte%{_sover} -p /sbin/ldconfig
%files -n libvte%{_sover}
%defattr(-,root,root)
%doc AUTHORS COPYING README NEWS ChangeLog
%{_libdir}/*.so.*
%{_sysconfdir}/profile.d/vte.sh
%files -n typelib-1_0-Vte-%{?_binver}
%defattr(-,root,root)
%{_libdir}/girepository-1.0/Vte-%{_apiver}.typelib
%files tools
%defattr(-,root,root)
%{_bindir}/vte-%{?_binver}
%files -n glade-catalog-vte
%defattr(-,root,root)
%{_datadir}/glade/catalogs/vte-%{?_binver}.xml
%{_datadir}/glade/pixmaps/hicolor/*/*/widget-vte-terminal.png
%files devel
%defattr(-,root,root)
%{_libdir}/pkgconfig/*.pc
%{_libdir}/*.so
%{_includedir}/vte-%{_apiver}/
%{_datadir}/gir-1.0/*.gir
# Own these repositories to not depend on gtk-doc while building:
%dir %{_datadir}/gtk-doc
%dir %{_datadir}/gtk-doc/html
%{_datadir}/gtk-doc/html/vte-%{_apiver}/
%dir %{_datadir}/vala/vapi
%{_datadir}/vala/vapi/vte-2.91.vapi
%files lang -f vte-%{_apiver}.lang
%clean
rm -rf $RPM_BUILD_ROOT
%changelog