aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml-migrate-parsetree
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-03-05 10:15:11 +0100
committerJakub Jirutka <jakub@jirutka.cz>2018-03-05 10:16:28 +0100
commit57ec7b7b66069fcb7ad2b6bb5692c3d88e74465c (patch)
treecaa59b306b4f69b8a12517d1823ef83433f1d78e /testing/ocaml-migrate-parsetree
parentd5589c269ac3283ab447b33304971477611b1c28 (diff)
downloadaports-57ec7b7b66069fcb7ad2b6bb5692c3d88e74465c.tar.bz2
aports-57ec7b7b66069fcb7ad2b6bb5692c3d88e74465c.tar.xz
testing/ocaml-migrate-parsetree: new aport
https://github.com/ocaml-ppx/ocaml-migrate-parsetree Convert OCaml parsetrees between different major versions
Diffstat (limited to 'testing/ocaml-migrate-parsetree')
-rw-r--r--testing/ocaml-migrate-parsetree/APKBUILD70
1 files changed, 70 insertions, 0 deletions
diff --git a/testing/ocaml-migrate-parsetree/APKBUILD b/testing/ocaml-migrate-parsetree/APKBUILD
new file mode 100644
index 0000000000..d99491ea71
--- /dev/null
+++ b/testing/ocaml-migrate-parsetree/APKBUILD
@@ -0,0 +1,70 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=ocaml-migrate-parsetree
+pkgver=1.0.7
+pkgrel=0
+pkgdesc="Convert OCaml parsetrees between different major versions"
+url="https://github.com/ocaml-ppx/ocaml-migrate-parsetree"
+arch="all !x86 !armhf !s390x" # limited by ocaml
+license="LGPL-2.1-only-WITH-linking-exception"
+makedepends="dune ocaml ocamlbuild ocaml-findlib ocaml-result-dev opam"
+subpackages="$pkgname-dev $pkgname-doc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/ocaml-ppx/$pkgname/archive/v$pkgver.tar.gz"
+builddir="$srcdir/$pkgname-$pkgver"
+
+build() {
+ cd "$builddir"
+ jbuilder build @install
+}
+
+check() {
+ cd "$builddir"
+ jbuilder runtest
+}
+
+package() {
+ cd "$builddir"
+
+ mkdir -p "$pkgdir"/usr/lib/ocaml
+ jbuilder install \
+ --destdir="$pkgdir/usr" \
+ --libdir="$pkgdir/usr/lib/ocaml"
+
+ cd "$pkgdir"
+
+ find usr/lib/ocaml -name '*.cmxs' -exec chmod 0755 {} \;
+
+ # Remove compiled tests and some generated code (?).
+ find usr/lib/ocaml \
+ -name '*.cmt' -delete \
+ -o -name '*.cmti' -delete \
+ -o -name '*.ml-gen' -delete
+
+ # Move docs to proper location and remove redundant docs dir.
+ mkdir -p usr/share/doc
+ mv usr/doc/$pkgname usr/share/doc/$pkgname
+ rm -Rf usr/doc/$pkgname-ocamlbuild
+ rmdir usr/doc
+}
+
+dev() {
+ default_dev
+
+ depends="$pkgname=$pkgver-r$pkgrel"
+ local sitelib="usr/lib/ocaml/$pkgname"
+
+ cd "$pkgdir"
+
+ local path; for path in $(find $sitelib*/ \
+ -name '*.cmx' \
+ -o -name '*.cmxa' \
+ -o -name '*.ml' \
+ -o -name '*.mli')
+ do
+ mkdir -p "${path%/*}"
+ mv "$path" "$subpkgdir"/${path%/*}/
+ rmdir "$path" 2>/dev/null || true
+ done
+}
+
+sha512sums="3ba1bfe4840b2664b5053068b3659eb6a2ca216f29ece3f4522d1e7c5d87cb643bfb59ebe0563264cafdc31b9aa572007b4261fd3df8b27607fad47ff6168892 ocaml-migrate-parsetree-1.0.7.tar.gz"