summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9ea0fd981695e4e2eab883e211943552bff03f0d (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: Matej Grabovsky <matej.grabovsky at gmail>
pkgname=ocaml-gen
pkgver=0.5.2
pkgrel=3
pkgdesc='Iterators for OCaml'
license=('BSD')
arch=('i686' 'x86_64')
url='https://github.com/c-cube/gen/'
depends=('ocaml')
makedepends=('ocaml-findlib' 'dune')
source=("https://github.com/c-cube/gen/archive/${pkgver}.tar.gz")
options=(!strip !makeflags)
sha256sums=('8246738ca19810192f005b6e350605aae5132a6a55848795ee1fa002addf1b06')

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

    # TODO: Remove once gen supports building with dune. jbuilder is deprecated.
    jbuilder build @install
}

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

    PREFIX="$pkgdir$(ocamlfind printconf destdir)"

    dune install --prefix="$PREFIX" --libdir="$PREFIX"
    install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

# vim:set et sw=4 sts=4 et: