File tilix.spec of Package tilix
#
# spec file for package tilix
#
# Copyright (c) 2019 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 https://bugs.opensuse.org/
#
%define gtkd_version 3.8.5
# DMD is available only on x86*. Use LDC with dub otherwise.
%ifarch %{ix86} x86_64
%bcond_without dcompiler_dmd
%else
%bcond_with dcompiler_dmd
%endif
Name: tilix
Version: 1.9.0
Release: 0
Summary: A tiling terminal emulator based on GTK+ 3
License: MPL-2.0 AND LGPL-3.0-only
Group: System/X11/Terminals
URL: https://github.com/gnunn1/tilix
Source0: https://github.com/gnunn1/tilix/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
# See https://github.com/dlang/dub/issues/838 on why we need to have the full source code as dependency
Source1: https://github.com/gtkd-developers/GtkD/archive/v%{gtkd_version}.tar.gz#/GtkD-%{gtkd_version}.tar.gz
# PATCH-FIX-OPENSUSE gnome-ssh-agent.patch gh#gnunn1/tilix#870
Patch0: gnome-ssh-agent.patch
Patch1: dynamic-link.patch
Patch2: fix-ldc-link.patch
BuildRequires: dub
BuildRequires: hicolor-icon-theme
BuildRequires: pkgconfig
BuildRequires: update-desktop-files
BuildRequires: xdg-utils
BuildRequires: pkgconfig(dconf)
BuildRequires: pkgconfig(gsettings-desktop-schemas)
BuildRequires: pkgconfig(vte-2.91)
Requires: dconf
Requires: gtk3
Requires: libvted-3-0
Requires: vte
Conflicts: nautilus-extension-terminix
Conflicts: terminix
%if %{with dcompiler_dmd}
BuildRequires: dmd
BuildRequires: phobos-devel
%else
BuildRequires: ldc
BuildRequires: ldc-phobos-devel
%endif
%description
A tiling terminal emulator for Linux using GTK+ 3
%package -n nautilus-extension-tilix
Summary: Nautilus Extension to Open Tilix in Folders
Group: System/GUI/GNOME
Requires: python-nautilus
Supplements: packageand(nautilus:%{name})
%description -n nautilus-extension-tilix
This is a Nautilus extension that allows you to open tilix in
arbitrary folders.
%lang_package
%prep
%setup -q -a 1
%patch0 -p 1
%if %{with dcompiler_dmd}
%patch1 -p 1
%else
%patch2 -p 1
%endif
%build
# Register local GtkD repository in dub
dub add-local GtkD-%{gtkd_version} %{gtkd_version}
# Build tilix
dub build --build=release
# De-register local GtkD repository in dub
dub remove-local GtkD-%{gtkd_version}
# Rename license files so that we can include them in %%license
# Both x11 and icons use LGPL-3.0-only.
cp -a data/icons/LICENSE LICENSE-data-icons
cp -a source/x11/LICENSE LICENSE-source-x11
%install
./install.sh %{buildroot}%{_prefix}
rm %{buildroot}%{_datadir}/glib-2.0/schemas/gschemas.compiled
%find_lang %{name} %{?no_lang_C}
%files
%license LICENSE*
%doc README.md
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/%{name}/resources/
%{_datadir}/%{name}/resources/tilix.gresource
%{_datadir}/%{name}/schemes/
%{_datadir}/%{name}/scripts/
%attr(755, -, -) %{_datadir}/%{name}/scripts/tilix_int.sh
%{_mandir}/man1/tilix.1%{?ext_man}
%{_datadir}/metainfo/
%{_datadir}/metainfo/com.gexperts.Tilix.appdata.xml
%{_datadir}/icons/hicolor/scalable/apps/com.gexperts.Tilix-symbolic.svg
%{_datadir}/icons/hicolor/scalable/apps/com.gexperts.Tilix.svg
%{_datadir}/applications/com.gexperts.Tilix.desktop
%{_datadir}/dbus-1/services/com.gexperts.Tilix.service
%{_datadir}/glib-2.0/schemas/com.gexperts.Tilix.gschema.xml
%files -n nautilus-extension-tilix
%{_datadir}/nautilus-python/
%{_datadir}/nautilus-python/extensions/
%{_datadir}/nautilus-python/extensions/open-tilix.py
%files lang -f %{name}.lang
%changelog