summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7d98dfa7a568018fafbabd629aa8d90dd3e53466 (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: Christopher Price <pricechrispy at gmail dot com>
pkgname=ocaml-iostream
pkgver=0.3
pkgrel=1
pkgdesc='generic I/O streams of bytes'
arch=('x86_64')
url='https://c-cube.github.io/ocaml-iostream/'
license=('MIT')
depends=(
'ocaml>=4.08.0'
)
makedepends=(
'dune'
)
options=('!strip' 'staticlibs')
source=("$pkgname-$pkgver.tar.gz::https://github.com/c-cube/$pkgname/archive/v$pkgver.tar.gz")
sha256sums=('142370fb3a43010f940edf96e460086e54611aeb67a0fdcff39a307897c33a8c')

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

    export OCAMLPATH="$(ocamlfind printconf destdir)"

    dune build -p "$pkgname"
}

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

    dune install "$pkgname" --destdir="${pkgdir}" --prefix="/usr" --libdir="$(ocamlfind printconf destdir)"

    install -dm755 "${pkgdir}/usr/share/"

    mv "${pkgdir}/usr/doc" "${pkgdir}/usr/share/"
}