aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml-biniou
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-03-11 22:05:06 +0100
committerJakub Jirutka <jakub@jirutka.cz>2018-03-11 22:56:28 +0100
commit17067bc7a12d585fe158d26e2a5912a91670a645 (patch)
treea66b4bee086c9451f0017d0ec9814d9e0ce9684c /testing/ocaml-biniou
parentbbba33b4ccecf24a848a5fd8747760a298ea64e5 (diff)
downloadaports-17067bc7a12d585fe158d26e2a5912a91670a645.tar.bz2
aports-17067bc7a12d585fe158d26e2a5912a91670a645.tar.xz
testing/ocaml-biniou: new aport
https://github.com/mjambon/biniou Extensible binary data format, like JSON but faster
Diffstat (limited to 'testing/ocaml-biniou')
-rw-r--r--testing/ocaml-biniou/APKBUILD56
1 files changed, 56 insertions, 0 deletions
diff --git a/testing/ocaml-biniou/APKBUILD b/testing/ocaml-biniou/APKBUILD
new file mode 100644
index 0000000000..3d26b92f15
--- /dev/null
+++ b/testing/ocaml-biniou/APKBUILD
@@ -0,0 +1,56 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=ocaml-biniou
+_pkgname=biniou
+pkgver=1.2.0
+pkgrel=0
+pkgdesc="Extensible binary data format, like JSON but faster"
+url="https://github.com/mjambon/biniou"
+arch="all !x86 !armhf !s390x" # limited by ocaml aport
+license="BSD-3-Clause"
+depends="ocaml-runtime ocaml-easy-format"
+depends_dev="$pkgname=$pkgver-r$pkgrel"
+makedepends="dune ocaml 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
+
+ # Remove annotation files and sources.
+ cd "$pkgdir"/usr/lib/ocaml/$_pkgname
+ rm -f *.cmt* *.ml
+}
+
+dev() {
+ local sitelib="usr/lib/ocaml/$_pkgname"
+ default_dev
+
+ mkdir -p "$subpkgdir"/$sitelib
+
+ mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
+
+ cd "$pkgdir"/$sitelib
+ mv *.cmx *.cmxa *.mli "$subpkgdir"/$sitelib/
+}
+
+sha512sums="04c04c2dd5e3e1237106db257567ba6900bd94759b07b02ba2e0d9209d1bbdc9ed629864e06d44a8b61f72d46fbcc7a0ffc86f82feb223d9d99ca41afc625fab ocaml-biniou-1.2.0.tar.gz"