File vte2.spec of Package vte2

#
# spec file for package vte2
#
# Copyright (c) 2016 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 9
%define _apiver 0.0
# empty:
#%%define _binver
%define _gtkver 2.0

Name:           vte2
%define _name   vte
Url:            http://www.gnome.org
Version:        0.28.2
Release:        0
Summary:        Terminal Emulator Library
License:        GPL-2.0+
Group:          Development/Libraries/GNOME
Source:         http://download.gnome.org/sources/vte/0.28/%{_name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM vte-keymaps.patch bnc#754350 bgo#663779 dimstar@opensuse.org -- keymap: Treat ALT as META. Patch from tracker, comment 38. So far the likeliest candidate to be merged.
Patch0:         vte-keymaps.patch
# PATCH-FIX-UPSTREAM vte-CVE-2012-2738.patch bnc#772761 bgo#676090 CVE-2012-2738 vuntz@opensuse.org -- malicious escape sequences can cause denial of service, taken from git
Patch1:         vte-CVE-2012-2738.patch
BuildRequires:  fdupes
BuildRequires:  gobject-introspection-devel
BuildRequires:  gtk2-devel
BuildRequires:  intltool
BuildRequires:  libgladeui-1_0-devel
BuildRequires:  ncurses-devel
BuildRequires:  python-devel
BuildRequires:  python-gtk-devel
BuildRequires:  translation-update-upstream
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
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 gnome-pty-helper
Summary:        Terminal Emulator Library -- Helper for utmp/wtmp/lastlog logging
Group:          System/Libraries
PreReq:         permissions

%description -n gnome-pty-helper
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 helper for utmp/wtmp/lastlog logging.

%package tools
Summary:        Terminal Emulator Library -- Tools
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 python-vte
Summary:        Terminal Emulator Library -- Python Bindings
Group:          System/Libraries
Requires:       libvte9 = %{version}
%py_requires

%description -n python-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 the python bindings for VTE.

%package -n glade3-catalog-vte
Summary:        Terminal Emulator Library -- Catalog for Glade
Group:          Development/Tools/GUI Builders
Requires:       glade3
Requires:       libvte%{_sover} = %{version}
Supplements:    packageand(glade3:%{name}-devel)

%description -n glade3-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
Group:          Development/Libraries/GNOME
Requires:       libvte%{_sover} = %{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
translation-update-upstream

%build
%configure --with-pic\
        --with-gtk=%{_gtkver}\
        --disable-static \
        --enable-glade-catalogue \
        --disable-introspection
%__make %{?jobs:-j%jobs} V=1

%install
%makeinstall
%if 0%{?suse_version} <= 1120
%{__rm} %{buildroot}%{_datadir}/locale/en@shaw/LC_MESSAGES/*
%endif
# Files that will come with gtk3 build
rm %{buildroot}%{_libexecdir}/gnome-pty-helper
%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.*
%dir %{_datadir}/vte
%dir %{_datadir}/vte/termcap-%{_apiver}
%{_datadir}/vte/termcap-%{_apiver}/xterm

%files tools
%defattr(-,root,root)
%{_bindir}/vte%{?_binver}

%files -n python-vte
%defattr(-,root,root)
%doc python/vte-demo.py
%{py_sitedir}/gtk-2.0/*.so

%files -n glade3-catalog-vte
%defattr(-,root,root)
%{_datadir}/glade3/catalogs/vte.xml
%{_datadir}/glade3/pixmaps/hicolor/*/*/widget-vte-terminal.png

%files devel
%defattr(-,root,root)
%{_libdir}/pkgconfig/*.pc
%{_libdir}/*.so
%{_includedir}/vte-%{_apiver}/
%dir %{_datadir}/pygtk
%dir %{_datadir}/pygtk/2.0
%dir %{_datadir}/pygtk/2.0/defs
%{_datadir}/pygtk/2.0/defs/vte.defs
# 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}/

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

%clean
rm -rf $RPM_BUILD_ROOT

%changelog
openSUSE Build Service is sponsored by