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

73 lines
1.4 KiB
Text

# Contributor: rubicon <rubicon@mailo.com>
# Maintainer:
pkgname=ocaml-ethernet
_pkgname=ethernet
pkgver=3.0.0
pkgrel=0
pkgdesc="OCaml Ethernet (IEEE 802.3) layer, used in MirageOS"
url="https://github.com/mirage/ethernet"
arch="all !riscv64" # limited by ocaml aport
license="ISC"
depends="
ocaml-runtime
ocaml-cstruct
ocaml-logs
ocaml-ipaddr
ocaml-mirage-net
ocaml-mirage-profile
"
depends_dev="
$pkgname=$pkgver-r$pkgrel
ocaml-cstruct-dev
ocaml-logs-dev
ocaml-ipaddr-dev
ocaml-mirage-net-dev
ocaml-mirage-profile-dev
"
makedepends="$depends_dev dune ocaml"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.bz2::https://github.com/mirage/ethernet/releases/download/v$pkgver/ethernet-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="
171d061b16f2e00b9caa3dfc1cd9b5b358d380e892281ac5c137dc2a3119c3fa288ea927dcb4e9efbcf4850f6857ed0d4b754f56dbb248c1c6150779e57d24e4 ocaml-ethernet-3.0.0.tar.bz2
"