1 # Maintainer: Maxim Baz <$pkgname at maximbaz dot com>
2 # Contributor: Jorge Araya Navarro <jorge@esavara.cr>
7 pkgdesc="Execute scripts on IMAP mailbox changes (new/deleted/updated messages) using IDLE, golang version."
8 url="https://gitlab.com/shackra/goimapnotify"
12 makedepends=('git' 'go')
13 source=("${pkgname}-${pkgver}.tar.gz::${url}/-/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz")
14 sha512sums=('7551ec498c3414448b21bf4202a69bbab8815dd9423638b3adbf31fb2857a008fb6f1ac78e41ce695550931dfe4ba9c49050f3bfcab2d646f37547a7efcdaff7')
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"
29 cd "${pkgname}-${pkgver}"
35 cd "${pkgname}-${pkgver}"
37 install -Dm755 -t "${pkgdir}/usr/bin/" "${pkgname}"
38 install -Dm644 -t "${pkgdir}/usr/lib/systemd/user/" goimapnotify@.service