aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-03-11 22:54:22 +0100
committerJakub Jirutka <jakub@jirutka.cz>2018-03-11 22:56:28 +0100
commit8f2ab23616dd5627c1bb6ceae9646a13d8b1eeb3 (patch)
treec54599446b6ce5c4f4451a5d8bbe1fa7ceecad84
parent17067bc7a12d585fe158d26e2a5912a91670a645 (diff)
downloadaports-8f2ab23616dd5627c1bb6ceae9646a13d8b1eeb3.tar.bz2
aports-8f2ab23616dd5627c1bb6ceae9646a13d8b1eeb3.tar.xz
testing/ocaml-yojson: new aport
https://github.com/mjambon/yojson JSON parsing and pretty-printing library for OCaml
-rw-r--r--testing/ocaml-yojson/APKBUILD58
1 files changed, 58 insertions, 0 deletions
diff --git a/testing/ocaml-yojson/APKBUILD b/testing/ocaml-yojson/APKBUILD
new file mode 100644
index 0000000000..72fb2adf3d
--- /dev/null
+++ b/testing/ocaml-yojson/APKBUILD
@@ -0,0 +1,58 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=ocaml-yojson
+_pkgname=yojson
+pkgver=1.4.1
+pkgrel=0
+pkgdesc="JSON parsing and pretty-printing library for OCaml"
+url="https://github.com/mjambon/yojson"
+arch="all !x86 !armhf !s390x" # limited by ocaml aport
+license="BSD-3-Clause"
+depends="ocaml-runtime ocaml-biniou ocaml-easy-format"
+depends_dev="$pkgname=$pkgver-r$pkgrel"
+makedepends="dune ocaml ocaml-biniou-dev ocaml-cppo ocaml-easy-format-dev
+ 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
+
+ # Don't package ydump tool for now.
+ rm -Rf "$pkgdir"/usr/bin
+
+ # 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="9175f2a26993467e587a44ef8af9dba767370536204f0ec56196769c206f92edc27bdfa89b543f90ed33c8a9abaad3342b5296ac5e49d3d7a27561c1cce818d0 ocaml-yojson-1.4.1.tar.gz"