aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml-easy-format
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-03-11 21:54:33 +0100
committerJakub Jirutka <jakub@jirutka.cz>2018-03-11 22:56:28 +0100
commitbbba33b4ccecf24a848a5fd8747760a298ea64e5 (patch)
tree97cfca938f6520fa14c6f993b474529426761e89 /testing/ocaml-easy-format
parent6434ec0ad1003158a1cc6f4725151f93ae9258e4 (diff)
downloadaports-bbba33b4ccecf24a848a5fd8747760a298ea64e5.tar.bz2
aports-bbba33b4ccecf24a848a5fd8747760a298ea64e5.tar.xz
testing/ocaml-easy-format: new aport
https://mjambon.github.io/mjambon2016/easy-format.html Pretty-printing library for OCaml
Diffstat (limited to 'testing/ocaml-easy-format')
-rw-r--r--testing/ocaml-easy-format/APKBUILD54
1 files changed, 54 insertions, 0 deletions
diff --git a/testing/ocaml-easy-format/APKBUILD b/testing/ocaml-easy-format/APKBUILD
new file mode 100644
index 0000000000..237ac9e3ee
--- /dev/null
+++ b/testing/ocaml-easy-format/APKBUILD
@@ -0,0 +1,54 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=ocaml-easy-format
+_pkgname=easy-format
+pkgver=1.3.1
+pkgrel=0
+pkgdesc="Pretty-printing library for OCaml"
+url="https://mjambon.github.io/mjambon2016/easy-format.html"
+arch="all !x86 !armhf !s390x" # limited by ocaml aport
+license="BSD-3-Clause"
+depends="ocaml-runtime"
+depends_dev="$pkgname=$pkgver-r$pkgrel"
+makedepends="dune ocaml ocaml-findlib opam"
+subpackages="$pkgname-dev"
+source="$pkgname-$pkgver.tar.gz::https://github.com/mjambon/$_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
+
+ # 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() {
+ local sitelib="usr/lib/ocaml/$_pkgname"
+ default_dev
+
+ cd "$pkgdir"/$sitelib
+
+ mkdir -p "$subpkgdir"/$sitelib
+ mv *.cmx *.cmxa *.mli "$subpkgdir"/$sitelib/
+}
+
+sha512sums="d8d5dc3ca53a84dc242869a09b3f485ca43a8260c6bae79c9e1cbd3751ddc3c4e5cca7582b987ff12980adb7a385261f53169349c0334782ea5c3412d4ed3ab2 ocaml-easy-format-1.3.1.tar.gz"