# Maintainer: Dekedro <dekedro@protonmail.com>
pkgname=hydroxide
pkgver=0.2.29
pkgrel=0
pkgdesc="Third-party, open-source ProtonMail CardDAV, IMAP and SMTP bridge"
url="https://github.com/emersion/hydroxide"
license="MIT"
arch="all"
makedepends="go"
options="net !check" # no tests
source="https://github.com/emersion/hydroxide/releases/download/v$pkgver/hydroxide-$pkgver.tar.gz
	go-mod.patch
	"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build ./cmd/hydroxide
}

package() {
	install -Dm755 hydroxide  -t "$pkgdir"/usr/bin/
}

sha512sums="
f35b75aef6d4fa16b1af96cb4b568915af76d938d1bf1e397e6488360366c9d4ea5216a4f83cbc91800141cc791858913f4c0b5991260e0dde40ec5653c7870b  hydroxide-0.2.29.tar.gz
cf84ec8accda294e6448bc6ef2f5707f635c01c2c08564295e207ea44d24400f07d27adfce26863ac8c901af6041b928a6efcfcbe15db6edc84b8b9427366565  go-mod.patch
"
