blob: 4e0fc37f40a19ab301282af9fcc00ed43e810b1d (
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
|
# Maintainer: Carl Smedstad <carsme@archlinux.org>
pkgname=codechecker
pkgver=6.24.4
pkgrel=1
pkgdesc="Analyzer tooling, defect database and viewer extension for the Clang Static Analyzer and Clang Tidy"
arch=(x86_64)
url="https://github.com/Ericsson/codechecker"
license=(Apache-2.0)
depends=(
gcc-libs
glibc
python
)
makedepends=(
npm
python-pip
)
optdepends=(
'clang: for running Clang Static Analyzer and Clang Tidy'
'cppcheck: for running CPPCheck analysis'
)
source=(
"$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz"
"fix-ldflags.patch"
)
sha256sums=(
'a6b8968d52e672b3b77e38f1907768434adaa69185f90557770909d82c037f92'
'e59cb4d96642ccea7c3536e020b3961c1717bc65983424ced48b0ae1b1a3871a'
)
prepare() {
cd $pkgname-$pkgver
patch -Np1 -i "$srcdir/fix-ldflags.patch"
}
build() {
cd $pkgname-$pkgver
make venv
# shellcheck disable=SC1091
source "$PWD/venv/bin/activate"
pip install setuptools
# Parallel builds fail
export MAKEFLAGS="-j1"
export BUILD_LOGGER_64_BIT_ONLY=YES
make package
tar -xf web/api/py/codechecker_api/dist/codechecker_api.tar.gz
tar -xf web/api/py/codechecker_api_shared/dist/codechecker_api_shared.tar.gz
}
package() {
cd $pkgname-$pkgver
install -vdm755 "$pkgdir/opt"
cp -a build/CodeChecker "$pkgdir/opt"
rm -r "$pkgdir/opt/CodeChecker/lib/python3/codechecker"
cp -r venv/lib/python*/site-packages/* "$pkgdir/opt/CodeChecker/lib/python3/"
cp -a codechecker_api-*/codechecker_api/ "$pkgdir/opt/CodeChecker/lib/python3/"
cp -a codechecker_api_shared-*/codechecker_api_shared/ "$pkgdir/opt/CodeChecker/lib/python3/"
install -vdm755 "$pkgdir/usr/bin"
ln -s /opt/CodeChecker/bin/CodeChecker "$pkgdir/usr/bin/CodeChecker"
}
|