File gnome-tweak-tool.spec of Package gnome-tweak-tool
#
# spec file for package gnome-tweak-tool
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2011 Luis Medinas, Lisbon, Portugal.
#
# 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/
#
Name: gnome-tweak-tool
Version: 3.26.4
Release: 0
Summary: A tool to customize advanced GNOME 3 options
License: GPL-3.0+
Group: System/GUI/GNOME
Url: http://live.gnome.org/GnomeTweakTool
Source0: http://download.gnome.org/sources/gnome-tweak-tool/3.26/%{name}-%{version}.tar.xz
BuildRequires: fdupes
# Needed to have typelib() Requires
BuildRequires: gobject-introspection
# Needed for icon_theme_cache_* macros and file ownership.
BuildRequires: hicolor-icon-theme
BuildRequires: meson
BuildRequires: pkgconfig
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(gsettings-desktop-schemas) >= 3.23.3
BuildRequires: pkgconfig(gtk+-3.0) >= 3.12.0
BuildRequires: pkgconfig(pygobject-3.0) >= 3.10
Requires: gnome-shell >= 3.24
Requires: python3-gobject
Requires: python3-gobject-Gdk
Requires: python3-xml
Recommends: %{name}-lang
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%if !0%{?is_opensuse}
BuildRequires: translation-update-upstream
%endif
%description
GNOME Tweak Tool is an application for changing the advanced settings
of GNOME 3.
%lang_package
%prep
%setup -q
%if !0%{?is_opensuse}
translation-update-upstream
%endif
# Tiny tweak to shut up rpmlint
sed -i 's:Pantheon:X-Pantheon:g' */gnome-tweak-tool.desktop.in
# Tweak to fix python env
sed -i "s|#!/usr/bin/env python3|#!%{_bindir}/python3|g" %{name}*
%build
%meson
%meson_build
%install
%meson_install
# FIXME Drop traces of buildroot
rm -rf %{buildroot}/%{python3_sitelib}/gtweak/__pycache__/*.pyc
rm -rf %{buildroot}/%{python3_sitelib}/gtweak/tweaks/__pycache__/*.pyc
%suse_update_desktop_file %{name} X-GNOME-PersonalSettings
%fdupes %{buildroot}%{_datadir}/gnome-tweak-tool/
%fdupes %{buildroot}%{python_sitelib}
%find_lang %{name} %{?no_lang_C}
%files
%defattr(-,root,root)
%doc AUTHORS COPYING NEWS README
%{_bindir}/%{name}
%{python3_sitelib}/gtweak/
%dir %{_datadir}/metainfo
%{_datadir}/metainfo/gnome-tweak-tool.appdata.xml
%{_datadir}/applications/%{name}.desktop
%{_datadir}/%{name}/
%{_datadir}/icons/hicolor/*/apps/%{name}*
%{_libexecdir}/gnome-tweak-tool-lid-inhibitor
%files lang -f %{name}.lang
%changelog