blob: 5f3c77b4212658e46dae35dac1c5f24589d14cff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# Maintainer: Ralph Torres <mail at ralphptorr dot es>
# Contributor: Simon Ser <@emersion>
# Contributor: Cookie Engineer <@cookiengineer>
_pkgname=hydroxide
pkgname=$_pkgname-git
pkgver=0.2.29.r0.c964219
pkgrel=1
pkgdesc='A third-party, open-source ProtonMail CardDAV, IMAP and SMTP bridge'
arch=(x86_64)
url=https://github.com/emersion/hydroxide
license=(MIT)
provides=($_pkgname)
conflicts=($_pkgname)
makedepends=(git go)
source=(git+$url)
sha256sums=(SKIP)
pkgver() {
cd "$srcdir"/$_pkgname
git describe --tags --long --abbrev=7 |\
sed 's/\([^-]*-\)g/r\1/;s/-/./g;s/^v//'
}
build() {
cd "$srcdir"/$_pkgname
export CGO_CFLAGS="$CFLAGS"
export CGO_CPPFLAGS="$CPPFLAGS"
export CGO_CXXFLAGS="$CXXFLAGS"
export CGO_LDFLAGS="$LDFLAGS"
export GOFLAGS='-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw'
go build ./cmd/...
}
check() {
cd "$srcdir"/$_pkgname
go test ./...
}
package() {
cd "$srcdir"/$_pkgname
install -Dm755 -t "$pkgdir"/usr/bin $_pkgname
install -Dm644 -t "$pkgdir"/usr/share/licenses/$_pkgname LICENSE
install -Dm644 -t "$pkgdir"/usr/share/doc/$_pkgname README.md
}
|