summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4b32b9d575fa752d7a16bb2f0f2ed61a89129182 (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
# Maintainer: OpenSorcerer <alex cat fossfed dog eu>
pkgname=xcaddy
pkgver=0.4.4
pkgrel=1
pkgdesc="Build Caddy with plugins"
arch=('i686' 'x86_64' 'armv7h' 'aarch64')
url="https://github.com/caddyserver/xcaddy"
license=('Apache-2.0')
depends=('go')
makedepends=('git')
source=("git+$url.git#tag=v$pkgver")
sha512sums=('SKIP')

build() {
    cd "$pkgname"
    export CGO_CPPFLAGS="${CPPFLAGS}"
    export CGO_CFLAGS="${CFLAGS}"
    export CGO_CXXFLAGS="${CXXFLAGS}"
    export CGO_LDFLAGS="${LDFLAGS}"
    export GOFLAGS="-buildmode=pie -trimpath -modcacherw"
    go build -o xcaddy "cmd/$pkgname/main.go"
}

package() {
    cd "$pkgname"
    install -Dm755 "./xcaddy" "$pkgdir/usr/bin/xcaddy"
}