blob: e3f96a6317201550143fb341212cfc79e6b351cc (
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
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=ocaml-react
_pkgname=react
pkgver=1.2.1
pkgrel=0
pkgdesc="OCaml framework for Functional Reactive Programming (FRP)"
url="http://erratique.ch/software/react"
arch="all !x86 !armhf !armv7 !s390x" # limited by ocaml aport
license="ISC"
depends="ocaml-runtime"
makedepends="ncurses ocaml ocaml-compiler-libs ocaml-findlib ocaml-topkg ocamlbuild opam"
options="textrels" # needed for ppc64le
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/dbuenzli/$_pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
build() {
cd "$builddir"
ocaml pkg/pkg.ml build --tests true
}
check() {
cd "$builddir"
ocaml pkg/pkg.ml test
}
package() {
cd "$builddir"
opam-installer -i \
--prefix="$pkgdir/usr" \
--libdir="$pkgdir/$(ocamlc -where)" \
$_pkgname.install
# There's just a readme and changelog.
rm -Rf "$pkgdir"/usr/doc
# Remove annotation files and sources.
cd "$pkgdir"/usr/lib/ocaml/$_pkgname
rm -f *.cmt* *.ml
}
dev() {
default_dev
depends="$pkgname=$pkgver-r$pkgrel"
local sitelib="usr/lib/ocaml/$_pkgname"
cd "$pkgdir"/$sitelib
mkdir -p "$subpkgdir"/$sitelib
mv *.cmx *.cmxa *.mli "$subpkgdir"/$sitelib/
}
sha512sums="e760c4504519744b66655be113676cb6e3f016fc8a5c59dca063365223d5d5efc66be3ff2b7a2ad3a745975d1b0aaf37634af699d1a706d3bf3b37c1671e81e3 ocaml-react-1.2.1.tar.gz"
|