summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD40
2 files changed, 54 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..bb27d76d4eea
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = keys-pub-git
+ pkgdesc = keys.pub CLI - keys and keysd
+ pkgver = v0.0.43.r0.g22cc591
+ pkgrel = 1
+ url = https://github.com/keys-pub/keysd
+ arch = x86_64
+ license = MIT
+ makedepends = go
+ makedepends = libfido2
+ source = keys-pub-git::git+https://github.com/keys-pub/keysd
+ sha512sums = SKIP
+
+pkgname = keys-pub-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..5fb1954457a8
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: Bryan Burke <bryan.t.burke@gmail.com>
+pkgname=keys-pub-git
+pkgver=v0.0.43.r0.g22cc591
+pkgrel=1
+pkgdesc='keys.pub CLI - keys and keysd'
+arch=('x86_64')
+url="https://github.com/keys-pub/keysd"
+license=('MIT')
+makedepends=('go' 'libfido2')
+source=("${pkgname}::git+${url}")
+sha512sums=('SKIP')
+
+pkgver() {
+ cd "${pkgname}"
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+build() {
+ (
+ set -o pipefail
+ cd "${pkgname}"
+ git checkout $(git describe --long --tags)
+ commit=$(git rev-parse --short HEAD)
+ date=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
+
+ cd service
+ mkdir -p bin
+
+ go build -o bin/keysd -ldflags "-X main.version=$pkgver -X main.commit=$commit -X main.date=$date" ./keysd/main.go
+ go build -o bin/keys -ldflags "-X main.version=$pkgver -X main.commit=$commit -X main.date=$date" ./keys/main.go
+ go build -o bin/fido2.so --buildmode=plugin -ldflags "-X main.version=$pkgver -X main.commit=$commit -X main.date=$date" ./fido2/plugin.go
+ )
+}
+
+package() {
+ cd "${pkgname}/service/bin"
+ install -Dm755 keys "$pkgdir"/usr/bin/keys
+ install -Dm755 keysd "$pkgdir"/usr/bin/keysd
+ install -Dm644 fido2.so "$pkgdir"/usr/bin/fido2.so
+}