updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / ocaml-deriving-git / PKGBUILD
blob87c59712cf0042f6b52c5e37f297ef235a71df1c
1 # Contributor: Sergey Plaksin <serp256@gmail.com>
2 libname=deriving
3 pkgname=ocaml-${libname}-git
4 pkgver=20100218
5 pkgrel=2
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."
7 arch=(i686 x86_64)
8 url="http://code.google./p/deriving"
9 license=('MIT')
10 depends=(ocaml ocaml-findlib)
11 makedepends=('git')
12 provides=("ocaml-$libname")
14 _gitroot="git://repo.or.cz/deriving.git"
15 _gitname=$libname
17 libver="0.1.1b"
18 build() {
19   cd "$srcdir"
20   msg "Connecting to GIT server...."
22   if [ -d $_gitname ] ; then
23     cd $_gitname && git pull origin
24     msg "The local files are updated."
25   else
26     git clone $_gitroot $_gitname
27   fi
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