summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ed76a5eb1e4c825ac38d9fb22663e8ae8ffcc3cc (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
# Maintainer: Jakob Gahde <j5lx@fmail.co.uk>

pkgname=ocaml-core
pkgver=112.35.01
pkgrel=1
license=('Apache')
arch=('i686' 'x86_64')
pkgdesc="Industrial strength alternative to OCaml's standard library"
url="https://github.com/janestreet/core"
depends=('ocaml' 'ocaml-bin_prot' 'camlp4' 'ocaml-comparelib' 'ocaml-core_kernel' 'ocaml-custom_printf' 'ocaml-enumerate' 'ocaml-fieldslib' 'ocaml-herelib' 'ocaml-pa_bench' 'ocaml-pa_ounit' 'ocaml-pa_structural_sexp' 'ocaml-pa_test' 'ocaml-pipebang' 'ocaml-sexplib' 'ocaml-variantslib')
optdepends=('ocaml-utop: for coretop support')
makedepends=('ocaml-findlib')
source=("https://ocaml.janestreet.com/ocaml-core/$(echo ${pkgver} | grep -Po "^[0-9]+\.[0-9]+")/files/${pkgname#ocaml-}-${pkgver}.tar.gz")
options=('!strip')
md5sums=('2ae86d0d4571327d9b3393c48f9fc0cc')

build() {
  cd "${srcdir}/${pkgname#ocaml-}-${pkgver}"
  
  ./configure --prefix /usr
  make
}

package() {
  cd "${srcdir}/${pkgname#ocaml-}-${pkgver}"
  
  export OCAMLFIND_DESTDIR="${pkgdir}$(ocamlfind printconf destdir)"
  mkdir -p "${OCAMLFIND_DESTDIR}/stublibs"
  make install
  install -Dm755 "corebuild" "${pkgdir}/usr/bin/corebuild"
  install -Dm755 "coretop" "${pkgdir}/usr/bin/coretop"
}