summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2022-04-29 14:46:54 -0400
committerbill-auger <mr.j.spam.me@gmail.com>2022-04-29 14:48:13 -0400
commitb07b6f3066a875a866cce53955ec34362267f7cd (patch)
treec968caee539c8092b8f97b4321aef1578d9ab511 /pcr
parentc0781a1c6fced218135893e4835a2e0cd6749cc3 (diff)
downloadabslibre-b07b6f3066a875a866cce53955ec34362267f7cd.tar.gz
abslibre-b07b6f3066a875a866cce53955ec34362267f7cd.tar.bz2
abslibre-b07b6f3066a875a866cce53955ec34362267f7cd.zip
[libretools-util]: add 'cbfstool'
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
}