1 # Maintainer: George Rawlinson <grawlinson@archlinux.org>
6 pkgdesc='A scalable long-term storage for Prometheus'
8 url='https://grafana.com/oss/mimir/'
11 makedepends=('git' 'go')
12 backup=('etc/mimir.yaml')
14 _commit='f917e084d4a5596565b5debd659db0d4a5f9da6d'
16 "$pkgname::git+https://github.com/grafana/mimir.git#commit=$_commit"
23 'b1220c02c9cebbfbc65869a01dac92438ab87df557c67c27489f005b695303591c729a2c172a5e5254bd03276ac4c3d146498b18b6984595db9dc0ebc2a5e814'
24 '5f349b126b5ce6671b00d8482eb8aad71d73e93db983d4b4fe68a430f2902eac3ec7f8460f9f699ba6e76a13bc4b27d9a248e54a550a1849713364c3b84d4ad8'
25 'edc4e9e301e889dfa47528e411459a970f97feb9ca07a3fcc33b60c16adb988109543bc746689e82ac688caca0c60b75abe7d0cc80662d22de665712ff650bb8'
26 '573a19bda1baa73260364bf31bddcc5cd0fc6dc98f69d8ff8a549187cf7f47ecddb35e7141dd638acdb916579e408e6c9f860889847bbe130ccc7383fc4ba899')
31 git describe --tags | sed 's/^mimir-//'
37 # create directory for build output
48 export CGO_CPPFLAGS="${CPPFLAGS}"
49 export CGO_CFLAGS="${CFLAGS}"
50 export CGO_CXXFLAGS="${CXXFLAGS}"
51 export GOPATH="${srcdir}"
57 -ldflags "-compressdwarf=false \
59 -extldflags ${LDFLAGS} \
60 -X github.com/grafana/mimir/pkg/util/version.Branch=main \
61 -X github.com/grafana/mimir/pkg/util/version.Revision=$_commit \
62 -X github.com/grafana/mimir/pkg/util/version.Version=$pkgver" \
70 # generate refs for test cases
71 # yoinked from Makefile
72 go run ./tools/config-inspector > cmd/mimir/config-descriptor.json
79 install -vDm644 systemd.service "$pkgdir/usr/lib/systemd/system/$pkgname.service"
80 install -vDm644 sysusers.conf "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
81 install -vDm644 tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
82 install -vDm640 config.yaml "$pkgdir/etc/$pkgname.yaml"
86 install -vDm755 -t "$pkgdir/usr/bin" build/*