blob: 7c0f7f4b2d5527c9de324c1eb2fb5b267453a572 (
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=ocaml-camomile
_pkgname=camomile
pkgver=1.0.1
pkgrel=0
pkgdesc="A Unicode library for OCaml"
url="https://github.com/yoriyuki/Camomile"
# x86, armhf, s390x: limited by ocaml aport
arch="all !x86 !armhf !armv7 !s390x"
license="LGPL-2.0-or-later"
depends="$pkgname-data=$pkgver-r$pkgrel ocaml-runtime"
makedepends="dune ocaml ocaml-compiler-libs ocaml-cppo ocaml-findlib opam"
subpackages="$pkgname-dev $pkgname-data::noarch"
source="$pkgname-$pkgver.tar.gz::https://github.com/yoriyuki/$_pkgname/archive/$pkgver.tar.gz"
builddir="$srcdir/Camomile-$pkgver"
build() {
cd "$builddir"
# Workaround for https://github.com/yoriyuki/Camomile/issues/39.
if [ "$CARCH" = ppc64le ]; then
ulimit -Hs unlimited
ulimit -Ss 65536
fi
jbuilder build @install
}
check() {
cd "$builddir"
jbuilder runtest
}
package() {
cd "$builddir"
mkdir -p "$pkgdir"/usr/lib/ocaml
jbuilder install \
--destdir="$pkgdir/usr" \
--libdir="$pkgdir/usr/lib/ocaml"
# There's just a readme and changelog.
rm -Rf "$pkgdir"/usr/doc
# Remove annotation files and sources.
find "$pkgdir"/usr/lib/ocaml/$_pkgname \( \
-name '*.cmt' -o \
-name '*.cmti' -o \
-name '*.ml' -o \
-name '*.ml-gen' \) -delete
}
dev() {
default_dev
depends="$pkgname=$pkgver-r$pkgrel"
cd "$pkgdir"
local path; for path in $(find usr/lib/ocaml/$_pkgname \
-name '*.cmx' -o \
-name '*.cmxa' -o \
-name '*.mli')
do
mkdir -p "${path%/*}"
mv "$path" "$subpkgdir"/${path%/*}/
done
}
data() {
pkgdesc="$pkgdesc (data files)"
depends=""
mkdir -p "$subpkgdir"/usr/share
mv "$pkgdir"/usr/share/$_pkgname "$subpkgdir"/usr/share/
}
sha512sums="41c453a55d284f879e390ef341482ad5c3dccb1cfd3720fd8513555276dde2397b657c632aa9b02f12f7990adb57bd7c3add637e30606c8f9ab5d28454eddfef ocaml-camomile-1.0.1.tar.gz"
|