File grub-customizer.spec of Package grub-customizer

#
# spec file for package grub-customizer
#
# Copyright (c) 2023 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/
#


%define subversion 5.2
Name:           grub-customizer
Version:        %{subversion}.3
Release:        0
Summary:        Graphical interface to configure GRUB2/BURG settings and menu entries
License:        GPL-3.0-only
URL:            https://launchpad.net/grub-customizer
Source:         https://launchpad.net/grub-customizer/%{subversion}/%{version}/+download/grub-customizer_%{version}.tar.gz
Patch0:         grub-customizer-to-grub2.patch
BuildRequires:  cmake
BuildRequires:  fdupes
BuildRequires:  gcc12-c++
BuildRequires:  ninja
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(gthread-2.0)
BuildRequires:  pkgconfig(gtkmm-3.0)
BuildRequires:  pkgconfig(libarchive)
BuildRequires:  pkgconfig(openssl)

%description
Grub Customizer is a graphical interface to configure the GRUB2/BURG settings and menu entries.

Features:
 * move, remove or rename menu entries (they stay updatable by update-grub)
 * edit the contents of menu entries or create new ones (internally it edits the 40_custom)
 * support for GRUB2 and BURG
 * reinstallation of the bootloader to MBR
 * settings like default operating system, kernel params, background image and text colors etc.
 * changing the installed operating system by running on a live CD

%lang_package

%prep
%autosetup -p1

%build
%define __builder ninja
export CC=%{_bindir}/gcc-12
export CXX=%{_bindir}/g++-12
%cmake \
-DCMAKE_BUILD_TYPE=Release \
-DUSE_BUNDLED=OFF \
..
%cmake_build

%install
%cmake_install
%suse_update_desktop_file -r -G "Grub customizer" grub-customizer "Settings;Accessibility;"
%find_lang %{name}
%fdupes %{buildroot}%{_prefix}

%files
%license COPYING
%doc changelog README
%{_bindir}/grub-customizer
%{_libdir}/grubcfg-proxy
%{_mandir}/man1/grub-customizer.1%{?ext_man}
%{_datadir}/applications/grub-customizer.desktop
%{_datadir}/icons/hicolor/*/apps/grub-customizer.svg
%{_datadir}/polkit-1/
%{_datadir}/polkit-1/actions/
%{_datadir}/polkit-1/actions/net.launchpad.danielrichter2007.pkexec.grub-customizer.policy

%files lang -f %{name}.lang

%changelog
openSUSE Build Service is sponsored by