mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-05 05:57: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
81 lines
1.8 KiB
Text
81 lines
1.8 KiB
Text
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
|
|
# Maintainer: Celeste <cielesti@protonmail.com>
|
|
maintainer="Celeste <cielesti@protonmail.com>"
|
|
pkgname=ocaml-easy-format
|
|
_pkgname=easy-format
|
|
pkgver=1.3.4
|
|
pkgrel=1
|
|
pkgdesc="Pretty-printing library for OCaml"
|
|
url="https://mjambon.github.io/mjambon2016/easy-format.html"
|
|
arch="all !riscv64 !loongarch64" # ocaml
|
|
license="BSD-3-Clause"
|
|
depends_dev="$pkgname=$pkgver-r$pkgrel"
|
|
makedepends="dune ocaml ocaml-findlib"
|
|
subpackages="$pkgname-dev"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/ocaml-community/easy-format/archive/$pkgver.tar.gz"
|
|
builddir="$srcdir/$_pkgname-$pkgver"
|
|
|
|
# 32-bit archs
|
|
case "$CARCH" in
|
|
arm*|x86) options="$options textrels" ;;
|
|
esac
|
|
|
|
build() {
|
|
export OCAMLPATH=/usr/lib/ocaml
|
|
dune build @install
|
|
}
|
|
|
|
check() {
|
|
dune runtest
|
|
}
|
|
|
|
package() {
|
|
dune install \
|
|
--destdir="$pkgdir" \
|
|
--prefix=/usr \
|
|
--libdir=/usr/lib/ocaml
|
|
|
|
# There's just a readme and changelog.
|
|
rm -Rf "$pkgdir"/usr/doc
|
|
}
|
|
|
|
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="
|
|
e3f25d8e40fefb22ed327601c8dcdadcea97fcb15ca3e92e095fd773b545d738d6709c77e76b3870bd035f985b187c7ca7a4af9bdfa95a45865ee14c9219652e ocaml-easy-format-1.3.4.tar.gz
|
|
"
|