aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml-ppx_tools/APKBUILD
blob: dca2ccfa5a2532708442a7207a1cd5719d7a814c (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: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=ocaml-ppx_tools
_pkgname=ppx_tools
pkgver=5.1
pkgrel=1
_ocamlver=4.06
_pkgver="$pkgver+$_ocamlver.0"
pkgdesc="Tools for authors of ppx rewriters"
url="https://github.com/ocaml-ppx/ppx_tools"
arch="all !x86 !armhf !armv7 !s390x"  # limited by ocaml aport
license="MIT"
depends="ocaml-findlib ocaml-runtime"
depends_dev="$pkgname=$pkgver-r$pkgrel"
makedepends="ocaml=~$_ocamlver ocaml-compiler-libs=~$_ocamlver"
options="!check"  # no tests provided
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/ocaml-ppx/$_pkgname/archive/$_pkgver.tar.gz"
builddir="$srcdir/$_pkgname-${_pkgver/+/-}"

build() {
	cd "$builddir"
	make -j1
}

package() {
	cd "$builddir"

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

	# Remove annotation files.
	rm -Rf "$pkgdir"/usr/lib/ocaml/$_pkgname/*.cmt*
}

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

	cd "$pkgdir"/$sitelib

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

sha512sums="9adab758f2e68f155775559ed6568b1c3338d03291a27108b7e47a4fc5bbe65c6451c9bb90fc3270b62148213dfcc30b709b6a95e99d218884f915b48ecda9ff  ocaml-ppx_tools-5.1.tar.gz"