mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-19 17:25:17 +03:00
47 lines
1.5 KiB
Text
47 lines
1.5 KiB
Text
# Contributor: Fernando Casas Schossow <casasfernando@outlook.com>
|
|
# Maintainer: Fernando Casas Schossow <casasfernando@outlook.com>
|
|
pkgname=ocaml-xml-light
|
|
pkgver=2.4
|
|
pkgrel=1
|
|
pkgdesc="Minimal XML parser and printer for OCaml"
|
|
url="https://github.com/ncannasse/xml-light"
|
|
arch="x86_64 ppc64le" # restrict by ocaml, build fails on aarch64
|
|
license="LGPL-2.1-or-later-WITH-linking-exception"
|
|
makedepends="ocaml ocaml-findlib-dev ocaml-ocamldoc gawk"
|
|
subpackages="$pkgname-dev $pkgname-doc"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/ncannasse/xml-light/archive/$pkgver.tar.gz
|
|
Makefile-explicit-target-fix.patch"
|
|
builddir="$srcdir/xml-light-$pkgver"
|
|
|
|
build() {
|
|
cd "$builddir"
|
|
make all
|
|
make doc
|
|
make opt
|
|
}
|
|
|
|
check() {
|
|
cd "$builddir"
|
|
./test.exe <<EOF
|
|
<abc><123/></abc>
|
|
|
|
EOF
|
|
./test_opt.exe <<EOF
|
|
<abc><123/></abc>
|
|
|
|
EOF
|
|
}
|
|
|
|
package() {
|
|
cd "$builddir"
|
|
export DESTDIR="$pkgdir"
|
|
export OCAMLFIND_DESTDIR="$DESTDIR/usr/lib/ocaml"
|
|
mkdir -p "$OCAMLFIND_DESTDIR" "$OCAMLFIND_DESTDIR/stublibs"
|
|
rm -f test.cmi
|
|
make install_ocamlfind
|
|
install -D -m644 README "$pkgdir/usr/share/licenses/$pkgname/README"
|
|
install -D -m644 -t "$pkgdir/usr/share/doc/$pkgname/html/" doc/*
|
|
}
|
|
|
|
sha512sums="029068c6eb48cd1223438dc0f86e1c5e6fd0412d160ea4d79928eec5e5f5843af46260d7240e4260851e9580e7f92d578c764c63c8e0acab348637455493ef02 ocaml-xml-light-2.4.tar.gz
|
|
6fd6d9131cb652df96c7fd7b68e9161a6e9a0c08fedfd2e2ee00a474d3d249ce16d4a8631a02ca36e158d8c61ff8fb0fe440b5e620eb64f865b23dcfd433e476 Makefile-explicit-target-fix.patch"
|