aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml-curses/APKBUILD
blob: 0e275a4eee5ea0e323aa8569a3dfa4787f16e5d9 (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
# Contributor: Fernando Casas Schossow <casasfernando@outlook.com>
# Maintainer: Fernando Casas Schossow <casasfernando@outlook.com>
pkgname=ocaml-curses
pkgver=1.0.4
pkgrel=1
pkgdesc="OCaml bindings for ncurses"
url="https://www.nongnu.org/ocaml-tmk/"
arch="aarch64 ppc64le x86_64" # restricted by ocaml
license="LGPL-2.1"
makedepends="autoconf automake libtool ocaml ocaml-findlib-dev gawk ncurses-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="http://download.savannah.nongnu.org/releases/ocaml-tmk/ocaml-curses-1.0.4.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	cd "$builddir"
	default_prepare
	autoreconf
}

build() {
	cd "$builddir"
	./configure --prefix=/usr --enable-widec
	make all opt
}

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

package() {
	cd "$builddir"
	export DESTDIR="$pkgdir"
	export OCAMLFIND_DESTDIR="$DESTDIR/usr/lib/ocaml"
	mkdir -p "$OCAMLFIND_DESTDIR" "$OCAMLFIND_DESTDIR/stublibs"
	ocamlfind install curses META *.cmi *.cmx *.cma *.cmxa *.a *.so *.mli
	install -D -m644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}

sha512sums="a49838f1d32bf96fda6c612ac1b38316f61c49aa015e61e49681eacf863234f36ffe71d4305dd34f8e3b0a5dc6d9757919a107bcfdf46bd90df128e975560948  ocaml-curses-1.0.4.tar.gz"