Source

aur / ocaml-lwt / PKGBUILD

Full commit
# Maintainer: Taylor Venable <taylor@metasyntax.net>

srcname='lwt'
pkgname="ocaml-$srcname"
pkgver='2.4.2'
pkgrel=1
pkgdesc="A library for cooperative threads in OCaml"
arch=('i686' 'x86_64')
url="http://ocsigen.org/lwt/"
license=('LGPL')
depends=('ocaml' 'ocaml-findlib' 'ocaml-react' 'libev' 'ocaml-ssl' 'ocaml-text')
source=("http://ocsigen.org/download/$srcname-$pkgver.tar.gz")
md5sums=('0d6eeaa295d62aefaf39e034460bc7b4')
conflicts=('lwt')

build() {
  cd "${srcdir}/${srcname}-${pkgver}"

  echo '<src/top/*.*>: use_compiler_libs' >> _tags
  ./configure --prefix /usr --destdir "$pkgdir" --enable-all

  env DESTDIR="$pkgdir" \
      OCAMLFIND_DESTDIR="${pkgdir}/$(ocamlfind printconf destdir)" \
      make
}


package() {
  mkdir -p "${pkgdir}/$(ocamlfind printconf destdir)"
  mkdir -p "${pkgdir}/$(ocamlfind printconf destdir)/stublibs"

  cd "${srcdir}/${srcname}-${pkgver}"

  env DESTDIR="$pkgdir" \
      OCAMLFIND_DESTDIR="${pkgdir}/$(ocamlfind printconf destdir)" \
      make install
}