summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2d97f83ad5248fb4e457ebf2ac8a1b8a7e6f19c3 (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: d.woffinden
pkgname=z3-git
pkgver=4.8.8.r706.g1c7d27bdf
pkgrel=1
pkgdesc='Z3 is a theorem prover from Microsoft Research'
arch=('i686' 'x86_64')
url='https://github.com/Z3Prover/z3'
license=('MIT')
depends=('gcc-libs')
makedepends=('git' 'python')
optdepends=('python: bindings for python')
conflicts=('z3' 'z3-bin' 'z3-codeplex')
provides=('z3')
source=("$pkgname"::"git+$url")
md5sums=('SKIP')

pkgver() {
  cd "$pkgname"
  git describe --long --tags --match 'z3-*.*.*' | sed 's/z3-//;s/-/.r/;s/-/./'
}

build() {
  # /usr/lib/python3.5/site-packages
  pypath=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")

  # TODO: optionally generate Java/.NET/OCaml bindings?

  cd "$srcdir/$pkgname"
  python scripts/mk_make.py --python --prefix="$pkgdir/usr" --pypkgdir="$pkgdir$pypath"

  cd "$srcdir/$pkgname/build"
  make
}

package() {
  cd "$srcdir/$pkgname/build"
  make install

  cd "$srcdir/$pkgname"
  install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}