Skip to content

Commit 735c152

Browse files
author
Vlastimil Zeman
committed
Add CBMC package build file for Arch Linux
1 parent 340a5ff commit 735c152

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

Diff for: pkg/arch/PKGBUILD

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Maintainer: Vlastimil Zeman <[email protected]>
2+
3+
pkgname=cbmc
4+
pkgver=5.7
5+
pkgrel=1
6+
pkgdesc="Bounded Model Checker for C and C++ programs"
7+
arch=("x86_64")
8+
url="https://github.com/diffblue/cbmc"
9+
license=("BSD-4-Clause")
10+
depends=("gcc-libs>=6.3")
11+
makedepends=("gcc>=6.3"
12+
"make>=4.2"
13+
"patch>=2.7"
14+
"perl-libwww>=6.24"
15+
"bison>=3.0"
16+
"flex>=2.6")
17+
source=("https://github.com/diffblue/cbmc/archive/$pkgname-$pkgver.tar.gz")
18+
sha256sums=("4f98cdce609532d3fc2587299ee4a6544f63aff5cf42e89d2baaa3d3562edf3e")
19+
20+
21+
build() {
22+
make -C "$pkgname-$pkgname-$pkgver/src" minisat2-download
23+
make -C "$pkgname-$pkgname-$pkgver/src" -j$(getconf _NPROCESSORS_ONLN)
24+
}
25+
26+
27+
check() {
28+
make -C "$pkgname-$pkgname-$pkgver/regression" test
29+
}
30+
31+
32+
package() {
33+
mkdir -p "$pkgdir/usr/bin/"
34+
for binary in $pkgname goto-analyzer goto-cc goto-diff goto-instrument
35+
do
36+
cp "$pkgname-$pkgname-$pkgver/src/$binary/$binary" "$pkgdir/usr/bin/"
37+
chmod 755 "$pkgdir/usr/bin/$binary"
38+
chown root:root "$pkgdir/usr/bin/$binary"
39+
done
40+
}

Diff for: pkg/arch/README.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Arch Linux Package
2+
3+
Update packages and install build dependencies
4+
5+
```bash
6+
sudo pacman -Sy archlinux-keyring && sudo pacman -Syyu
7+
sudo pacman -S gcc bison flex make patch perl-libwww fakeroot
8+
```
9+
10+
Create folder for package and copy [PKGBUILD](PKGBUILD) file there.
11+
12+
Build package by running `makepkg` in that folder. That will compile *CBMC* and
13+
run all tests. To install package run
14+
15+
```bash
16+
sudo pacman -U cbmc-5.7-1-x86_64.pkg.tar.xz`
17+
```

0 commit comments

Comments
 (0)