summaryrefslogtreecommitdiffstats
path: root/abs/extra/ocaml-result/PKGBUILD
blob: fe58323062238ec6c48ccf37c38fee91812e1269 (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
# Maintainer: Jürgen Hötzel <juergen@archlinux.org>

_pkgname=result
pkgname=ocaml-${_pkgname}
pkgver=1.3
pkgrel=2
pkgdesc="Compatibility Result module"
arch=('i686' 'x86_64' 'armv7h')
url="https://github.com/janestreet/result"
license=('BSD')
depends=('ocaml')
makedepends=('ocaml-findlib' 'dune')
options=('!strip')
source=("https://github.com/janestreet/result/archive/${pkgver}.tar.gz")
sha256sums=('47a4a7abca084ac844716b047d4b26eacbd96174034c8836f35cd400e84c8db4')

build() {
  cd "${srcdir}/${_pkgname}-${pkgver}"
  jbuilder build
}


package() {
  cd "${srcdir}/${_pkgname}-${pkgver}"

  install -dm755 "${pkgdir}$(ocamlfind printconf destdir)"
  jbuilder install --prefix "${pkgdir}/usr" \
    --libdir "${pkgdir}$(ocamlfind printconf destdir)"

  install -Dm644 "LICENSE.md" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md"
  mv "${pkgdir}/usr/doc" "${pkgdir}/usr/share/"
}