diff options
-rw-r--r-- | testing/ocaml-ppx_gen_rec/APKBUILD | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/testing/ocaml-ppx_gen_rec/APKBUILD b/testing/ocaml-ppx_gen_rec/APKBUILD new file mode 100644 index 0000000000..ec5f7590d2 --- /dev/null +++ b/testing/ocaml-ppx_gen_rec/APKBUILD @@ -0,0 +1,51 @@ +# Contributor: Jakub Jirutka <jakub@jirutka.cz> +# Maintainer: Jakub Jirutka <jakub@jirutka.cz> +pkgname=ocaml-ppx_gen_rec +_pkgname=ppx_gen_rec +pkgver=1.0.0 +pkgrel=0 +pkgdesc="OCaml preprocessor that generates a recursive module" +url="https://github.com/flowtype/ocaml-ppx_gen_rec" +arch="all !x86 !armhf !s390x" # limited by ocaml aport +license="MIT" +depends="ocaml-runtime ocaml-migrate-parsetree" +makedepends="dune ocaml ocaml-compiler-libs ocaml-findlib ocaml-migrate-parsetree-dev opam" +options="!check" # no tests provided +subpackages="$pkgname-dev" +source="https://github.com/flowtype/$pkgname/archive/v$pkgver/$pkgname-$pkgver.tar.gz" +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" + + # There's just a readme and changelog. + rm -Rf "$pkgdir"/usr/doc + + # Remove annotation files and sources. + cd "$pkgdir"/usr/lib/ocaml/$_pkgname + rm -f *.cmt* *.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="7eb5f131646e984e7e5bd2765604f532772bb2f706fec607581ee10f1ebae4ffb3e032da93550c1ffa7e024690ed06bc2d7355cf66949198ec853ac60fdd5a8e ocaml-ppx_gen_rec-1.0.0.tar.gz" |