blob: ae5c91e2959b13d6d83eaf1bd678d1675967f582 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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 !armv7 !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"
|