aports/testing/ocaml-camlzip/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

77 lines
1.8 KiB
Text

# Contributor: rubicon <rubicon@mailo.com>
# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=ocaml-camlzip
_pkgname=camlzip
pkgver=1.11
_pkgver="rel${pkgver//./}"
pkgrel=2
pkgdesc="Access compressed files in ZIP, GZIP and JAR format"
url="https://github.com/xavierleroy/camlzip"
arch="all !riscv64 !loongarch64" # ocaml
license="LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception"
depends_dev="$pkgname=$pkgver-r$pkgrel"
makedepends="ocaml ocaml-findlib zlib-dev"
options="!check"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/xavierleroy/camlzip/archive/$_pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$_pkgver"
_ocamldir=usr/lib/ocaml
# 32-bit archs
case "$CARCH" in
arm*|x86) options="$options textrels" ;;
esac
build() {
make all
}
package() {
export OCAMLFIND_DESTDIR="$pkgdir/$_ocamldir"
export OCAMLFIND_LDCONF=ignore
mkdir -vp "$OCAMLFIND_DESTDIR"
make 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
}
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="
4d69ef900437e66e00cd345497ec70f407f28cd8344ee5f2fad685d3bfe356924597d1854b752f2841b4007f96d6e0307cfae7e13cfb6f74951ae3eba5198a06 ocaml-camlzip-1.11.tar.gz
"