blob: 8347365ab77b179565c0287b1bbec759425edfe7 (
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
72
|
# Maintainer: Carl Smedstad <carsme@archlinux.org>
pkgname=fb303
pkgver=2024.05.06.00
pkgrel=1
pkgdesc="A core set of thrift functions that provide a common mechanism for querying stats and other information from a service"
arch=(x86_64)
url="https://github.com/facebook/fb303"
license=(Apache-2.0)
depends=(
fbthrift
fmt
folly
gcc-libs
gflags
glibc
google-glog
python
)
makedepends=(
boost
cmake
)
provides=(
libfb303.so
libfb303_thrift_cpp.so
)
options=(!lto)
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha256sums=('bc5ee6bdd16a181c26c496a4b07604517bbf1453c992303e0bffdb2f5f6d02aa')
_archive="$pkgname-$pkgver"
prepare() {
cd "$_archive"
# Use system CMake config instead of bundled module, incompatible with glog
# v0.7.0+
sed -i 's/find_package(Glog MODULE REQUIRED)/find_package(Glog CONFIG REQUIRED)/' \
CMakeLists.txt
}
build() {
cd "$_archive"
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr \
-Wno-dev \
-DBUILD_SHARED_LIBS=ON \
-DPYTHON_EXTENSIONS=ON \
-DPACKAGE_VERSION="$pkgver"
cmake --build build
}
check() {
cd "$_archive"
ctest --test-dir build --output-on-failure
}
package() {
cd "$_archive"
DESTDIR="$pkgdir" cmake --install build
# Remove empty dirs to silence namcap warnings
rm -r \
"$pkgdir/usr/include/fb303/test" \
"$pkgdir/usr/include/fb303/thrift/clients" \
"$pkgdir/usr/include/fb303/thrift/services"
}
|