mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-11 13:16:45 +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
81 lines
1.7 KiB
Text
81 lines
1.7 KiB
Text
# Maintainer: Celeste <cielesti@protonmail.com>
|
|
maintainer="Celeste <cielesti@protonmail.com>"
|
|
pkgname=ocaml-ppx_blob
|
|
pkgver=0.8.0
|
|
pkgrel=0
|
|
_pkgreal=ppx_blob
|
|
pkgdesc="Include a file as a string at compile time"
|
|
url="https://github.com/johnwhitington/ppx_blob"
|
|
arch="all !riscv64 !loongarch64" # ocaml
|
|
license="Unlicense"
|
|
depends_dev="
|
|
$pkgname=$pkgver-r$pkgrel
|
|
ocaml-ppxlib-dev
|
|
"
|
|
makedepends="
|
|
$depends_dev
|
|
dune
|
|
ocaml
|
|
"
|
|
checkdepends="ocaml-alcotest-dev"
|
|
subpackages="$pkgname-dev"
|
|
source="$_pkgreal-$pkgver.tar.bz2::https://github.com/johnwhitington/ppx_blob/releases/download/$pkgver/ppx_blob-$pkgver.tbz"
|
|
builddir="$srcdir/$_pkgreal-$pkgver"
|
|
|
|
# 32-bit archs
|
|
case "$CARCH" in
|
|
arm*|x86) options="$options textrels" ;;
|
|
esac
|
|
|
|
build() {
|
|
dune build --release --verbose
|
|
}
|
|
|
|
check() {
|
|
dune runtest --build-dir=.testenv --verbose
|
|
}
|
|
|
|
package() {
|
|
dune install --destdir="$pkgdir" --docdir=/.omit
|
|
}
|
|
|
|
dev() {
|
|
default_dev
|
|
|
|
cd "$pkgdir"
|
|
|
|
local path; find usr/lib/ocaml \( \
|
|
-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="
|
|
bcbd58f7b0505063eaf4799792696f633a11ee734ce57d75b8f24b53d05fafbda8330bbf577a1d7a6149bb936b535216ae83574c1d40a61434e8d3bc6b6fd973 ppx_blob-0.8.0.tar.bz2
|
|
"
|