blob: bbfc50d196067d141d54f722acde74228ccc27f9 (
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
|
# Maintainer: Christian Pfeiffer <cpfeiffer@live.de>
pkgname=ergochat-ldap
_upstream_pkgname=ergo-ldap
pkgver=0.0.1
pkgrel=2
pkgdesc="LDAP plugin for the IRC server Ergo"
arch=('i686' 'pentium4' 'x86_64' 'arm' 'armv7h' 'armv6h' 'aarch64')
url="https://github.com/ergochat/ergo-ldap"
license=('Apache-2.0')
depends=('glibc')
makedepends=('go' 'git')
source=("git+$url#tag=v$pkgver")
sha256sums=('437928ad1b74432672442e1fe187d9d2987f93124150d663aafda2cab57963ab')
backup=("etc/ergochat/ldap-config.yaml")
build() {
GOPATH=$(pwd)/..
export GOPATH
cd "${srcdir}/$_upstream_pkgname" || exit
GIT_COMMIT="$(git rev-parse HEAD)" # 2>/dev/null)"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
go build \
-trimpath \
-buildmode=pie \
-mod=vendor \
-modcacherw \
-ldflags "-X main.commit=${GIT_COMMIT} -compressdwarf=false -linkmode external -extldflags \"${LDFLAGS}\"" \
-v \
.
}
package() {
cd "$srcdir/$_upstream_pkgname" || exit
install -Dm755 $_upstream_pkgname "$pkgdir/usr/bin/$pkgname"
install -Dm644 example.yaml "$pkgdir/etc/ergochat/ldap-config.yaml"
}
|