summaryrefslogtreecommitdiff
path: root/pcr/ocaml-extlib/PKGBUILD
blob: 8c99111c352d0f5ece8c07bbf99a683e56c2fe9c (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
36
37
38
39
40
41
42
43
# Contributor (Arch)     : Patryk Kowalczyk < patryk at kowalczyk dot ws>
# Maintainer  (Parabola) : Aurélien DESBRIÈRES <aurelien@hackers.camp>

pkgname=ocaml-extlib
pkgver=1.5.4
pkgrel=3
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)


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

  # Install additional files
  sed -i 's/ocamlfind install extlib META/ocamlfind install extlib META *.cmo *.cmx *.ml/g' Makefile
}

package () {
  _DOCDIR="${pkgdir}/usr/share/doc/ocaml-extlib"

  cd ${srcdir}/extlib-${pkgver}

  export OCAMLFIND_DESTDIR="${pkgdir}$(ocamlfind printconf destdir)"
  mkdir -p "${OCAMLFIND_DESTDIR}"
  make install
  
  # Install doc
  mkdir -p $_DOCDIR
  cp -r doc/* $_DOCDIR/
}
md5sums=('329041625309b9e49051e5b097a9185d')