blob: 34ba0750f8682b0007710396b7a1f77803621ac4 (
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# Contributor: Joe Holden <jwh@zorins.us>
# Maintainer: Joe Holden <jwh@zorins.us>
pkgname=traefik
pkgver=2.0.6
pkgrel=0
pkgdesc="The Cloud Native Edge Router"
url="https://traefik.io"
arch="all !x86 !s390x !armhf !armv7" # tests fails on x86 and armhf
license="MIT"
makedepends="go go-bindata"
install="$pkgname.pre-install"
pkgusers="$pkgname"
pkggroups="$pkgname"
subpackages="$pkgname-openrc"
options="chmod-clean"
source="$pkgname-$pkgver.tar.gz::https://github.com/containous/traefik/archive/v$pkgver.tar.gz
traefik.initd
traefik.confd
traefik.toml"
builddir="$srcdir/src/github.com/containous/$pkgname"
# secfixes:
# 1.7.14-r0:
# - CVE-2019-9512
# - CVE-2019-9514
export GOPATH="$srcdir"
prepare() {
default_prepare
mkdir -p "$srcdir/src/github.com/containous"
mv "$srcdir"/$pkgname-$pkgver "$builddir"/
}
build() {
go generate
go build -v -o bin/$pkgname ./cmd/$pkgname
}
check() {
# Unit tests
go test ./...
# Integration tests
cd "$builddir"/integration
go test -integration ./...
}
package() {
install -m755 -D "$srcdir"/$pkgname.initd \
"$pkgdir"/etc/init.d/$pkgname
install -m644 -D "$srcdir"/$pkgname.confd \
"$pkgdir"/etc/conf.d/$pkgname
install -m755 -D bin/$pkgname \
"$pkgdir"/usr/sbin/$pkgname
setcap cap_net_bind_service=+ep \
"$pkgdir"/usr/sbin/$pkgname
install -m750 -o $pkgname -g $pkgname -d "$pkgdir"/etc/$pkgname
install -m755 -o $pkgname -g $pkgname "$srcdir"/traefik.toml \
"$pkgdir"/etc/$pkgname/$pkgname.toml
}
sha512sums="ad20253e7a2a3def55d197363068c0494f29621367f4e901020d9cb132d92fe55caabe0465841a396ed43146955afb972635201c019ea149b7cfc2bb5b0e8745 traefik-2.0.6.tar.gz
2fe42052cdb035b202c7c0a1acd5cfe9ed1800ca067f2f5588d54e6ffbdd672d7c46cfd57fcfc219cadaa24d64a0e038a20d092eb1e4c04b67b8eb83c0af74fd traefik.initd
1519c2f446c4bc3af8407eb367a05e5ec0491f28d56d5385b12a550c84606d84e2424aadd5d72e56e628fd1da3f0f194ab3c077e6da85ead75a256f8e8069751 traefik.confd
7dff62db55362433fe33a69bfb556e6f285a033aaaab46ea970ae4ee1b19a4b0d6b25bf5523d4dc6b40d26922945fd1263ae8e53d295d6bf7f18ea1477a9e4d5 traefik.toml"
|