2023-04-02 19:00:55 +02:00

74 lines
1.5 KiB
Plaintext

# Contributor: rubicon <rubicon@mailo.com>
# Maintainer:
pkgname=ocaml-logs
_pkgname=logs
pkgver=0.7.0
pkgrel=2
pkgdesc="Logging infrastructure for OCaml"
url="https://erratique.ch/software/logs"
arch="all !riscv64" # restricted by ocaml
license="ISC"
depends="ocaml-runtime"
depends_dev="$pkgname=$pkgver-r$pkgrel"
makedepends="
ocaml
ocamlbuild
ocaml-compiler-libs
ocaml-findlib
ocaml-topkg
ocaml-fmt-dev
ocaml-cmdliner-dev
ocaml-lwt-dev
ocaml-seq-dev
cmd:opam-installer
"
options="!check" # require mtime
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.bz2::https://erratique.ch/software/logs/releases/logs-$pkgver.tbz"
builddir="$srcdir/$_pkgname-$pkgver"
_ocamldir=usr/lib/ocaml
# 32-bit archs
case "$CARCH" in
arm*|x86) options="$options textrels" ;;
esac
build() {
ocaml pkg/pkg.ml build \
--with-fmt true \
--with-cmdliner true \
--with-lwt true \
--with-base-threads true \
--with-js_of_ocaml false
}
package() {
opam-installer -i \
--prefix="$pkgdir/usr" \
--libdir="$pkgdir/$_ocamldir" \
--docdir="$builddir/.omit" \
$_pkgname.install
}
dev() {
default_dev
cd "$pkgdir"
local path; for path in $(find $_ocamldir \( \
-name '*.cmt' -o \
-name '*.cmti' -o \
-name '*.cmx' -o \
-name '*.cmxa' -o \
-name '*.ml' -o \
-name '*.mli' \
\))
do
amove "$path"
done
}
sha512sums="
657f66eeaf5788947a3ff4b2a179f7e192ad4ce086fc8968286066d4b83af476523b3befce50ee58abf2d9b8c8dc65573ba8ed62f9c5e7933db29a7fb769646a ocaml-logs-0.7.0.tar.bz2
"