diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2018-03-06 20:42:32 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2018-03-06 21:07:47 +0100 |
commit | 9643ab347b3df4d02e05b00659e499855c982417 (patch) | |
tree | 30f1e16cc294e36176957d52d66d9d8a515ae48c /testing | |
parent | 03744c9e9ef073310bc7f44ca79b1e67cf9ea52f (diff) | |
download | aports-9643ab347b3df4d02e05b00659e499855c982417.tar.bz2 aports-9643ab347b3df4d02e05b00659e499855c982417.tar.xz |
testing/ocaml-react: new aport
http://erratique.ch/software/react
OCaml framework for Functional Reactive Programming (FRP)
Diffstat (limited to 'testing')
-rw-r--r-- | testing/ocaml-react/APKBUILD | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/testing/ocaml-react/APKBUILD b/testing/ocaml-react/APKBUILD new file mode 100644 index 0000000000..b28972a468 --- /dev/null +++ b/testing/ocaml-react/APKBUILD @@ -0,0 +1,56 @@ +# Contributor: Jakub Jirutka <jakub@jirutka.cz> +# Maintainer: Jakub Jirutka <jakub@jirutka.cz> +pkgname=ocaml-react +_pkgname=react +pkgver=1.2.0 +pkgrel=0 +pkgdesc="OCaml framework for Functional Reactive Programming (FRP)" +url="http://erratique.ch/software/react" +arch="all !x86 !armhf !s390x" # limited by ocaml aport +license="ISC" +makedepends="ncurses ocaml ocaml-findlib ocamlbuild opam" +subpackages="$pkgname-dev $pkgname-doc" +source="$pkgname-$pkgver.tar.gz::https://github.com/dbuenzli/$_pkgname/archive/v$pkgver.tar.gz" +builddir="$srcdir/$_pkgname-$pkgver" + +build() { + cd "$builddir" + + ocaml pkg/build.ml \ + native=true \ + native-dynlink=true + + ocamlbuild -use-ocamlfind test/tests.otarget +} + +check() { + cd "$builddir" + + ./_build/test/test.native +} + +package() { + cd "$builddir" + + opam-installer -i \ + --prefix="$pkgdir/usr" \ + --libdir="$pkgdir/$(ocamlc -where)" \ + --docdir="$pkgdir/usr/share/doc/$pkgname" \ + $_pkgname.install + + # Remove annotation files. + rm -Rf "$pkgdir"/usr/lib/ocaml/$_pkgname/*.cmt* +} + +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="929f0a5e84d6e92c366e3c43c582c48e639eab662f654ff65b4789155e96ce4bdd10c38acfb932a20ddce4042943baa2644934be4d7542a20b801203437c3d21 ocaml-react-1.2.0.tar.gz" |