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

pkgname=ocaml-stdint-git
pkgver=20171013
pkgrel=1
pkgdesc="Various signed and unsigned integers for OCaml"
arch=('i686' 'x86_64')
url='https://github.com/andrenth/ocaml-stdint'
license=('MIT')
makedepends=('ocamlbuild' 'ocaml-findlib')
source=("${pkgname}::git://github.com/andrenth/ocaml-stdint.git")
md5sums=('SKIP')

pkgver() {
  cd "$pkgname"
  git log -1 --pretty=format:%cd --date=short | sed 's/-//g'
}

build() {
  cd "$pkgname"

  export OCAMLFIND_DESTDIR="${pkgdir}$(ocamlfind printconf destdir)"

  ocaml setup.ml -configure --destdir "${pkgdir}"
  make all
}

package() {
  cd "$pkgname"

  mkdir -p "${OCAMLFIND_DESTDIR}"

  export OCAMLFIND_LDCONF=FOOBAR
  ocaml setup.ml -install --destdir "$pkgdir"
  rm -r "$pkgdir/usr/local"
}