1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-24 19:55:26 +03:00
aports/testing/ocaml-bitstring/APKBUILD

60 lines
1.3 KiB
Text

# Contributor: rubicon <rubicon@mailo.com>
# Maintainer:
pkgname=ocaml-bitstring
_pkgname=bitstring
pkgver=4.1.0
pkgrel=1
pkgdesc="Erlang-style bitstrings for OCaml"
url="https://github.com/xguerin/bitstring"
arch="all !riscv64" # limited by ocaml aport
license="LGPL-2.0-or-later"
depends="ocaml-runtime ocaml-ppxlib ocaml-stdlib-shims"
depends_dev="$pkgname=$pkgver-r$pkgrel ocaml-ppxlib-dev"
makedepends="$depends_dev dune ocaml"
options="!check" # needs oUnit
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/xguerin/bitstring/archive/v$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
_ocamldir=usr/lib/ocaml
# 32-bit archs
case "$CARCH" in
arm*|x86) options="$options textrels" ;;
esac
build() {
dune build --release --verbose
}
check() {
dune runtest --verbose
}
package() {
dune install \
--destdir="$pkgdir" \
--docdir=/.omit
rm -Rf "$pkgdir"/.omit
}
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="
808c2f1e12286a0a346d52b0a72008e248a3ca0fd9f99b8db9f38929d25492bcb6e65ecb7e7339c23269dd948c51e5f0fc917b13adc0c497ea4d4e5c0ed7d250 ocaml-bitstring-4.1.0.tar.gz
"