1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-23 11:15:13 +03:00
aports/testing/ocaml-fileutils/APKBUILD
2023-02-05 03:04:15 +01:00

72 lines
1.5 KiB
Text

# Contributor: Fernando Casas Schossow <casasfernando@outlook.com>
# Maintainer: Fernando Casas Schossow <casasfernando@outlook.com>
pkgname=ocaml-fileutils
_pkgname=fileutils
pkgver=0.6.4
pkgrel=0
pkgdesc="OCaml library for common file and filename operations"
url="https://github.com/gildor478/ocaml-fileutils"
arch="all !riscv64" # limited by ocaml aport
license="LGPL-2.1-or-later-WITH-linking-exception"
makedepends="
dune
ocaml
ocaml-compiler-libs
ocaml-findlib-dev
ocaml-ocamldoc
ocaml-seq-dev
ocaml-stdlib-shims
ocamlbuild
"
options="!check"
subpackages="$pkgname-dev $pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/gildor478/ocaml-fileutils/archive/v$pkgver.tar.gz"
# 32-bit archs
case "$CARCH" in
arm*|x86) options="$options textrels" ;;
esac
build() {
export OCAMLPATH=/usr/lib/ocaml
dune build -p fileutils
}
check() {
make test
}
package() {
dune install \
--destdir="$pkgdir" \
--prefix=/usr \
--libdir=/usr/lib/ocaml \
fileutils
cd "$pkgdir"
mkdir -vp usr/share/doc
mv -v usr/doc/"$_pkgname" \
usr/share/doc/"$pkgname"
}
dev() {
default_dev
cd "$pkgdir"
local path; for path in $(find usr/lib/ocaml \( \
-name '*.cmt' -o \
-name '*.cmti' -o \
-name '*.cmx' -o \
-name '*.cmxa' -o \
-name '*.ml' -o \
-name '*.mli' \
\))
do
amove "$path"
done
}
sha512sums="
fed41c0c98bd9a2dde18335f0c7fd721b609f936001424eff200bca058146af55134f1d245b143bd211ece37bc036b3308528b193a6b578735b27891181f07e1 ocaml-fileutils-0.6.4.tar.gz
"