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.50.2
Release:        0
Summary:        Terminal Emulator Library
License:        LGPL-2.0 AND GPL-2.0+
Group:          Development/Libraries/GNOME

# Switched to sourceservice, as upstream have a tendency to not release tarballs on time.
#Source:         http://download.gnome.org/sources/vte/0.45/%%{_name}-%%{version}.tar.xz
Source:         %{_name}-%{version}.tar.xz
# PATCH-FIX-UPSTREAM vte-fix-memory-leaks.patch bgo#790539 zaitor@opensuse.org -- Fix memory leaks
Patch0:         vte-fix-memory-leaks.patch
# PATCH-FIX-UPSTREAM vte-widget-reset-might-need-to-start-blinking-the-cursor.patch bgo#790536  zaitor@opensuse.org -- widget: Reset might need to start blinking the cursor
Patch1:         vte-widget-reset-might-need-to-start-blinking-the-cursor.patch

BuildRequires:  fdupes
BuildRequires:  gcc-c++
#
# Needed due to using sourceservice and we need to bootstrap tarball
BuildRequires:  gnome-common
#
BuildRequires:  gobject-introspection-devel
BuildRequires:  gperf
BuildRequires:  gtk-doc
BuildRequires:  intltool
BuildRequires:  pkgconfig
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
BuildRequires:  pkgconfig(libpcre2-8)
BuildRequires:  pkgconfig(pango) >= 1.22.0
BuildRequires:  pkgconfig(vapigen) >= 0.24
BuildRequires:  pkgconfig(zlib)
BuildRequires:  translation-update-upstream

%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}

%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:        Introspection bindings for the VTE terminal emulator library
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:        Tools from the VTE terminal emulator package
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:        Glade catalog for the VTE terminal emulator library
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:        Development files for the VTE terminal emulator library
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
%autosetup -n %{_name}-%{version} -p1
translation-update-upstream

%build
NOCONFIGURE=1 ./autogen.sh
%configure \
	--with-gtk=%{_gtkver}\
	--disable-static \
	--enable-glade-catalogue \
	--enable-introspection \
	--enable-gtk-doc \
	%{nil}
%make_build

%install
%make_install

%find_lang vte-%{_apiver}
find %{buildroot}%{_libdir} -name '*.la' -type f -delete -print
%fdupes %{buildroot}/%{_prefix}

%post -n libvte%{_sover} -p /sbin/ldconfig
%postun -n libvte%{_sover} -p /sbin/ldconfig

%files -n libvte%{_sover}
%doc COPYING
%{_libdir}/*.so.*
%config %{_sysconfdir}/profile.d/vte.sh

%files -n typelib-1_0-Vte-%{?_binver}
%{_libdir}/girepository-1.0/Vte-%{_apiver}.typelib

%files tools
%{_bindir}/vte-%{?_binver}

%files -n glade-catalog-vte
%{_datadir}/glade/catalogs/vte-%{?_binver}.xml
%{_datadir}/glade/pixmaps/hicolor/*/*/widget-vte-terminal.png

%files devel
%doc AUTHORS README NEWS
%{_libdir}/pkgconfig/*.pc
%{_libdir}/*.so
%{_includedir}/vte-%{_apiver}/
%{_datadir}/gir-1.0/*.gir
%{_datadir}/gtk-doc/html/vte-%{_apiver}/
%dir %{_datadir}/vala/vapi
%{_datadir}/vala/vapi/vte-2.91.vapi

%files lang -f vte-%{_apiver}.lang

%changelog
openSUSE Build Service is sponsored by