summaryrefslogtreecommitdiff
path: root/community/ocaml-extlib/PKGBUILD
blob: a4517503cc8c577e536c6fc5eda181cfacb73182 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Maintainer: Thomas S Hatch <thatch45 at gmail dot com>
# Contributor: Massimiliano Brocchini <brocchini@netseven.it>

pkgname=ocaml-extlib
pkgver=1.5.1
pkgrel=4
pkgdesc="Extends the OCaml standard library"
arch=('i686' 'x86_64' 'mips64el')
url="http://code.google.com/p/ocaml-extlib/"
license=('LGPL')
depends=('ocaml')
makedepends=('ocaml-findlib')
source=(http://ocaml-extlib.googlecode.com/files/extlib-${pkgver}.tar.gz)
md5sums=('8dc2944cbf63141347956bd353893d75')

_OCAMLFIND_DESTDIR="${pkgdir}/usr/lib/ocaml"
_DOCDIR="${pkgdir}/usr/share/doc/ocaml-extlib"

build() {
  cd ${srcdir}/extlib-${pkgver}
  make all
  make opt
  sed -i 's/cp odoc_style.css/#cp odoc_style.css/g' Makefile
  sed -i 's/ocamldoc -sort -html/ocamldoc -sort -keep-code -html -colorize-code/g' Makefile
  make doc
}

package () {
  cd ${srcdir}/extlib-${pkgver}
  mkdir -p $_OCAMLFIND_DESTDIR/extlib
  mkdir -p $_DOCDIR
  install -m 0644 *.{a,cmxa,cma,cmi,cmo,mli,cmx,ml} $_OCAMLFIND_DESTDIR/extlib
  install -m 0644 META.txt $_OCAMLFIND_DESTDIR/extlib/META
  cp -r doc/* $_DOCDIR/
}