1 # This is an example PKGBUILD file. Use this as a start to creating your own,
2 # and remove these comments. For more information, see 'man PKGBUILD'.
3 # NOTE: Please fill out the license field for your package! If it is unknown,
4 # then please put 'unknown'.
6 # See http://wiki.archlinux.org/index.php/VCS_PKGBUILD_Guidelines
7 # for more information on packaging from darcs sources.
9 # Contributor: Sergey Plaksin <serp256 at gmail dot com>
10 pkgname=ocaml-lwt-darcs
13 pkgdesc="A library for cooperative threads in OCaml"
15 url="http://ocsigen.org/lwt/"
17 depends=(libev 'ocaml>=3.11.0' ocaml-findlib react)
20 conflicts=(ocaml-lwt lwt)
21 #source=($pkgname-$pkgver.tar.gz)
22 md5sums=() #generate with 'makepkg -g'
24 _darcstrunk="http://ocsigen.org/darcs"
30 msg "Checking for previous build"
32 if [[ -d $_darcsmod/_darcs ]]
34 msg "Retrieving missing patches"
36 darcs pull -a $_darcstrunk/$_darcsmod
38 msg "Retrieving complete sources"
39 darcs get --partial --set-scripts-executable $_darcstrunk/$_darcsmod
43 rm -rf "$srcdir/$_darcsmod-build"
44 cp -r "$srcdir/$_darcsmod" "$srcdir/$_darcsmod-build"
45 cd "$srcdir/$_darcsmod-build"
51 ocaml setup.ml -configure --prefix /usr
53 mkdir -p "$startdir/pkg/$(ocamlfind printconf destdir)/stublibs"
54 OCAMLFIND_DESTDIR="$pkgdir$(ocamlfind printconf destdir)" ocaml setup.ml -install