aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml-zed
diff options
context:
space:
mode:
Diffstat (limited to 'testing/ocaml-zed')
-rw-r--r--testing/ocaml-zed/APKBUILD51
1 files changed, 51 insertions, 0 deletions
diff --git a/testing/ocaml-zed/APKBUILD b/testing/ocaml-zed/APKBUILD
new file mode 100644
index 0000000000..e44c72fafa
--- /dev/null
+++ b/testing/ocaml-zed/APKBUILD
@@ -0,0 +1,51 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=ocaml-zed
+_pkgname=zed
+pkgver=1.6
+pkgrel=0
+pkgdesc="Abstract engine for text edition in OCaml"
+url="https://github.com/diml/zed"
+arch="all !x86 !armhf !s390x !ppc64le" # limited by ocaml and ocaml-camomile aports
+license="BSD-3-Clause"
+makedepends="dune ocaml ocaml-camomile-dev ocaml-findlib ocaml-react-dev opam"
+options="!check" # no tests provided
+subpackages="$pkgname-dev"
+source="$pkgname-$pkgver.tar.bz2::https://github.com/diml/$_pkgname/releases/download/$pkgver/$_pkgname-$pkgver.tbz"
+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"
+
+ # There's just a readme and changelog.
+ rm -Rf usr/doc
+
+ # Remove annotation files and sources.
+ rm -Rf usr/lib/ocaml/$_pkgname/*.cmt*
+ rm -Rf usr/lib/ocaml/$_pkgname/*.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="e2fa279697a4d01431a7108c07bcbfcebb50ec175da2da5f460ce5d5241f6695e868b49dcdb2c7c944c3a38be891e1f9a97477384cb3663d5615b9a71de357dd ocaml-zed-1.6.tar.bz2"