File tilix.spec of Package tilix

#
# spec file for package tilix
#
# 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/
#

#!BuildIgnore: gcc-PIE
%define gtkd_version 3.6.6
Name:           tilix
Version:        1.7.1
Release:        0
Summary:        A tiling terminal emulator based on GTK+ 3
License:        MPL-2.0
Group:          System/X11/Terminals
Url:            https://github.com/gnunn1/tilix
Source0:        https://github.com/gnunn1/tilix/archive/%{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/GtkD-%{gtkd_version}.tar.gz
BuildRequires:  dmd
BuildRequires:  dub
BuildRequires:  gettext
BuildRequires:  gsettings-desktop-schemas-devel
BuildRequires:  hicolor-icon-theme
BuildRequires:  phobos-devel
BuildRequires:  phobos-devel-static
BuildRequires:  po4a
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  vte-devel
BuildRequires:  xdg-utils
Recommends:     %{name}-lang
Requires:       dconf
Requires:       gtk3
Requires:       vte

%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

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

%install
./install.sh %{buildroot}%{_prefix}

rm %{buildroot}%{_datadir}/glib-2.0/schemas/gschemas.compiled

%find_lang %{name} %{?no_lang_C}

%post
%desktop_database_post
%icon_theme_cache_post
%glib2_gsettings_schema_post

%postun
%desktop_database_postun
%icon_theme_cache_postun
%glib2_gsettings_schema_postun

%files
%defattr(-,root,root)
%doc LICENSE README.md
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/%{name}/schemes/
%{_datadir}/%{name}/resources/
%{_datadir}/%{name}/scripts/
%{_mandir}/man1/*
%dir %{_mandir}/fr
%dir %{_mandir}/fr/man1/
%{_mandir}/fr/man1/*
%dir %{_mandir}/de
%dir %{_mandir}/de/man1/
%{_mandir}/de/man1/*
%dir %{_mandir}/es
%dir %{_mandir}/es/man1/
%{_mandir}/es/man1/*
%dir %{_mandir}/it
%dir %{_mandir}/it/man1/
%{_mandir}/it/man1/*
%dir %{_mandir}/pt_BR
%dir %{_mandir}/pt_BR/man1/
%{_mandir}/pt_BR/man1/*
%dir %{_mandir}/ru
%dir %{_mandir}/ru/man1/
%{_mandir}/ru/man1/*
%dir %{_mandir}/uk
%dir %{_mandir}/uk/man1/
%{_mandir}/uk/man1/*
%dir %{_mandir}/cs
%dir %{_mandir}/cs/man1/
%{_mandir}/cs/man1/*
%dir %{_mandir}/sr
%dir %{_mandir}/sr/man1/
%{_mandir}/sr/man1/*
%{_datadir}/metainfo/
%{_datadir}/metainfo/com.gexperts.Tilix.appdata.xml
%{_datadir}/icons/hicolor/16x16/apps/com.gexperts.Tilix.png
%{_datadir}/icons/hicolor/22x22/apps/com.gexperts.Tilix.png
%{_datadir}/icons/hicolor/24x24/apps/com.gexperts.Tilix.png
%{_datadir}/icons/hicolor/256x256/apps/com.gexperts.Tilix.png
%{_datadir}/icons/hicolor/32x32/apps/com.gexperts.Tilix.png
%{_datadir}/icons/hicolor/48x48/apps/com.gexperts.Tilix.png
%{_datadir}/icons/hicolor/512x512/apps/com.gexperts.Tilix.png
%{_datadir}/icons/hicolor/scalable/apps/com.gexperts.Tilix-symbolic.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
%defattr(-,root,root)
%{_datadir}/nautilus-python/
%{_datadir}/nautilus-python/extensions/
%{_datadir}/nautilus-python/extensions/open-tilix.py

%files lang -f %{name}.lang
%defattr(-,root,root)

%changelog
openSUSE Build Service is sponsored by