# Contributor: Jakub Jirutka # Maintainer: Jakub Jirutka # NOTE: Upstream is slowly renaming jbuilder to dune. pkgname=dune pkgver=1.10.0 pkgrel=0 pkgdesc="A composable build system for OCaml (formerly Jbuilder)" url="https://github.com/ocaml/dune" arch="all !x86 !armhf !armv7 !s390x" # limited by ocaml abuild license="Apache-2.0" checkdepends="bash" makedepends="ocaml ocaml-compiler-libs 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 _boot as symlinks; # dereference them. cd _boot/install/default cp -aL bin/jbuilder "$pkgdir"/usr/bin/ cp -aL lib/dune/* "$pkgdir"/usr/lib/ocaml/jbuilder/ cp -aL doc/dune/* "$pkgdir"/usr/share/doc/$pkgname/ cp -aL man/man1/* "$pkgdir"/usr/share/man/man1/ ln -s jbuilder "$pkgdir"/usr/bin/dune } sha512sums="15c3f5da31ae6062e41cb9e4137b740f8b227b1e59b0f00b9b2f7705bbe517da184835be007e6bb980e3615ce2ac71de67bdda92605caee1cbc0a27f34f67a1e dune-1.10.0.tar.gz"