summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
Diffstat (limited to 'pcr')
-rw-r--r--pcr/libreboot-util/PKGBUILD31
1 files changed, 28 insertions, 3 deletions
diff --git a/pcr/libreboot-util/PKGBUILD b/pcr/libreboot-util/PKGBUILD
index 2933ade93..26e83566f 100644
--- a/pcr/libreboot-util/PKGBUILD
+++ b/pcr/libreboot-util/PKGBUILD
@@ -5,7 +5,7 @@ pkgname=libreboot-util
pkgrel=1
_upstream_ver=20211122
pkgver=4.15.libreboot${_upstream_ver}
-pkgdesc="Misc. Coreboot/Libreboot utils (bucts, ECtool, nvramtool, superiotool)"
+pkgdesc="Misc. Coreboot/Libreboot utils (bucts, cbfstool, ECtool, nvramtool, superiotool)"
url="https://libreboot.org/"
arch=('x86_64' 'i686' 'armv7h')
license=('GPL2')
@@ -21,14 +21,23 @@ validpgpkeys=('98CCDDF8E56047F475C044BDD0C62464FA8B4856') # Leah Rowe
prepare() {
# Replace sbin with bin in the makefiles.
+ cd "$srcdir/libreboot-${_upstream_ver}_src/coreboot/default/util/bucts/"
+ sed 's#/sbin#/bin#' -i Makefile
+ cd "$srcdir/libreboot-${_upstream_ver}_src/coreboot/default/util/cbfstool/"
+ sed 's#/sbin#/bin#' -i Makefile
cd "$srcdir/libreboot-${_upstream_ver}_src/coreboot/default/util/ectool/"
sed 's#/sbin#/bin#' -i Makefile
cd "$srcdir/libreboot-${_upstream_ver}_src/coreboot/default/util/nvramtool/"
sed 's#/sbin#/bin#' -i Makefile
cd "$srcdir/libreboot-${_upstream_ver}_src/coreboot/default/util/superiotool/"
sed 's#/sbin#/bin#' -i Makefile
- cd "$srcdir/libreboot-${_upstream_ver}_src/coreboot/default/util/bucts/"
- sed 's#/sbin#/bin#' -i Makefile
+
+ # Remove uneeded files.
+ cd "$srcdir/libreboot-${_upstream_ver}_src/coreboot/default/"
+ rm -rf tests
+ rm -rf spd
+ rm -rf payloads
+ rm -rf Documentation
}
build() {
@@ -37,6 +46,12 @@ build() {
# Build bucts.
make -C bucts
+ # Build cbfstool.
+ case "${CARCH}" in
+ armv7h) make -C cbfstool;;
+ #i686) make -C cbfstool;; #broken
+ x86_64) make -C cbfstool;;
+ esac
# Build ECtool.
make -C ectool
# Build nvramtool.
@@ -49,12 +64,22 @@ package() {
# Get to the directory.
cd "$srcdir/libreboot-${_upstream_ver}_src/coreboot/default/util/"
+ # Set directories up.
+ install -d "${pkgdir}"/usr/bin "${pkgdir}"/usr/share/man/man8
# Install bucts.
install -Dm755 bucts/bucts "${pkgdir}"/usr/bin/bucts
+ # Install cbfstool.
+ case "${CARCH}" in
+ armv7h) install -Dm755 cbfstool/cbfstool "${pkgdir}"/usr/bin/cbfstool;;
+ #i686) install -Dm755 cbfstool/cbfstool "${pkgdir}"/usr/bin/cbfstool;; #broken
+ x86_64) install -Dm755 cbfstool/cbfstool "${pkgdir}"/usr/bin/cbfstool;;
+ esac
# Install ECtool.
install -Dm755 ectool/ectool "${pkgdir}"/usr/bin/ectool
# Install nvramtool.
install -Dm755 nvramtool/nvramtool "${pkgdir}"/usr/bin/nvramtool
+ install -m644 nvramtool/cli/nvramtool.8 "${pkgdir}"/usr/share/man/man8
# Install superiotool.
install -Dm755 superiotool/superiotool "${pkgdir}"/usr/bin/superiotool
+ install -m644 superiotool/superiotool.8 "${pkgdir}"/usr/share/man/man8
}