aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml-lwt_log
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-07-07 18:38:52 +0200
committerJakub Jirutka <jakub@jirutka.cz>2018-07-07 18:41:29 +0200
commit80bdac34dd896a64f26f3f9718a50a11c050e107 (patch)
tree01cc70edb1a009a76956a2e8b60f610e7a48c0d3 /testing/ocaml-lwt_log
parent0e23be4ba03773bea2a0cb6e97e12bd0d7d7441e (diff)
downloadaports-80bdac34dd896a64f26f3f9718a50a11c050e107.tar.bz2
aports-80bdac34dd896a64f26f3f9718a50a11c050e107.tar.xz
testing/ocaml-lwt_log: new aport
https://github.com/aantron/lwt_log Lwt-friendly logger
Diffstat (limited to 'testing/ocaml-lwt_log')
-rw-r--r--testing/ocaml-lwt_log/APKBUILD55
1 files changed, 55 insertions, 0 deletions
diff --git a/testing/ocaml-lwt_log/APKBUILD b/testing/ocaml-lwt_log/APKBUILD
new file mode 100644
index 0000000000..9f713d1082
--- /dev/null
+++ b/testing/ocaml-lwt_log/APKBUILD
@@ -0,0 +1,55 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=ocaml-lwt_log
+_pkgname=lwt_log
+pkgver=1.1.0
+pkgrel=0
+pkgdesc="Lwt-friendly logger"
+url="https://github.com/aantron/lwt_log"
+arch="all !x86 !armhf !s390x" # limited by ocaml aport
+license="LGPL-2.1-or-later-WITH-linking-exception BSD-3-Clause"
+depends="ocaml-runtime ocaml-lwt>=4.0.0"
+makedepends="dune ocaml ocaml-findlib ocaml-lwt-dev>=4.0.0 opam"
+options="!check" # no tests provided
+subpackages="$pkgname-dev"
+source="https://github.com/aantron/$_pkgname/archive/$pkgver/$_pkgname-$pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-$pkgver"
+
+build() {
+ cd "$builddir"
+ jbuilder build @install
+}
+
+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* */*.cmt* *.ml */*.ml
+}
+
+dev() {
+ default_dev
+ depends="$pkgname=$pkgver-r$pkgrel"
+
+ cd "$pkgdir"
+
+ local path; for path in $(find usr/lib/ocaml/$_pkgname \
+ -name '*.cmx' -o \
+ -name '*.cmxa' -o \
+ -name '*.mli')
+ do
+ mkdir -p "${path%/*}"
+ mv "$path" "$subpkgdir"/${path%/*}/
+ done
+}
+
+sha512sums="fa0ce2928912b55ecbddc14ecd6f6d5db399f7cd6cba5f38d61db4c89ab7345d3e42f8f1292d9a5be973e16fd43d8381d6c269ae47f3692bb64ff567a7039451 lwt_log-1.1.0.tar.gz"