1 # Maintainer: Sergei Lebedev <superbobry@gmail.com>
2 pkgname=ocaml-binary-git
5 pkgdesc="Binary serialization of OCaml numeric types to and from strings."
7 url="https://github.com/superbobry/ocaml-binary"
9 depends=('ocaml' 'ocaml-findlib')
11 provides=('ocaml-binary')
12 conflicts=('ocaml-binary')
14 _gitroot="https://github.com/superbobry/ocaml-binary.git"
15 _gitname=${pkgname/-git/}
19 OCAMLFIND_DESTDIR="${pkgdir}$(ocamlfind printconf destdir)"
23 msg "Connecting to GIT server..."
25 if [ -d "$srcdir/$_gitname" ]; then
26 cd $_gitname && git pull origin
27 msg "The local files are updated."
32 msg "GIT checkout done or server timeout"
33 msg "Starting make..."
35 cp -rf "$srcdir/$_gitname" "$srcdir/$_gitname-build"
36 cd "$srcdir/$_gitname-build"
38 ocaml setup.ml -configure --prefix /usr --destdir ${pkgdir} --disable-tests
43 OCAMLFIND_DESTDIR="${pkgdir}$(ocamlfind printconf destdir)"
45 cd "$srcdir/$_gitname-build"
47 mkdir -p "${OCAMLFIND_DESTDIR}/stublibs"
48 OCAMLFIND_DESTDIR="${OCAMLFIND_DESTDIR}" ocaml setup.ml -install || return 1