summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3f450898ef73cf237d22bcd16aced0e1299160b4 (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
pkgname=psmt2-frontend-git
pkgver=0.1
pkgrel=1
pkgdesc="A simple parser and type-checker for polomorphic extension of the SMT-LIB 2 language"
arch=('i686' 'x86_64')
url="https://github.com/Coquera/psmt2-frontend"
license=('Apache2')
depends=('ocaml')
makedepends=('ocaml' 'ocaml-menhir')
options=(!strip staticlibs)


# TODO: update from Coquera to mewpull when PR #4 is merged.
_gitroot="https://github.com/Coquera/psmt2-frontend.git"
_gitname="psmt2-frontend"

build() {
  cd "$srcdir"

  if [ -d "$srcdir/$_gitname" ]; then
    cd $_gitname && git pull origin
    msg "The local files are updated."
  else
    git clone $_gitroot
  fi

  msg "GIT checkout done or server timeout"
  msg "Starting make..."


  cp -rf "$srcdir/$_gitname" "$srcdir/$_gitname-build"
  cd "$srcdir/$_gitname-build"

  autoconf
  ./configure --prefix=/usr
  make
}

package() {
  cd "$srcdir/$_gitname-build"

  mkdir -p "$pkgdir/usr/lib/ocaml/psmt2-frontend"
  make DESTDIR="$pkgdir/usr" LIBDIR="$pkgdir/usr/lib/ocaml" install
}