diff options
author | Amolith | 2024-01-07 14:02:55 -0500 |
---|---|---|
committer | Amolith | 2024-01-07 14:02:55 -0500 |
commit | 90e7dcc625d904944192571995de67976f748fbc (patch) | |
tree | b83884d9fee6c15b4ed291e390f1da10ce9815e8 /PKGBUILD | |
download | aur-enclave-git.tar.gz |
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..bcd54f1e8804 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: Amolith <amolith@secluded.site> +pkgname=enclave-git +_pkgname=${pkgname%-git} +pkgdesc='Command-line secure encrypted deniable cloud-synchronized notebook' +arch=("any") +url="https://github.com/symbolicsoft/enclave" +_branch='main' +pkgver=r6.a2ae2e8 +pkgrel=1 +license=("GPL-2.0") +makedepends=("git" "go") +source=("$_pkgname::git+$url#branch=$_branch") +sha256sums=("SKIP") +provides=($_pkgname) +conflicts=($_pkgname) + +pkgver() { + cd "$_pkgname" + ( set -o pipefail + git describe --long --abbrev=7 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)" + ) +} + +build() { + cd $_pkgname + + export CGO_LDFLAGS="${LDFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" + + go build -o "$_pkgname" github.com/symbolicsoft/enclave/v2/cmd/enclave +} + +check() { + cd "$_pkgname" + go test ./... +} + +package() { + cd "$_pkgname" + install -Dm755 "$_pkgname" "$pkgdir/usr/bin/$_pkgname" + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$_pkgname/LICENSE" +} |