blob: 11f775351c4181fe97c371d6c47e178b1c5a64e0 (
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
44
45
46
47
48
49
50
51
52
53
54
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=ocaml-result
_pkgname=result
pkgver=1.3
pkgrel=0
pkgdesc="Compat result type"
url="https://github.com/janestreet/result"
arch="all !x86 !armhf !s390x" # limited by ocaml
license="BSD-3-Clause"
makedepends="dune ocaml ocaml-findlib opam"
options="!check" # no tests provided
subpackages="$pkgname-dev $pkgname-doc"
source="https://github.com/janestreet/$_pkgname/archive/$pkgver/$pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
build() {
cd "$builddir"
jbuilder build @install
}
package() {
cd "$builddir"
mkdir -p "$pkgdir"/usr/lib/ocaml
jbuilder install \
--destdir="$pkgdir/usr" \
--libdir="$pkgdir/usr/lib/ocaml"
cd "$pkgdir"
# Remove compiled tests.
rm usr/lib/ocaml/$_pkgname/*.cmt
# Move docs to proper location.
mkdir -p usr/share/doc
mv usr/doc/$_pkgname usr/share/doc/$pkgname
rmdir usr/doc
}
dev() {
depends="$pkgname=$pkgver-r$pkgrel"
local sitelib="usr/lib/ocaml/$_pkgname"
default_dev
cd "$pkgdir"/$sitelib
# May not be created if native compiler is N/A for this platform.
mkdir -p "$subpkgdir"/$sitelib
mv *.cmx *.cmxa *.ml "$subpkgdir"/$sitelib/ || true
}
sha512sums="eb65e5c3e122db1bb477169d83efc7e02b0c72d3ffdb0cdadf7fc92e28c4e3843d8a0ed28133641cbcb239236fa5c83144610c5de713db5c8f63d9f433d37ba9 ocaml-result-1.3.tar.gz"
|