aboutsummaryrefslogtreecommitdiffstats
path: root/community/ocamlbuild/APKBUILD
blob: ee4e7e69b3a194f4ecb454c9b05a99dacbf13dee (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
# Contributor: Jon Ong <jonongjs@rottenmage.com>
# Maintainer: Anil Madhavapeddy <anil@recoil.org>
pkgname=ocamlbuild
pkgver=0.12.0
pkgrel=2
pkgdesc="Generic build tool with built-in rules for building OCaml library and programs."
url="https://github.com/ocaml/ocamlbuild"
arch="all !x86 !armhf !s390x" #ocaml not avail on excluded platforms
license="LGPL-2.0-or-later-WITH-linking-exception"
makedepends="ocaml"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/ocaml/$pkgname/archive/$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"

	make configure OCAML_NATIVE=true \
		OCAMLBUILD_BINDIR="/usr/bin" \
		OCAMLBUILD_LIBDIR="/usr/lib/ocaml"
	make
}

package() {
	cd "$builddir"

	make DESTDIR="$pkgdir" install

	# Keep only native binary.
	cd "$pkgdir"/usr/bin
	rm ocamlbuild.byte
	mv ocamlbuild.native ocamlbuild
}

sha512sums="0755a8410a1e083d344e2389bbff06ae2ad5daaf9b186147fd0d2fa094bdc3a2e8e94e2a1e666a63276d10899274b905535300f47d50e747e86f17cf562abe08  ocamlbuild-0.12.0.tar.gz"