summaryrefslogtreecommitdiff
path: root/pcr/ocaml-lwt/PKGBUILD
blob: 8aa9eaaa6f1d2f4d29fe2b2c7481cad64efa00eb (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
45
46
47
# Contributor (Arch)     : Jakob Gahde <j5lx@fmail.co.uk>
# Contributor (Arch)     : Serge Zirukin <ftrvxmtrx@gmail.com>
# Contributor (Arch)     : Sergei Lebedev <superbobry@gmail.com
# Contributor (Arch)     : serp <serp256 at gmail dot com>
# Maintainer  (Parabola) : Aurélien DESBRIÈRES <aurelien@hackers.camp> 

pkgname="ocaml-lwt"
pkgver=2.4.8
pkgrel=1
pkgdesc="A library for cooperative threads in OCaml"
arch=('i686' 'x86_64')
url="http://ocsigen.org/lwt/"
license=('LGPL2.1')
depends=('ocaml' 'ocaml-react' 'ocaml-ssl' 'libev' 'glib2')
makedepends=('ocaml-findlib')
source=(https://github.com/ocsigen/lwt/archive/$pkgver.tar.gz)
sha256sums=('cada92a1c7ce9c678adc67dfa0a8c51f582358e99bbe839ece2decd6866cfa38')
options=(!strip !makeflags staticlibs)

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

  echo '<src/top/*.*>: use_compiler_libs' >> _tags
  # What requires what?
  # --enable-glib      glib2
  # --enable-react     ocaml-react
  # --enable-ssl       ocaml-ssl

  ./configure --enable-react \
              --enable-glib \
              --enable-ssl \
              --disable-debug \
              --prefix /usr \
              --destdir $pkgdir
  make || return 1
}


package() {
  cd "$srcdir/${pkgname/ocaml-/}-$pkgver"

  export OCAMLFIND_DESTDIR="$pkgdir/$(ocamlfind printconf destdir)"

  mkdir -p "$OCAMLFIND_DESTDIR/stublibs"
  make install
  install -Dm 644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
}