traefik/PKGBUILD
Christian Rebischke 5d5adfbd90 upgpkg: 2.1.6-1
2020-02-29 13:38:05 +00:00

47 lines
1.7 KiB
Bash

# Maintainer : Christian Rebischke <chris.rebischke@archlinux.org>
pkgname=traefik
pkgver=2.1.6
pkgrel=1
pkgdesc="Modern reverse proxy written in Go"
arch=('x86_64')
url="https://containo.us/traefik/"
license=('MIT')
makedepends=('go-pie' 'git' 'go-bindata')
depends=('glibc')
backup=('etc/traefik/traefik.toml'
'etc/traefik/traefik.yaml'
'etc/traefik/traefik.yml')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/containous/traefik/releases/download/v${pkgver}/traefik-v${pkgver}.src.tar.gz"
'traefik.service'
'traefik.sysusers')
noextract=("${pkgname}-${pkgver}.tar.gz")
sha512sums=('5d6b2b234ba52749323fcc78e98ea592a9cd232a8b2d282398544611d17354f3d8ab2373397d30918a30b74efa3e78d9ee9114d8501593feafe5d0a4f4b885c3'
'474dc8274d160bf46a46edf8855378331521b108a767345fb8cb201f23576ceadbee81560d15cf98cac3a978eb24b49f951524da828ffda720797f7ab38bd49c'
'5fecfed5df77bf28c2c976ebaebedb030904d41509e740821140a4889bda20327f416e78f8d19b0ee78c8bc422d1907ce05ef3562e4d3e36ddfbdbea5e860b2a')
prepare() {
mkdir "${srcdir}/${pkgname}-${pkgver}"
tar xfvz "${srcdir}/${pkgname}-${pkgver}.tar.gz" -C "${srcdir}/${pkgname}-${pkgver}"
}
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
go generate
cd cmd/traefik
go build -trimpath -ldflags "-extldflags ${LDFLAGS}"
}
check() {
cd "${srcdir}/${pkgname}-${pkgver}"
go test ./...
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
install -Dm755 cmd/traefik/"${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
install -Dm644 LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -Dm644 "${srcdir}/traefik.service" "${pkgdir}/usr/lib/systemd/system/traefik.service"
install -Dm644 "${srcdir}/traefik.sysusers" "${pkgdir}/usr/lib/sysusers.d/traefik.conf"
}