traefik/PKGBUILD

47 lines
1.8 KiB
Bash
Raw Normal View History

2019-12-13 20:38:53 +00:00
# Maintainer : Christian Rebischke <chris.rebischke@archlinux.org>
pkgname=traefik
2020-05-01 12:42:06 +00:00
pkgver=2.2.1
2020-02-29 13:38:05 +00:00
pkgrel=1
2020-02-22 13:31:05 +00:00
pkgdesc="Modern reverse proxy written in Go"
2019-12-13 20:38:53 +00:00
arch=('x86_64')
url="https://containo.us/traefik/"
license=('MIT')
2020-04-24 21:14:21 +00:00
makedepends=('go-pie' 'git' 'go-bindata-hashicorp')
2019-12-13 20:38:53 +00:00
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")
2020-05-01 12:42:06 +00:00
sha512sums=('f23a58632cbef5c3326b464f9c85f59f2d29ed799d392da544f66c40113e3f08b504c35867479603c697c4ee660401ae2ac4596288bcb9de348ddbe597dea45c'
'474dc8274d160bf46a46edf8855378331521b108a767345fb8cb201f23576ceadbee81560d15cf98cac3a978eb24b49f951524da828ffda720797f7ab38bd49c'
'5fecfed5df77bf28c2c976ebaebedb030904d41509e740821140a4889bda20327f416e78f8d19b0ee78c8bc422d1907ce05ef3562e4d3e36ddfbdbea5e860b2a')
prepare() {
mkdir "${srcdir}/${pkgname}-${pkgver}"
tar xfvz "${srcdir}/${pkgname}-${pkgver}.tar.gz" -C "${srcdir}/${pkgname}-${pkgver}"
}
2019-12-13 20:38:53 +00:00
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
2019-12-13 20:38:53 +00:00
go generate
cd cmd/traefik
go build -trimpath -ldflags "-extldflags ${LDFLAGS}"
}
2020-02-22 13:31:05 +00:00
check() {
cd "${srcdir}/${pkgname}-${pkgver}"
2020-02-22 13:31:05 +00:00
go test ./...
}
2019-12-13 20:38:53 +00:00
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
2019-12-13 20:38:53 +00:00
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"
2019-12-13 20:38:53 +00:00
}