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-arp/APKBUILD
2022-05-21 15:28:27 +00:00

90 lines
1.8 KiB
Text

# Contributor: rubicon <rubicon@mailo.com>
# Maintainer:
pkgname=ocaml-arp
_pkgname=arp
pkgver=3.0.0
pkgrel=0
pkgdesc="Address Resolution Protocol purely in OCaml"
url="https://github.com/mirage/arp"
arch="all !riscv64" # limited by ocaml aport
license="ISC"
# ocaml-bisect_ppx only needed for dev
depends="
ocaml-runtime
ocaml-cstruct
ocaml-duration
ocaml-ethernet
ocaml-ipaddr
ocaml-logs
ocaml-mirage-profile
ocaml-mirage-time
"
depends_dev="
$pkgname=$pkgver-r$pkgrel
ocaml-bisect_ppx-dev
ocaml-cstruct-dev
ocaml-duration-dev
ocaml-ethernet-dev
ocaml-ipaddr-dev
ocaml-logs-dev
ocaml-mirage-profile-dev
ocaml-mirage-time-dev
"
makedepends="$depends_dev dune ocaml"
checkdepends="
ocaml-alcotest-dev
ocaml-fmt-dev
ocaml-mirage-clock-unix-dev
ocaml-mirage-flow-dev
ocaml-mirage-random-dev
ocaml-mirage-random-test-dev
ocaml-mirage-time-unix-dev
ocaml-mirage-vnetif-dev
"
options="!check"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.bz2::https://github.com/mirage/arp/releases/download/v$pkgver/arp-v$pkgver.tbz"
builddir="$srcdir/$_pkgname-v$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="
52eb9fdb00729a5b6c1d7dd9d14fca213aecddc6e2893c0e670dea3b31576e6765061f557b6521a065ed15a931f4cbbf432b4db8fe53df40dc801695acd242d4 ocaml-arp-3.0.0.tar.bz2
"