From 914f50552f0332a6dce28fb0f879962679c530c1 Mon Sep 17 00:00:00 2001 From: Sean Rhodes Date: Thu, 23 Jun 2022 11:38:58 +0100 Subject: [PATCH] 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 Change-Id: I80a77d0f2246409c06e22abb229d63c4611a9fb5 Reviewed-on: https://review.coreboot.org/c/coreboot/+/65346 Reviewed-by: Matt DeVillier Tested-by: build bot (Jenkins) --- .../contrib/rpm/coreboot-configurator.spec | 69 +++++++++++++++++++ .../contrib/rpm/nvramtool.spec | 27 ++++++++ 2 files changed, 96 insertions(+) create mode 100644 util/coreboot-configurator/contrib/rpm/coreboot-configurator.spec create mode 100644 util/coreboot-configurator/contrib/rpm/nvramtool.spec diff --git a/util/coreboot-configurator/contrib/rpm/coreboot-configurator.spec b/util/coreboot-configurator/contrib/rpm/coreboot-configurator.spec new file mode 100644 index 0000000000..a38b7e8d0b --- /dev/null +++ b/util/coreboot-configurator/contrib/rpm/coreboot-configurator.spec @@ -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 8 +- initial spec files diff --git a/util/coreboot-configurator/contrib/rpm/nvramtool.spec b/util/coreboot-configurator/contrib/rpm/nvramtool.spec new file mode 100644 index 0000000000..e219b1c020 --- /dev/null +++ b/util/coreboot-configurator/contrib/rpm/nvramtool.spec @@ -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 4.16 +- initial spec file