Hello,
Per bill-auger's request on Packaging Issue #3208 I have attached the finalized
PKGBUILD patch for libreboot-util.
In the end, it has all the discussed binaries getting compiled (ectool,
superiotool, nvramtool and bucts).

It was agreed that even though bucts is specific to x60(s) and t60(s) it would
be packaged with the rest of the binaries now and the package can be split
later if needed, as it is decently small and this will cause less clutter.
Libreboot sources are being used (instead of upstream Coreboot) as they are
assured to be FSDG-compatible, FOSS and de-blobbed.

Note that to get the package to compile, Leah Rowe's GPG key has to be imported
([email protected]).

Additionally, note that while nvramtool is already packaged in the repos (this
PKGBUILD was built off of its PKGBUILD), in the packaging request bill-auger
suggested that there is no point to add a replaces entry now as that package is
still rather new.

-- 
Kind Regards,
Wael Karram.
From f44fd2585237a243c640c0bd0ded5bad75fe2515 Mon Sep 17 00:00:00 2001
From: wael <[email protected]>
Date: Thu, 28 Apr 2022 08:48:04 +0300
Subject: [PATCH] Added PKGBUILD for libreboot-util.

---
 pcr-testing/libreboot-utils/PKGBUILD | 64 +++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)
 create mode 100644 pcr-testing/libreboot-utils/PKGBUILD

diff --git a/pcr-testing/libreboot-utils/PKGBUILD b/pcr-testing/libreboot-utils/PKGBUILD
new file mode 100644
index 000000000..8d2a88b45
--- /dev/null
+++ b/pcr-testing/libreboot-utils/PKGBUILD
@@ -0,0 +1,64 @@
+# Copyright (C) 2020 Denis 'GNUtoo' Carikli <[email protected]>
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the CC0 1.0 License.
+# Maintainers: Parabola hackers <[email protected]>
+# Contributor: wael <[email protected]>
+_libreboot_pkgver=20211122
+pkgname=libreboot-util
+pkgrel=1
+pkgver=4.15+${_libreboot_pkgver}
+pkgdesc="Misc. utils from the Coreboot project using Libreboot sources."
+url="https://libreboot.org/";
+arch=('x86_64' 'i686' 'armv7h')
+license=('GPL2')
+makedepends=('pciutils')
+
+# According to Leah Rowe (lead Libreboot developer) we should only use mirrors as the
+# official rsync server is limited in bandwidth.
+_mirror="https://mirrors.mit.edu/libreboot/";
+source=("${_mirror}/testing/${_libreboot_pkgver}/libreboot-${_libreboot_pkgver}_src.tar.xz"
+	"${_mirror}/testing/${_libreboot_pkgver}/libreboot-${_libreboot_pkgver}_src.tar.xz.sig")
+sha256sums=('e8a610e51e668c34627a6d9c048c554592fd2c2ab4dbcad83c85c06d132e5ad1'
+            '4442fc225383e1edf8f45e1aecba81868ae43db19978f15c17828389364c0434')
+sha512sums=('3eac75b33bc6d2874c3ca1ad2392db7287992cf91d37879bb3244dbd6716bc7ffa3f8d31e15d821899e91a55b6fe665d918bea4e9da92e5e98345e9bcbe1bb95'
+            '3a532ecef550ef27b723845544e91ff6b13ed6f2f1188d40fdeb7b3c416be619ff58103c3b01cd52ff88c28df6d419d2113b92d0b8ba36d1a74cfc16f70e0e63')
+validpgpkeys=('98CCDDF8E56047F475C044BDD0C62464FA8B4856') # Leah Rowe <[email protected]>
+
+prepare() {
+	# Replace sbin with bin in the makefiles.
+	cd "$srcdir/libreboot-${_libreboot_pkgver}_src/coreboot/default/util/ectool/"
+	sed 's#/sbin#/bin#' -i Makefile
+	cd "$srcdir/libreboot-${_libreboot_pkgver}_src/coreboot/default/util/nvramtool/"
+	sed 's#/sbin#/bin#' -i Makefile
+	cd "$srcdir/libreboot-${_libreboot_pkgver}_src/coreboot/default/util/superiotool/"
+	sed 's#/sbin#/bin#' -i Makefile
+	cd "$srcdir/libreboot-${_libreboot_pkgver}_src/coreboot/default/util/bucts/"
+	sed 's#/sbin#/bin#' -i Makefile
+}
+
+build() {
+	# Get to the directory.
+	cd "$srcdir/libreboot-${_libreboot_pkgver}_src/coreboot/default/util/"
+	# Build ECtool.
+	make -C ectool
+	# Build nvramtool.
+	make -C nvramtool
+	# Build superiotool.
+	make -C superiotool
+	# Build bucts.
+	make -C bucts
+}
+
+package() {
+	# Get to the directory.
+	cd "$srcdir/libreboot-${_libreboot_pkgver}_src/coreboot/default/util/"
+
+	# Install ECtool.
+	install -Dm755 ectool/ectool "${pkgdir}"/usr/bin/ectool
+	# Install nvramtool.
+	install -Dm755 nvramtool/nvramtool "${pkgdir}"/usr/bin/nvramtool
+	# Install superiotool.
+	install -Dm755 superiotool/superiotool "${pkgdir}"/usr/bin/superiotool
+	# Install bucts.
+	install -Dm755 bucts/bucts "${pkgdir}"/usr/bin/bucts
+}
-- 
2.36.0

Attachment: pgp1xKJOtwOeO.pgp
Description: OpenPGP digital signature

_______________________________________________
Dev mailing list
[email protected]
https://lists.parabola.nu/mailman/listinfo/dev

Reply via email to