updated on Tue Jan 10 12:02:00 UTC 2012
[aur-mirror.git] / ocaml-extunix-git / PKGBUILD
blob67bdf8efaa04773e091f637b12e61333ae8dfb29
1 # Maintainer: Serge Ziryukin <ftrvxmtrx@gmail.com>
3 pkgname=ocaml-extunix-git
4 pkgver=20110103
5 pkgrel=1
6 pkgdesc="Thin bindings to various low-level system APIs which are not covered by Unix module"
7 arch=('i686' 'x86_64')
8 url=("http://extunix.forge.ocamlcore.org")
9 # LGPL + linking exception
10 license=('LGPL')
11 depends=('ocaml' 'ocaml-findlib')
12 makedepends=('ocaml' 'ocaml-ounit')
13 provides=('ocaml-extunix')
14 conflicts=('ocaml-extunix')
16 _gitroot="http://git.ocamlcore.org/extunix/extunix.git"
17 _gitname="extunix"
19 build () {
20   OCAMLFIND_DESTDIR="${pkgdir}$(ocamlfind printconf destdir)"
22   cd "$srcdir"
24   msg "Connecting to GIT server..."
26   if [ -d "$srcdir/$_gitname" ]; then
27     cd $_gitname && git pull origin
28     msg "The local files are updated."
29   else
30     git clone $_gitroot
31   fi
33   msg "GIT checkout done or server timeout"
34   msg "Starting make..."
36   cp -rf "$srcdir/$_gitname" "$srcdir/$_gitname-build"
37   cd "$srcdir/$_gitname-build"
39   ./configure --destdir "${OCAMLFIND_DESTDIR}" || return 1
40   make || return 1
43 package () {
44   OCAMLFIND_DESTDIR="${pkgdir}$(ocamlfind printconf destdir)"
46   cd "$srcdir/$_gitname-build"
48   mkdir -p "${OCAMLFIND_DESTDIR}/stublibs"
49   OCAMLFIND_DESTDIR="${OCAMLFIND_DESTDIR}" make install || return 1