1 # Maintainer: Serge Ziryukin <ftrvxmtrx@gmail.com>
3 pkgname=ocaml-omagic-git
6 pkgdesc="OCaml bindings to libmagic"
8 url=("http://github.com/ftrvxmtrx/omagic")
9 # MIT + linking exception
11 depends=('ocaml' 'ocaml-findlib')
13 provides=('ocaml-omagic')
14 conflicts=('ocaml-omagic')
16 _gitroot="git://github.com/ftrvxmtrx/omagic.git"
22 msg "Connecting to GIT server..."
24 if [ -d "$srcdir/$_gitname" ]; then
25 cd $_gitname && git pull origin
26 msg "The local files are updated."
31 msg "GIT checkout done or server timeout"
32 msg "Starting make..."
34 cp -rf "$srcdir/$_gitname" "$srcdir/$_gitname-build"
35 cd "$srcdir/$_gitname-build"
37 ./configure --docdir "$pkgdir/usr/share/doc/ocaml-omagic" || return 1
38 make all doc || return 1
42 destdir="${pkgdir}$(ocamlfind printconf destdir)"
44 cd "$srcdir/$_gitname-build"
46 mkdir -p "${destdir}/stublibs"
47 OCAMLFIND_DESTDIR="${destdir}" make install || return 1