From c78202f60de13712e98f64d9194762e93d02e045 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.15.4 --- srcpkgs/sbctl/template | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/srcpkgs/sbctl/template b/srcpkgs/sbctl/template index 5d181cd62da..02c0b5f479a 100644 --- a/srcpkgs/sbctl/template +++ b/srcpkgs/sbctl/template @@ -1,26 +1,35 @@ # Template file for 'sbctl' pkgname=sbctl -version=0.10 -revision=3 +version=0.15.4 +revision=1 build_style=go +build_helper=qemu go_import_path="github.com/foxboron/sbctl" +go_package="${go_import_path}/cmd/sbctl" +go_ldflags="-X ${go_import_path}.Version=${version}" hostmakedepends="asciidoc" +checkdepends="openssl-devel" 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=500e8647041b9be193cf573a99b2c5b2956f11565b1aa961d62aa1666689b977 +make_dirs="/var/lib/sbctl 0700 root root" +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 + + local SBCTL="${DESTDIR}/usr/bin/sbctl" + for shell in bash fish zsh; do + vtargetrun ${SBCTL} completion ${shell} > sbctl.${shell} + vcompletion sbctl.${shell} ${shell} + done }