blob: 8c4c26ec5ed7c9e632938cfefdc64664543701bb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# 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"
|