summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD55
1 files changed, 23 insertions, 32 deletions
diff --git a/PKGBUILD b/PKGBUILD
index d1ebe46b7b5a..d15a4f6b58c5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,38 +1,29 @@
# Maintainer: dr00tb <adam at dr00tb dot com>
pkgname=tkey-ssh-agent
-_pkgname=tillitis-key1-apps
-_libname=tkey-libs
-_appname=tkey-device-signer
-pkgver=0.0.8
-_libver=0.0.2
+pkgver=1.0.0
pkgrel=1
pkgdesc="A ssh-agent for the Tillitis TKey"
arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64')
-url="https://github.com/tillitis/tillitis-key1-apps"
+url="https://github.com/tillitis/${pkgname}"
license=('GPL2')
-makedepends=('clang' 'llvm' 'lld' 'go')
+makedepends=('make' 'go')
conflicts=("${pkgname}2")
provides=("${pkgname}")
-install=tkey-ssh-agent.install
-source=("git+https://github.com/tillitis/${_pkgname}.git#commit=7e18bcb"
- "git+https://github.com/tillitis/${_libname}.git#tag=v${_libver}"
- "git+https://github.com/tillitis/${_appname}.git#tag=v${pkgver}")
-b2sums=('SKIP'
- 'SKIP'
- 'SKIP')
+install="${pkgname}.install"
+_archive="${pkgname}-${pkgver}"
+source=("${url}/archive/v${pkgver}/${_archive}.tar.gz")
+b2sums=('SKIP')
build() {
- cd "${srcdir}/${_libname}"
- make OBJCOPY="llvm-objcopy"
-
- cd "${srcdir}/${_appname}"
- make OBJCOPY="llvm-objcopy" signer/app.bin
-
- cd "${srcdir}/${_pkgname}"
- cp "${srcdir}/${_appname}/signer/app.bin" ./cmd/tkey-ssh-agent/app.bin
- sed -i "s/tkey-ssh-agent: check-signer-hash/tkey-ssh-agent:/" Makefile
- make OBJCOPY="llvm-objcopy" tkey-ssh-agent
+ TKEY_SSH_AGENT_VERSION=
+ TKEY_SIGNER_APP_NO_TOUCH=
+ cd "${srcdir}/${_archive}"
+ CGO_ENABLED=0 go build \
+ -ldflags "-X main.version=$TKEY_SSH_AGENT_VERSION -X main.signerAppNoTouch=$TKEY_SIGNER_APP_NO_TOUCH" \
+ -trimpath \
+ -buildvcs=false \
+ ./cmd/tkey-ssh-agent
}
package() {
@@ -40,13 +31,13 @@ package() {
destman1="${pkgdir}/usr/share/man/man1"
destunit="${pkgdir}/usr/lib/systemd/user"
destrules="${pkgdir}/etc/udev/rules.d"
- cd "${srcdir}/${_pkgname}"
- install -Dm755 tkey-ssh-agent "${destbin}/tkey-ssh-agent"
- strip "${destbin}"/tkey-ssh-agent
- install -Dm644 system/tkey-ssh-agent.1 "${destman1}"/tkey-ssh-agent.1
- gzip -n9f "${destman1}"/tkey-ssh-agent.1
- install -Dm644 system/tkey-ssh-agent.service.tmpl "${destunit}"/tkey-ssh-agent.service
- sed -i -e "s,##BINDIR##,/usr/bin," "${destunit}"/tkey-ssh-agent.service
- install -Dm644 system/60-tkey.rules "${destrules}"/60-tkey.rules
+ cd "${srcdir}/${_archive}"
+ install -Dm755 "${pkgname}" "${destbin}/${pkgname}"
+ strip "${destbin}/${pkgname}"
+ install -Dm644 "system/${pkgname}.1" "${destman1}/${pkgname}.1"
+ gzip -n9f "${destman1}/${pkgname}.1"
+ install -Dm644 "system/${pkgname}.service.tmpl" "${destunit}/${pkgname}.service"
+ sed -i -e "s,##BINDIR##,/usr/bin," "${destunit}/${pkgname}.service"
+ install -Dm644 system/60-tkey.rules "${destrules}/60-tkey.rules"
}