aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml-sedlex/APKBUILD
blob: cea3e7eb6b2174e8f43a6db167e43110a3473253 (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
57
58
59
60
61
62
63
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=ocaml-sedlex
_pkgname=sedlex
pkgver=1.99.4
pkgrel=0
pkgdesc="An OCaml lexer generator for Unicode"
url="https://github.com/alainfrisch/sedlex"
arch="all !x86 !armhf !armv7 !s390x"  # limited by ocaml aport
license="MIT"
depends="ocaml-gen
	ocaml-migrate-parsetree
	ocaml-ppx_tools_versioned
	ocaml-runtime
	"
makedepends="
	ocaml
	ocaml-compiler-libs
	ocaml-findlib
	ocaml-gen-dev
	ocaml-migrate-parsetree-dev
	ocaml-ppx_tools_versioned-dev
	"
subpackages="$pkgname-dev"
source="https://github.com/alainfrisch/sedlex/archive/v$pkgver/$_pkgname-$pkgver.tar.gz
	dont-build-doc.patch
	"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	cd "$builddir"
	make all opt
}

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

package() {
	cd "$builddir"

	export DESTDIR="$pkgdir"
	export OCAMLFIND_DESTDIR="$pkgdir/usr/lib/ocaml"

	mkdir -p "$OCAMLFIND_DESTDIR"
	make install
}

dev() {
	default_dev

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

	mkdir -p "$subpkgdir"/$sitelib

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

sha512sums="83bddb03e25b015bc71fb59e3b0e0e097e899c681c8033663c17936f28fde8599a82eaab9c26eafd645c401c106e65fcf173d9fb889eb8999eb1b064ff8b6149  sedlex-1.99.4.tar.gz
c74c51dc02596e9fbdcb18ab3aa1e0ea1bbd2361d445c74e4dea4fceb0310435bda00772272bbded338d2afb35adb819753ddd87c3b4ada28b7c77ea7414f5a5  dont-build-doc.patch"