aboutsummaryrefslogtreecommitdiffstats
path: root/community/goimapnotify/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/goimapnotify/APKBUILD')
-rw-r--r--community/goimapnotify/APKBUILD47
1 files changed, 47 insertions, 0 deletions
diff --git a/community/goimapnotify/APKBUILD b/community/goimapnotify/APKBUILD
new file mode 100644
index 00000000000..9534468c8be
--- /dev/null
+++ b/community/goimapnotify/APKBUILD
@@ -0,0 +1,47 @@
+# Contributor: Clayton Craft <clayton@craftyguy.net>
+# Contributor: Thomas Böhler <witcher@wiredspace.de>
+# Maintainer: Clayton Craft <clayton@craftyguy.net>
+pkgname=goimapnotify
+pkgver=2.3.12
+pkgrel=1
+pkgdesc="execute scripts on IMAP mailbox changes using IDLE, golang version"
+url="https://gitlab.com/shackra/goimapnotify"
+arch="all"
+license="GPL-3.0-or-later"
+makedepends="go"
+options="net"
+source="https://gitlab.com/shackra/goimapnotify/-/archive/$pkgver/goimapnotify-$pkgver.tar.gz"
+
+export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
+export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
+export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
+
+build() {
+ export CGO_CPPFLAGS="$CPPFLAGS"
+ export CGO_CFLAGS="$CFLAGS"
+ export CGO_CXXFLAGS="$CXXFLAGS"
+ export CGO_LDFLAGS="$LDFLAGS"
+ export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw"
+
+ # Fix build on riscv64
+ go mod edit -replace \
+ golang.org/x/sys=golang.org/x/sys@v0.0.0-20210630005230-0f9fa26af87c
+ go mod download golang.org/x/sys
+
+ go build -ldflags "-linkmode=external \"-extldflags=$LDFLAGS\""
+}
+
+check() {
+ go test ./...
+}
+
+package() {
+ install -Dm755 goimapnotify "$pkgdir"/usr/bin/goimapnotify
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE
+ install -Dm644 README.md "$pkgdir"/usr/share/doc/"$pkgname"/README.md
+ install -Dm644 CHANGELOG.rst "$pkgdir"/usr/share/doc/"$pkgname"/CHANGELOG.rst
+}
+
+sha512sums="
+c3061af4df07dc2e58b338b25a933b9bd31693e2a8a50fe7f6dcc921f8ee48975d97d9c3f9bea1804f3f6e2a0f282984d72152e7cc3e57a8485300369819461f goimapnotify-2.3.12.tar.gz
+"