File driconf.spec of Package driconf

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

Name:           driconf
Version:        0.9.1
Release:        0
Summary:        A configuration applet for the Direct Rendering Infrastructure
License:        GPL-2.0+
Group:          System/X11/Utilities
Source:         driconf-%{version}.tar.gz
Patch1:         driconf-0.9.1-setup.patch
Patch2:         driconf-0.9.1-glxinfo-unicode.patch
Patch3:         driconf-0.9.1-update-toolbar-methods.patch
Patch4:         driconf_simpleui.patch
BuildRequires:  desktop-file-utils
BuildRequires:  python-devel
Requires:       Mesa
Requires:       python-gtk
Requires:       xdriinfo
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

DRIconf is a configuration applet for the Direct Rendering Infrastructure.
It allows customizing performance and visual quality settings of OpenGL
drivers on a per-driver, per-screen and/or per-application level.

The settings are stored in system wide and per-user XML configuration files,
which are parsed by the OpenGL drivers on startup.

%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1

python build

python install --prefix=%{_prefix} --root=%{buildroot}

%find_lang driconf

desktop-file-install --vendor suse \
  --dir %{buildroot}/%{_datadir}/applications/ \
  --set-icon=%{_datadir}/driconf/driconf-icon.png --remove-category=AdvancedSettings \
  --add-category=System --add-category=Utility --add-category=DesktopSettings \
  --set-generic-name="Direct Rendering Infrastucture Configurator" \

%files -f driconf.lang