aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml-gen/APKBUILD
blob: ea4e5572bf2b44e257d9812f585217b07019fac3 (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
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=ocaml-gen
_pkgname=gen
pkgver=0.5.2
pkgrel=0
pkgdesc="Simple, efficient iterators for OCaml"
url="https://github.com/c-cube/gen/"
arch="all !x86 !armhf !armv7 !s390x"  # limited by ocaml aport
license="BSD-2-Clause"
depends="ocaml-runtime"
makedepends="dune ocaml ocaml-findlib opam"
options="!check"  # XXX: tests require additional dependencies we don't have yet
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/c-cube/$_pkgname/archive/$pkgver/gen-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	jbuilder build @install
}

check() {
	jbuilder runtest
}

package() {
	mkdir -p "$pkgdir"/usr/lib/ocaml
	jbuilder install \
		--destdir="$pkgdir" \
		--prefix=/usr \
		--libdir=/usr/lib/ocaml

	# There's just a readme and changelog.
	rm -Rf "$pkgdir"/usr/doc

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

dev() {
	default_dev

	depends="$pkgname=$pkgver-r$pkgrel"
	local sitelib="usr/lib/ocaml/$_pkgname"

	mkdir -p "$subpkgdir"/$sitelib

	cd "$pkgdir"/$sitelib
	mv *.cmx *.cmxa *.mli "$subpkgdir"/$sitelib/
}

sha512sums="c84e5ea0c9b3a678b6a5c935eacf91265a79b68a48375c44aa5f159d4cb02283c1be0786e172a153666c670bc7ee37b931004b8747a99e5f4ab90ca63e097ff5  ocaml-gen-0.5.2.tar.gz"