mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-02-03 06:51:57 +01:00
67 lines
2.1 KiB
Plaintext
67 lines
2.1 KiB
Plaintext
# Contributor: wener <wenermail@gmail.com>
|
|
# Maintainer: wener <wenermail@gmail.com>
|
|
pkgname=thanos
|
|
pkgver=0.15.0
|
|
pkgrel=1
|
|
pkgdesc="Highly available Prometheus setup with long term storage capabilities. CNCF Sandbox project."
|
|
url="https://github.com/thanos-io/thanos"
|
|
license="Apache-2.0"
|
|
arch="all !mips64 !riscv64" # prometheus
|
|
install="thanos.pre-install"
|
|
makedepends="go prometheus tzdata"
|
|
subpackages="$pkgname-openrc"
|
|
source="
|
|
$pkgname-$pkgver.tar.gz::https://github.com/thanos-io/thanos/archive/v$pkgver.tar.gz
|
|
thanos.initd
|
|
thanos.confd
|
|
"
|
|
|
|
build() {
|
|
GOFLAGS="$GOFLAGS -trimpath"
|
|
GOLDFLAGS="
|
|
-extldflags '-static'
|
|
-X github.com/prometheus/common/version.Version=$pkgver
|
|
-X github.com/prometheus/common/version.Revision=AlpineLinux
|
|
-X github.com/prometheus/common/version.Branch=master
|
|
-X github.com/prometheus/common/version.BuildUser=$USER@$HOSTNAME
|
|
-X github.com/prometheus/common/version.BuildDate=$(date -u "+%Y%m%d-%H:%M:%S" ${SOURCE_DATE_EPOCH:+-d @$SOURCE_DATE_EPOCH})
|
|
"
|
|
|
|
go build \
|
|
$GOFLAGS \
|
|
-ldflags "$GOLDFLAGS" \
|
|
./cmd/thanos
|
|
}
|
|
|
|
check() {
|
|
# some tests need external storage credentials or running server
|
|
# pkg/cacheutil go 1.15 compact
|
|
# pkg/pool alloc too much memory
|
|
go test $(go list ./... | grep -v \
|
|
-e 'test/e2e' \
|
|
-e 'pkg/shipper' \
|
|
-e 'pkg/store' \
|
|
-e 'objstore/objtesting' \
|
|
-e 'pkg/promclient' \
|
|
-e 'pkg/rules' \
|
|
-e 'pkg/compact' \
|
|
-e 'pkg/block' \
|
|
-e 'pkg/query' \
|
|
-e 'pkg/cacheutil' \
|
|
-e 'pkg/pool' \
|
|
)
|
|
}
|
|
|
|
package() {
|
|
install -Dm755 thanos "$pkgdir"/usr/bin/thanos
|
|
|
|
install -m755 -D "$srcdir"/$pkgname.initd \
|
|
"$pkgdir"/etc/init.d/$pkgname
|
|
install -m644 -D "$srcdir"/$pkgname.confd \
|
|
"$pkgdir"/etc/conf.d/$pkgname
|
|
}
|
|
|
|
sha512sums="3c1bc7d797c429356d842e2cb4efdbcbe15ca8a1c54a343f5db9d3734855596ec85b0b80b09b0f3a9a6aa9cfb9683e7188fefad4128b65768d8c298d3afa1e30 thanos-0.15.0.tar.gz
|
|
8407adbc29d90d36550ad16555d0b881d1d1745fba7bf5f4bd4a66bdf4abe196321106881dbba569c7e123d6abfbe78714b6e108b1e3c69b051270c3a46ba5c8 thanos.initd
|
|
c1bc9d71828b176eed964d5f673ea5e5d368f25ca21a3b12dcb8f8987f8bf12f35c06849d7fc4e6ffae52d98a5e636bdb63333930fe640c48e4d02a0b8db620a thanos.confd"
|