archrelease: copy trunk to community-any
[ArchLinux/community.git] / goimapnotify / trunk / PKGBUILD
blobb067c9cb459c22d04b5bbf691337f5a00fe52fe5
1 # Maintainer: Maxim Baz <$pkgname at maximbaz dot com>
2 # Contributor: Jorge Araya Navarro <jorge@esavara.cr>
4 pkgname=goimapnotify
5 pkgver=2.3.7
6 pkgrel=3
7 pkgdesc="Execute scripts on IMAP mailbox changes (new/deleted/updated messages) using IDLE, golang version."
8 url="https://gitlab.com/shackra/goimapnotify"
9 license=('GPL3')
10 arch=('x86_64')
11 depends=('glibc')
12 makedepends=('git' 'go')
13 source=("${pkgname}-${pkgver}.tar.gz::${url}/-/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz")
14 sha512sums=('7551ec498c3414448b21bf4202a69bbab8815dd9423638b3adbf31fb2857a008fb6f1ac78e41ce695550931dfe4ba9c49050f3bfcab2d646f37547a7efcdaff7')
15 options=(!lto)
17 build() {
18     cd "${pkgname}-${pkgver}"
20     export CGO_CPPFLAGS="${CPPFLAGS}"
21     export CGO_CFLAGS="${CFLAGS}"
22     export CGO_CXXFLAGS="${CXXFLAGS}"
23     export CGO_LDFLAGS="${LDFLAGS}"
24     export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
25     go build -ldflags "-linkmode=external -extldflags=$LDFLAGS"
28 check() {
29     cd "${pkgname}-${pkgver}"
31     go test ./...
34 package() {
35     cd "${pkgname}-${pkgver}"
37     install -Dm755 -t "${pkgdir}/usr/bin/" "${pkgname}"
38     install -Dm644 -t "${pkgdir}/usr/lib/systemd/user/" goimapnotify@.service