File efiboots.spec of Package efiboots
#
# spec file for package efiboots
#
# Copyright (c) 2021 SUSE LLC
#
# 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/
#
%if ( 0%{?sle_version} >= 150500 && 0%{?is_opensuse} || 0%{?suse_version} > 1600 )
%define pythons python311
%else
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
%define skip_python36 1
%define skip_pytbon37 1
%define skip_python38 1
%define skip_python39 1
%endif
Name: efiboots
Version: 1.0
Release: 0
Summary: GUI for efibootmgr
License: GPL-3.0-only
Group: System/GUI/Other
URL: https://github.com/Elinvention/efibootmgr-gui
Source: %{name}-%{version}.tar.gz
BuildRequires: %{python_module devel >= 3.10}
BuildRequires: %{python_module gobject-devel}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module pytest}
BuildRequires: pkgconfig
BuildRequires: update-desktop-files
#BuildRequires: pkgconfig(gtk4) >= 4.8
BuildRequires: pkgconfig(pygobject-3.0)
Requires: efibootmgr >= 17
Requires: typelib(Gtk) >= 4
Requires: xdg-utils
BuildArch: noarch
Provides: efibootmgr-gui = %{version}
Obsoletes: efibootmgr-gui < %{version}
%description
Manage EFI boot loader entries with this simple GUI
%prep
%autosetup -p1
%build
# Remove export CFLAGS=... for noarch packages (unneeded)
export CFLAGS="%{optflags}"
%python_build
%install
%python_install
sed -i -e 's|Exec=efiboots|Exec=xdg-su -c efiboots|g' %{buildroot}%{_datadir}/applications/%{name}.desktop
%check
%pytest
%files
%license LICENSE
%doc README.md
%{python_sitelib}/*
%{_bindir}/efiboots
%{_datadir}/applications/*.desktop
%changelog