blob: 5c6ecd4b7d4a5b4f33e401da2e87b8e6953e6cd7 (
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
|
# Maintainer: Rubin Simons <me@rubin55.org>
pkgname=infer-bin
pkgver=1.2.0
pkgrel=1
pkgdesc="Infer is a static analysis tool for Java, C++, Objective-C, and C. Infer is written in OCaml."
arch=('x86_64')
url="https://github.com/facebook/infer"
options=("!strip")
license=('MIT')
depends=('libc++abi'
'java-environment'
'ncurses5-compat-libs')
source=("https://github.com/facebook/infer/releases/download/v${pkgver}/infer-linux-x86_64-v${pkgver}.tar.xz"
'FailingTest.c'
'PassingTest.c'
'FailingTest.java'
'PassingTest.java'
'LICENSE')
sha512sums=('3656547f86666214fb4b9ec2098b3fa511cb25e4485f1d802a8ac376a9a1cd32ec051111b428db7ad8981a579247dbcff917f20024dded442cb62e95e0f0e4e0'
'e72e043048624ef958dcb03c73b042d17ee162d80f5f9798dd89b25b9ceca6e4852fc4627ac7c1d5162c73834431f61f52d3b37a4f990d1a19dc927665adbb04'
'd5333a55e34e92225dd2018a1b016c0ffe537773ea8d708cd74e2ae8c6e556cec8998028238fb993a000ef0841a6a21f7585893a58fb6c2208122951b717dd78'
'716d142870b12af04a19d81197b96f91af1544d1d8f2a4d09248d161cb4995ef3ff4611f8bd175a0553f0911cf24efa79ef97e36a14667f5b2027e053576d880'
'24ec322cbf4ebc6a5cb41269b1c6ebf09226cf3d0e4201781bd805bb63ffa499090d74542c8fcbdcd63924b8acfb7443acc1732441a2e3bb4c54a0cbf1aec680'
'400e5fff25247fb0fa8c0125073658c8f429c39fc20efefe9a8a69b5c5f925a9df1818b324e6691884ba108463908b75758f07b4796bf9fb972401696d3371f4')
check() {
${srcdir}/infer-linux-x86_64-v${pkgver}/bin/infer --fail-on-issue -- clang -c FailingTest.c && return 1
${srcdir}/infer-linux-x86_64-v${pkgver}/bin/infer --fail-on-issue -- clang -c PassingTest.c || return 1
${srcdir}/infer-linux-x86_64-v${pkgver}/bin/infer --fail-on-issue -- javac FailingTest.java && return 1
${srcdir}/infer-linux-x86_64-v${pkgver}/bin/infer --fail-on-issue -- javac PassingTest.java || return 1
}
package() {
mkdir ${pkgdir}/usr
cp -r ${srcdir}/infer-linux-x86_64-v${pkgver}/bin ${pkgdir}/usr/bin
cp -r ${srcdir}/infer-linux-x86_64-v${pkgver}/lib ${pkgdir}/usr/lib
cp -r ${srcdir}/infer-linux-x86_64-v${pkgver}/share ${pkgdir}/usr/share
install -D -m 644 ${srcdir}/LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
}
|