aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml-ounit/APKBUILD
blob: 09685f1ec8a169cda4cac6945a09993e20e73f6a (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
48
49
50
51
52
53
54
55
56
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=ocaml-ounit
_pkgname=ounit
pkgver=2.0.8
pkgrel=0
pkgdesc="A unit test framework for OCaml"
url="http://ounit.forge.ocamlcore.org/"
arch="all !x86 !armhf !armv7 !s390x"  # limited by ocaml aport
license="MIT"
depends="ocaml-runtime"
depends_dev="$pkgname=$pkgver-r$pkgrel"
makedepends="ocaml ocaml-findlib ocaml-ocamlbuild-dev ocamlbuild libxml2-utils"
options="!check"  # FIXME: fix tests!
subpackages="$pkgname-dev"
source="https://forge.ocamlcore.org/frs/download.php/1749/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	cd "$builddir"

	./configure \
		--prefix=/usr \
		--disable-debug \
		--disable-docs \
		--enable-tests
	make build
}

check() {
	cd "$builddir"
	make test
}

package() {
	cd "$builddir"

	mkdir -p "$pkgdir"/usr/lib/ocaml
	make install OCAMLFIND_DESTDIR="$pkgdir/usr/lib/ocaml"

	# Remove annotation files and sources.
	cd "$pkgdir"/usr/lib/ocaml/oUnit
	rm -f *.annot *.cmt* *.ml
}

dev() {
	local sitelib="usr/lib/ocaml/oUnit"
	default_dev

	cd "$pkgdir"/$sitelib

	mkdir -p "$subpkgdir"/$sitelib
	mv *.cmx *.cmxa *.mli "$subpkgdir"/$sitelib/
}

sha512sums="7b0c69d8f0baec541b0cccf8d04bc3bd81b7ff8f1addba9e73a7ba2596b475fc79e3472e3870370b6cfe00b4a4b730f6afd524ae4aea7bb3fd518bbe917d9fc7  ounit-2.0.8.tar.gz"