aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml-markup
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-03-11 16:32:37 +0100
committerJakub Jirutka <jakub@jirutka.cz>2018-03-11 21:37:43 +0100
commit914ed43c2d51081a0d2272846ee6dee4c93e1f12 (patch)
tree40e629562de6cd75ee9e705607f5a9217769ea66 /testing/ocaml-markup
parent1e900953c0d5611c1a98cb0c55b4183a2253055b (diff)
downloadaports-914ed43c2d51081a0d2272846ee6dee4c93e1f12.tar.bz2
aports-914ed43c2d51081a0d2272846ee6dee4c93e1f12.tar.xz
testing/ocaml-markup: new aport
http://aantron.github.io/markup.ml Error-recovering streaming HTML5 and XML parsers for OCaml
Diffstat (limited to 'testing/ocaml-markup')
-rw-r--r--testing/ocaml-markup/APKBUILD63
1 files changed, 63 insertions, 0 deletions
diff --git a/testing/ocaml-markup/APKBUILD b/testing/ocaml-markup/APKBUILD
new file mode 100644
index 0000000000..3c68e1c0f8
--- /dev/null
+++ b/testing/ocaml-markup/APKBUILD
@@ -0,0 +1,63 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=ocaml-markup
+_pkgname=markup.ml
+pkgver=0.7.6
+pkgrel=0
+pkgdesc="Error-recovering streaming HTML5 and XML parsers for OCaml"
+url="http://aantron.github.io/markup.ml"
+arch="all !x86 !armhf !s390x" # limited by ocaml aport
+license="BSD-2-Clause"
+depends="ocaml-runtime ocaml-lwt ocaml-uchar ocaml-uutf"
+depends_dev="$pkgname=$pkgver-r$pkgrel"
+checkdepends="ocaml-result-dev ocaml-ounit-dev"
+makedepends="dune ocaml ocaml-findlib ocaml-lwt-dev ocaml-uchar-dev
+ ocaml-uutf-dev opam"
+subpackages="$pkgname-dev"
+source="$pkgname-$pkgver.tar.gz::https://github.com/aantron/$_pkgname/archive/$pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-$pkgver"
+
+build() {
+ cd "$builddir"
+
+ ocaml src/configure.ml
+ jbuilder build @install
+}
+
+check() {
+ cd "$builddir"
+
+ jbuilder runtest --no-buffer -j1
+}
+
+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.
+ find "$pkgdir"/usr/lib/ocaml \
+ \( -name '*.cmt' -o -name '*.cmti' -o -name '*.ml' \) \
+ -a -delete
+}
+
+dev() {
+ local sitelib="usr/lib/ocaml/markup"
+ default_dev
+
+ cd "$pkgdir"
+
+ local path
+ for path in $(find $sitelib -name '*.cmx' -o -name '*.cmxa' -o -name '*.mli*'); do
+ mkdir -p "${path%/*}"
+ mv "$path" "$subpkgdir"/${path%/*}/
+ done
+}
+
+sha512sums="dcb06d0d271677842f76f3eabd64ac4aefbd8c8194c0ca8732d32120b4f1026378f989c2979706f752d3df45f878194283bd2754023033b61063878de4deb319 ocaml-markup-0.7.6.tar.gz"