aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-02-07 16:14:54 +0100
committerJakub Jirutka <jakub@jirutka.cz>2018-02-07 16:15:25 +0100
commitafe77c51e5bf5b017a4b3782fd9107235efd0f94 (patch)
tree3e73366bfef5bea8d2d2fbc32ebb86e55e67d2ad /testing
parent5c3834f1bd2c3c2ff21279c393f95f8ac7c9474c (diff)
downloadaports-afe77c51e5bf5b017a4b3782fd9107235efd0f94.tar.bz2
aports-afe77c51e5bf5b017a4b3782fd9107235efd0f94.tar.xz
testing/dune: new aport
https://github.com/ocaml/dune A composable build system for OCaml (formerly Jbuilder)
Diffstat (limited to 'testing')
-rw-r--r--testing/dune/APKBUILD53
1 files changed, 53 insertions, 0 deletions
diff --git a/testing/dune/APKBUILD b/testing/dune/APKBUILD
new file mode 100644
index 0000000000..6c1756c9c9
--- /dev/null
+++ b/testing/dune/APKBUILD
@@ -0,0 +1,53 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+# NOTE: Upstream is slowly renaming jbuilder to dune.
+pkgname=dune
+pkgver=1.0_beta17
+_pkgver=${pkgver/_/+}
+pkgrel=0
+pkgdesc="A composable build system for OCaml (formerly Jbuilder)"
+url="https://github.com/ocaml/dune"
+arch="all !x86 !armhf !s390x" # limited by ocaml abuild
+license="Apache-2.0"
+checkdepends="bash"
+makedepends="ocaml ocaml-findlib-dev"
+provides="jbuilder=$pkgver-r$pkgrel"
+subpackages="$pkgname-doc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/ocaml/$pkgname/archive/$_pkgver.tar.gz"
+builddir="$srcdir/$pkgname-${_pkgver/+/-}"
+options="!check" # FIXME requires ocaml-menhir
+
+build() {
+ cd "$builddir"
+ make release
+}
+
+check() {
+ cd "$builddir"
+ make test
+}
+
+# dune's makefile has a "make install" target. Tragically, it uses
+# opam-install(er) to install itself. Even more tragically, opam now requires
+# dune to build. Therefore as a workaround we can just manually install things
+# ourselves - dune is *mostly* just a binary, making this easy.
+package() {
+ cd "$builddir"
+
+ mkdir -p "$pkgdir"/usr/bin \
+ "$pkgdir"/usr/lib/ocaml/jbuilder \
+ "$pkgdir"/usr/share/doc/$pkgname \
+ "$pkgdir"/usr/share/man/man1
+
+ # The files to install are stored in _build as symlinks;
+ # dereference them.
+ cd _build/install/default
+ cp -aL bin/jbuilder "$pkgdir"/usr/bin/
+ cp -aL lib/jbuilder/* "$pkgdir"/usr/lib/ocaml/jbuilder/
+ cp -aL doc/jbuilder/* "$pkgdir"/usr/share/doc/$pkgname/
+ cp -aL man/man1/* "$pkgdir"/usr/share/man/man1/
+
+ ln -s jbuilder "$pkgdir"/usr/bin/dune
+}
+
+sha512sums="2f51825482e6f26c3e037b87b0e25367bd08dcee14c736f1d368b641a096a3bf0399169013603b6e8707e2a9bd1a931f094d4d04d67eb40d66fae3c80b063760 dune-1.0_beta17.tar.gz"