aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml-ppx_gen_rec
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-07-21 23:16:09 +0200
committerJakub Jirutka <jakub@jirutka.cz>2018-07-21 23:25:51 +0200
commit434256dbd579e3fa2feb21e287ca25480ae97fa6 (patch)
tree6c16624f7346e924f800366bd901bd5c6df42397 /testing/ocaml-ppx_gen_rec
parentc0020560522c992b943b34301cf4cf28349df134 (diff)
downloadaports-434256dbd579e3fa2feb21e287ca25480ae97fa6.tar.bz2
aports-434256dbd579e3fa2feb21e287ca25480ae97fa6.tar.xz
testing/ocaml-ppx_gen_rec: new aport
https://github.com/flowtype/ocaml-ppx_gen_rec OCaml preprocessor that generates a recursive module
Diffstat (limited to 'testing/ocaml-ppx_gen_rec')
-rw-r--r--testing/ocaml-ppx_gen_rec/APKBUILD51
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"