1 # Contributor: Sergey Plaksin <serp256@gmail.com>
3 pkgname=ocaml-${libname}-git
6 pkgdesc="Extension to OCaml for deriving functions from type declarations. Includes derivers for pretty-printing, type-safe marshalling with structure-sharing, dynamic typing, equality, and more."
8 url="http://code.google./p/deriving"
10 depends=(ocaml ocaml-findlib)
12 provides=("ocaml-$libname")
14 _gitroot="git://repo.or.cz/deriving.git"
20 msg "Connecting to GIT server...."
22 if [ -d $_gitname ] ; then
23 cd $_gitname && git pull origin
24 msg "The local files are updated."
26 git clone $_gitroot $_gitname
29 msg "GIT checkout done or server timeout"
30 msg "Starting make..."
32 rm -rf "$srcdir/$_gitname-build"
33 git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
34 cd "$srcdir/$_gitname-build"
36 make obuild || return 1
38 OCAMLFIND_DESTDIR=$pkgdir$(ocamlfind printconf destdir)
39 mkdir -p $OCAMLFIND_DESTDIR
40 OCAMLFIND_DESTDIR=$OCAMLFIND_DESTDIR make install
41 install -Dm 655 COPYING $pkgdir/usr/share/licenses/$libname/COPYING