diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2018-03-05 01:14:26 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2018-03-05 01:14:26 +0100 |
commit | 6e03802a5a94c75da589651986a0ba322889da49 (patch) | |
tree | c25ba44f3e8562b9ca0cc2954eb7c95465df2ddf /community | |
parent | 945ca243eef686174cd3cd66bf11f55e0271886a (diff) | |
download | aports-6e03802a5a94c75da589651986a0ba322889da49.tar.bz2 aports-6e03802a5a94c75da589651986a0ba322889da49.tar.xz |
community/dune: move from testing
Diffstat (limited to 'community')
-rw-r--r-- | community/dune/APKBUILD | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/community/dune/APKBUILD b/community/dune/APKBUILD new file mode 100644 index 0000000000..f37375c5da --- /dev/null +++ b/community/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_beta18 +_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="71ba5aa9488f8452ca1bfcaba9432404a0fd5a743a85dc5f1f682273f605051a77e97e468f84b08fa5b4c81cc1b7bf1bca63130d80872af69a8f63e0b4c440f9 dune-1.0_beta18.tar.gz" |