archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / bear / repos / community-x86_64 / PKGBUILD
blob79d18037a69fefbb8f7dd94003576c01baf9d741
1 # Maintainer: George Rawlinson <grawlinson@archlinux.org>
2 # Contributor: Yiyao Yu <yuydevel at protonmail dot com>
3 # Contributor: Moritz Lipp <mlq@pwmt.org>
5 pkgname=bear
6 pkgver=3.1.2
7 pkgrel=1
8 pkgdesc='A tool to generate compilation database for clang tooling'
9 arch=('x86_64')
10 url='https://github.com/rizsotto/Bear'
11 license=('GPL3')
12 depends=(
13   'glibc'
14   'gcc-libs'
15   'grpc'
16   'libgrpc++.so'
17   'fmt'
18   'spdlog'
19   'nlohmann-json'
20   'abseil-cpp'
21   'protobuf'
22   'openssl'
23   'c-ares'
24   're2'
26 makedepends=(
27   'git'
28   'cmake'
29   'gtest'
30   'python'
31   'llvm'
33 _commit='0c48ae75892c8ace741a87209e7293c50687c9f0'
34 source=("$pkgname::git+$url.git#commit=$_commit")
35 b2sums=('SKIP')
37 pkgver() {
38   cd "$pkgname"
40   git describe --tags
43 # XXX if this is moved to build, tests fail.
44 # there must be some environment variables that
45 # are discarded inbetween functions.
46 prepare() {
47   cmake \
48     -B build \
49     -S "$pkgname" \
50     -DCMAKE_INSTALL_PREFIX=/usr \
51     -DCMAKE_INSTALL_SYSCONFDIR=/etc \
52     -DCMAKE_INSTALL_LIBEXECDIR="lib/$pkgname"
55 build() {
56   cmake --build build
59 package() {
60   DESTDIR="$pkgdir" cmake --install build