util/coreboot-configurator: Add RPM spec file

Add RPM spec to allow building RPMs, for both coreboot-configurator
and nvramtool, for Fedora.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I80a77d0f2246409c06e22abb229d63c4611a9fb5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65346
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Sean Rhodes 2022-06-23 11:38:58 +01:00 committed by Paul Fagerburg
parent ed0c7f53eb
commit 914f50552f
2 changed files with 96 additions and 0 deletions

View File

@ -0,0 +1,69 @@
Summary: A simple GUI to change settings in coreboot's CBFS, via the nvramtool utility.
Name: coreboot-configurator
Version: 8
Release: 1%{?dist}
License: GPLv2
URL: https://github.com/StarLabsLtd/coreboot-configurator
Source: %{url}/archive/%{version}.tar.gz
BuildRequires: make
BuildRequires: cmake
BuildRequires: git
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: meson
BuildRequires: inkscape
BuildRequires: yaml-cpp-devel
%if 0%{?rhel}
BuildRequires: ninja-build
BuildRequires: qt5-qtbase-devel
BuildRequires: qt5-qtsvg-devel
BuildRequires: qt5-qtbase-gui
%endif
%if 0%{?fedora}
BuildRequires: ninja-build
BuildRequires: qt5-qtbase-devel
BuildRequires: qt5-qtsvg-devel
BuildRequires: qt5-qtbase-gui
%endif
%if 0%{?suse_version}
BuildRequires: ninja
BuildRequires: libqt5-qtbase-devel
BuildRequires: libqt5-qtsvg-devel
BuildRequires: libqt5-qtbase
%endif
%if 0%{?rhel}
Requires: qt5-qtbase-gui
%endif
%if 0%{?fedora}
Requires: qt5-qtbase-gui
%endif
%if 0%{?suse_version}
Requires: libqt5-qtbase
%endif
%description
A simple GUI to change settings in coreboot's CBFS, via the nvramtool utility.
%prep
%setup -q
%build
meson build
%install
%ninja_install -C build
%files
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%{_datadir}/polkit-1/actions/org.coreboot.nvramtool.policy
%{_datadir}/polkit-1/actions/org.coreboot.reboot.policy
%doc README.md
%license LICENSE
%changelog
* Sat May 14 2022 Adam Thiede <adamj@mailbox.org> 8
- initial spec files

View File

@ -0,0 +1,27 @@
Summary: coreboot nvramtool
Name: nvramtool
Version: 4.16
Release: 1%{?dist}
License: GPLv2
URL: https://review.coreboot.org/coreboot
Source: https://coreboot.org/releases/coreboot-%{version}.tar.xz
BuildRequires: make
BuildRequires: gcc
%description
nvramtool manipulates nvram from userspace.
%prep
tar -C %{_builddir} -xf %{_sourcedir}/coreboot-%{version}.tar.xz
mv %{_builddir}/coreboot-%{version} %{_builddir}/nvramtool-%{version}
cd %{_builddir}/nvramtool-%{version}/util/nvramtool
DESTDIR=%{buildroot} PREFIX=%{_prefix} make
install -Dm755 nvramtool %{buildroot}/%{_sbindir}/nvramtool
%files
%{_sbindir}/%{name}
%changelog
* Sat May 14 2022 Adam Thiede <adamj@mailbox.org> 4.16
- initial spec file