aports/testing/ocaml-uuseg/APKBUILD
Celeste 40ea6c48d7 */*: add maintainer variable for aports i maintain
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
2024-10-16 16:20:45 +00:00

94 lines
2 KiB
Text

# Contributor: rubicon <rubicon@mailo.com>
# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=ocaml-uuseg
_pkgname=uuseg
pkgver=14.0.0
pkgrel=2
pkgdesc="Unicode text segmentation for OCaml"
url="https://erratique.ch/software/uuseg"
arch="all !riscv64 !loongarch64" # ocaml
license="ISC"
depends_dev="$pkgname=$pkgver-r$pkgrel ocaml-uucp-dev ocaml-uutf-dev"
makedepends="
$depends_dev
ocaml
ocamlbuild
ocaml-compiler-libs
ocaml-cmdliner-dev
ocaml-findlib
ocaml-topkg
cmd:opam-installer
"
options="!check" # no tests provided
subpackages="$pkgname-dev $pkgname-tools"
source="$pkgname-$pkgver.tar.bz2::https://erratique.ch/software/uuseg/releases/uuseg-$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-uutf true \
--with-cmdliner true
}
package() {
opam-installer -i \
--prefix="$pkgdir"/usr \
--libdir="$pkgdir/$_ocamldir" \
--docdir="$builddir"/.omit \
$_pkgname.install
}
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
}
tools() {
pkgdesc="$pkgdesc (command line utilities)"
depends=""
amove usr/bin
}
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="
3f089baf95f010663a0c2f060b2911395d9b396f478efb10fd979815f527c9e61e0a70b3192f2e921f59287bfde0da6e25109d4a1825554e2e4a50c0535e97aa ocaml-uuseg-14.0.0.tar.bz2
"