diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 35 |
1 files changed, 15 insertions, 20 deletions
@@ -2,32 +2,31 @@ # TODO systemd service pkgname=keys-pub pkgver=0.0.47 -pkgrel=1 +pkgrel=2 pkgdesc='keys.pub CLI client and service (keys, keysd)' arch=('x86_64' 'i686') url='https://keys.pub/' license=('MIT') depends=('libfido2') -makedepends=('git' 'go' 'gzip') +makedepends=('git' 'go') optdepends=('org.freedesktop.secrets: storing secrets') source=("${pkgname}-${pkgver}.tar.gz::https://github.com/keys-pub/keys-ext/archive/v${pkgver}.tar.gz") sha256sums=('c9ada22e3bb7424c06838fa299288b5a2506ed7d659a5230ddc1e08a29f66cd2') prepare() { - cd "keys-ext-${pkgver}" # lots of the components fetch an older version of themselves. not gonna use the replace directive # on all of them. this is an upstream issue - ( - cd auth/rpc - go mod download - ) - cd service + cd "keys-ext-${pkgver}/service" sed -i 's#// \?\(replace github.com/keys-pub/keys-ext\)#\1#g' go.mod go mod tidy + + cd ../auth/rpc + echo 'replace github.com/keys-pub/keys-ext/auth/fido2 => ../fido2' >> go.mod + go mod tidy } build() { - local _commit=$(zcat "${pkgname}-${pkgver}.tar.gz" | git get-tar-commit-id) + local _commit=$(bsdcat "${pkgname}-${pkgver}.tar.gz" | git get-tar-commit-id) local -a x=( main.version="$pkgver" main.commit="${_commit:?}" @@ -42,22 +41,18 @@ build() { export CGO_CXXFLAGS="$CXXFLAGS" export GOFLAGS='-buildmode=pie -trimpath -modcacherw -mod=readonly' - ( - cd auth/rpc - go build -o ../../fido2.so -buildmode=plugin ./plugin - ) cd service go build -o .. -ldflags "${x[*]/#/-X=}" ./{keys,keysd} + + cd ../auth/rpc + go build -o ../../fido2.so -buildmode=plugin ./plugin } check() { - cd "keys-ext-${pkgver}" - ( - cd auth/rpc - go test -failfast -short ./... - ) - cd service - go test -short ./... + cd "keys-ext-${pkgver}/service" + go test -failfast -short ./... + cd ../auth/rpc + go test -failfast -short ./... } package() { |