From d1223bca255c7f62056045672991cca956bd80a3 Mon Sep 17 00:00:00 2001 From: dkwo Date: Sun, 17 Sep 2023 09:43:11 -0400 Subject: [PATCH] sbctl: run checks, update to 0.13 --- srcpkgs/sbctl/template | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/srcpkgs/sbctl/template b/srcpkgs/sbctl/template index 5d181cd62da0d7..ca0dc3edf6da2f 100644 --- a/srcpkgs/sbctl/template +++ b/srcpkgs/sbctl/template @@ -1,26 +1,33 @@ # Template file for 'sbctl' pkgname=sbctl -version=0.10 -revision=3 +version=0.13 +revision=1 build_style=go +build_helper=qemu go_import_path="github.com/foxboron/sbctl" +go_package="${go_import_path}/cmd/sbctl" +# see https://github.com/Foxboron/sbctl/issues/57 +# go_ldflags="-X ${go_import_path}.DatabasePath=/etc/secureboot" hostmakedepends="asciidoc" short_desc="Secure Boot key manager" maintainer="Érico Nogueira " license="MIT" homepage="https://github.com/Foxboron/sbctl" distfiles="https://github.com/Foxboron/sbctl/archive/${version}.tar.gz" -checksum=22c394e1ae3f80eafe85e331ca4499d2df28bebcc4421c0af89241b897a17774 +checksum=3d5b396985eabea4960377dbf81dbd891db473af20284edc7db1b4e891368c02 +export GOFLAGS="-buildmode=pie" -do_build() { - make -} - -do_install() { - make install PREFIX=/usr DESTDIR=$DESTDIR - # TODO: install completions, sbctl tries to run lsblk when generating them +do_check() { + go test -v ./... } post_install() { + make man + vman docs/sbctl.8 vlicense LICENSE + SBCTL="${DESTDIR}/usr/bin/sbctl" + for shell in bash fish zsh; do + vtargetrun ${SBCTL} completion ${shell} > sbctl.${shell} + vcompletion sbctl.${shell} ${shell} + done }