mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-05 04:47:14 +02:00
leaving the Maintainer comment there for better visual cues, syntax highlighting, and easy conversion to a Contributor comment since Contributor comments are not being removed, just treat my Maintainer comments like Contributor ones, as a normal comment
85 lines
1.8 KiB
Text
85 lines
1.8 KiB
Text
# Contributor: rubicon <rubicon@mailo.com>
|
|
# Maintainer: Celeste <cielesti@protonmail.com>
|
|
maintainer="Celeste <cielesti@protonmail.com>"
|
|
pkgname=ocaml-ethernet
|
|
_pkgname=ethernet
|
|
pkgver=3.0.0
|
|
pkgrel=3
|
|
pkgdesc="OCaml Ethernet (IEEE 802.3) layer, used in MirageOS"
|
|
url="https://github.com/mirage/ethernet"
|
|
arch="all !riscv64 !loongarch64" # ocaml
|
|
license="ISC"
|
|
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; find $_ocamldir \( \
|
|
-name '*.cmt' -o \
|
|
-name '*.cmti' -o \
|
|
-name '*.ml' -o \
|
|
-name '*.mli' \
|
|
\) | while read -r path
|
|
do
|
|
amove "$path"
|
|
done
|
|
}
|
|
|
|
prepare_py_provides() {
|
|
local datadir="${subpkgdir:-$pkgdir}"
|
|
local pkgbasedir=${pkgbasedir:-"$startdir/pkg"}
|
|
local controldir="$pkgbasedir"/.control.${subpkgname:-$pkgname}
|
|
|
|
options_has "!tracedeps" && return 0
|
|
|
|
ocaml4-abuild-find provides \
|
|
"$datadir"/usr/lib/ocaml \
|
|
"$controldir" \
|
|
"$pkgver-r$pkgrel"
|
|
}
|
|
|
|
scan_python3_dependency() {
|
|
local controldir="$2" datadir="$3"
|
|
|
|
ocaml4-abuild-find requires \
|
|
"$datadir"/usr/lib/ocaml \
|
|
"$controldir"
|
|
}
|
|
|
|
sha512sums="
|
|
171d061b16f2e00b9caa3dfc1cd9b5b358d380e892281ac5c137dc2a3119c3fa288ea927dcb4e9efbcf4850f6857ed0d4b754f56dbb248c1c6150779e57d24e4 ocaml-ethernet-3.0.0.tar.bz2
|
|
"
|