Name:           gnome-terminal
Version:        3.46.7
Release:        1
Summary:        A terminal emulator for GNOME
License:        GPL-3.0-or-later and GFDL-1.3-only and LGPL-2.0-or-later
URL:            http://www.gnome.org/
Source0:        https://gitlab.gnome.org/GNOME/%{name}/-/archive/%{version}/%{name}-%{version}.tar.bz2
Source1:        org.gnome.Terminal.gschema.override

Patch0000:      gnome-terminal-cntr-ntfy-autottl-ts.patch

BuildRequires:  glib2-devel gtk3-devel gsettings-desktop-schemas-devel
BuildRequires:  desktop-file-utils gettext-devel autoconf automake
BuildRequires:  systemd libtool itstool dconf-devel libuuid-devel nautilus-devel
BuildRequires:  gnome-shell pcre2-devel  vala-devel vte291-devel gcc-c++
BuildRequires:  docbook-style-xsl libxslt yelp-tools meson libappstream-glib

Requires:       dbus dbus-x11 glib2%{?_isa} gsettings-desktop-schemas gtk3%{?_isa} vte291%{?_isa}

Provides:       %{name}-nautilus nautilus-open-terminal
Obsoletes:      %{name}-nautilus nautilus-open-terminal

%description
This package provides a terminal emulator application for GNOME.

%prep
%autosetup -n %{name}-%{version} -p1

%build
%meson \
    -Ddebug=true \
    -Ddocs=true \
    -Dnautilus_extension=true \
    -Dsearch_provider=true

%meson_build

%install
%meson_install

install -p -m 644 %{SOURCE1} %{buildroot}%{_datadir}/glib-2.0/schemas

%find_lang %{name} --with-gnome

%check
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/org.gnome.Terminal*.metainfo.xml
desktop-file-validate %{buildroot}%{_datadir}/applications/org.gnome.Terminal.desktop
%meson_test

%pre

%preun

%post

%postun

%files -f %{name}.lang
%license COPYING COPYING.GFDL
%doc README.md
%{_bindir}/gnome-terminal
%{_datadir}/applications/org.gnome.Terminal.desktop
%{_datadir}/applications/org.gnome.Terminal.Preferences.desktop
%{_libexecdir}/gnome-terminal-preferences
%{_libexecdir}/gnome-terminal-server
%{_datadir}/dbus-1/services/org.gnome.Terminal.service
%{_datadir}/glib-2.0/schemas/org.gnome.Terminal.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.Terminal.gschema.override
%{_datadir}/gnome-shell
%{_datadir}/icons/hicolor/scalable/apps/org.gnome.Terminal.svg
%{_datadir}/icons/hicolor/symbolic/apps/org.gnome.Terminal-symbolic.svg
%{_datadir}/icons/hicolor/scalable/apps/org.gnome.Terminal.Preferences.svg
%{_datadir}/icons/hicolor/symbolic/apps/org.gnome.Terminal.Preferences-symbolic.svg
%dir %{_datadir}/xdg-terminals
%{_datadir}/xdg-terminals/org.gnome.Terminal.desktop
%dir %{_libdir}/gnome-terminal
%{_libdir}/gnome-terminal/gschemas.compiled
%{_mandir}/man1/gnome-terminal.1*
%{_metainfodir}/org.gnome.Terminal.metainfo.xml
%{_userunitdir}/gnome-terminal-server.service
%{_libdir}/nautilus/extensions-4/libterminal-nautilus.so
%{_metainfodir}/org.gnome.Terminal.Nautilus.metainfo.xml

%changelog
* Tue Feb 7 2023 liyanan <liyanan32@h-partners.com> - 3.46.7-1
- Update to 3.46.7

* Wed Jul 27 2022 yaoxin <yaoxin30@h-partners.com> - 3.38.3-2
- license compliance rectification

* Mon Jun 21 2021 weijin deng <weijin.deng@turbolinux.com.cn> - 3.38.3-1
- Upgrade to 3.38.3

* Tue Dec 22 2020 huanghaitao <huanghaitao8@huawei.com> - 3.37.90-1
- Update to 3.37.90

* Mon Nov 18 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.30.1-3
- Package init
