summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6e4bb05e5f7892f27b849ac03a474503d3a7220b (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
# Maintainer: Jakob Gahde <j5lx@fmail.co.uk>

pkgname=ocaml-comparelib
pkgver=113.00.00
pkgrel=1
pkgdesc="OCaml syntax extension for deriving \"compare\" functions automatically"
arch=('i686' 'x86_64')
url="https://github.com/janestreet/comparelib"
license=('Apache')
depends=('ocaml' 'camlp4' 'ocaml-type_conv')
makedepends=('ocaml-findlib')
options=('!strip')
source=("https://ocaml.janestreet.com/ocaml-core/$(echo ${pkgver} | grep -Po "^[0-9]+\.[0-9]+")/files/${pkgname#ocaml-}-${pkgver}.tar.gz")
md5sums=('bdb4f44831e0ba7325a9d0ec2540fa48')

build() {
  cd "${srcdir}/${pkgname#ocaml-}-${pkgver}"

  ./configure --prefix=/usr
  make
}

package() {
  cd "${srcdir}/${pkgname#ocaml-}-${pkgver}"

  OCAMLFIND_DESTDIR="${pkgdir}$(ocamlfind printconf destdir)"
  mkdir -p "$OCAMLFIND_DESTDIR"
  DESTDIR="${pkgdir}" \
    OCAMLFIND_DESTDIR="$OCAMLFIND_DESTDIR" \
    make install
}