updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / macaque-darcs / PKGBUILD
blob36eab6379ce39d00116825cfdfbc853eacb97b2d
1 # Maintainer: spider-mario <spidermario@free.fr>
2 pkgname=macaque-darcs
3 pkgver=20111015
4 pkgrel=1
5 pkgdesc="DSL for OCaml which produces SQL queries from a comprehension syntax"
6 arch=('any')
7 url="http://ocsigen.org/macaque/"
8 license=('custom:LGPL')
9 depends=('ocaml' 'pgocaml')
10 makedepends=('darcs' 'ocaml-findlib')
11 options=('!strip' '!makeflags')
13 _darcstrunk="http://forge.ocamlcore.org/anonscm/darcs/macaque"
14 _darcsmod="macaque"
16 build() {
17   cd "$srcdir"
19   msg "Checking for previous build"
21   if [[ -d $_darcsmod/_darcs ]]
22   then
23     msg "Retrieving missing patches"
24     cd $_darcsmod
25     darcs pull -a $_darcstrunk/$_darcsmod
26   else
27     msg "Retrieving complete sources"
28     darcs get --lazy --set-scripts-executable $_darcstrunk/$_darcsmod
29     cd $_darcsmod
30   fi
32   rm -rf "$srcdir/$_darcsmod-build"
33   cp -r "$srcdir/$_darcsmod" "$srcdir/$_darcsmod-build"
34   cd "$srcdir/$_darcsmod-build/src"
36   msg "Starting build"
38   make
41 package() {
42   cd "$srcdir/$_darcsmod-build/src"
43   install --directory "$pkgdir/usr/lib/ocaml/"
44   install --directory "$pkgdir/usr/share/licenses/$pkgname/"
45   install --mode=644 ../LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
46   ocamlfind install -destdir "$pkgdir/usr/lib/ocaml/" macaque META \
47         _build/sql_base.cmi _build/sql_types.cmi _build/sql_parsers.cmi \
48         _build/sql_printers.cmi _build/sql_builders.cmi _build/sql_public.cmi \
49         _build/inner_sql.cmi \
50         _build/sql.cmi _build/check.cmi _build/query.cmi \
51         _build/macaque.cma \
52         _build/pa_macaque.cmo _build/pa_bananas.cmo