summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 184d23f73e925994910f3873139d6a085caa11c4 (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
# Maintainer: Mort Yao <soi@mort.ninja>

pkgname=fstar
pkgver=0.9.4.0
pkgrel=2
pkgdesc='A Higher-Order Effectful Language Designed for Program Verification'
url='https://fstar-lang.org/'
license=('Apache')
arch=('i686' 'x86_64')
depends=('z3' 'zarith' 'ocaml-yojson' 'ocaml-pprint')
makedepends=('fsharp' 'ocaml>=4.02' 'ocaml-batteries' 'ocaml-findlib')
provides=('fstar')
conflicts=('fstar-bin' 'fstar-git')
source=("https://github.com/FStarLang/FStar/archive/v$pkgver.zip")
md5sums=('f9bd0fedbb78f3e853856314e90ec824')

build() {
  cd "FStar-$pkgver"

  # Step 1. Building F* from sources using the F# compiler
  make -C src
  # Step 2. Extracting the sources of F* itself to OCaml
  make ocaml -C src
  # Step 3. Building F* from the OCaml snapshot
  make -C src/ocaml-output
}

package() {
  cd "FStar-$pkgver"

  install -d -m755 $pkgdir/opt/fstar $pkgdir/usr/bin
  cp -r * $pkgdir/opt/fstar
  ln -s /opt/fstar/bin/fstar.exe $pkgdir/usr/bin/fstar
}