aboutsummaryrefslogtreecommitdiffstats
path: root/community/ocaml-findlib/APKBUILD
blob: 4eba03c55efd5944ed9fd8d0fd46bfa5ec070afd (plain) (blame)
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
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=ocaml-findlib
_pkgname=findlib
pkgver=1.6.2
pkgrel=1
pkgdesc="OCaml package manager"
url="http://projects.camlcity.org/projects/findlib.html"
arch="all !x86 !armhf !s390x"  # limited by ocaml abuild
license="MIT"
depends="ocaml"
depends_dev="$pkgname"
makedepends="m4 ncurses-dev"
options="textrels"
subpackages="$pkgname-dev $pkgname-doc"
source="http://download.camlcity.org/download/$_pkgname-$pkgver.tar.gz
	Makefile.patch"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	cd "$builddir"

	./configure \
		-sitelib /usr/lib/ocaml \
		-mandir /usr/share/man \
		-config /etc/$_pkgname.conf
	make -j1 all opt
}

package() {
	cd "$builddir"

	make install prefix="$pkgdir"

	mkdir -p "$pkgdir"/usr/share/doc/$_pkgname/
	install -m 644 doc/README doc/QUICKSTART \
		"$pkgdir"/usr/share/doc/$_pkgname/
}

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

	default_dev

	cd "$pkgdir"
	mkdir -p "$subpkgdir"/$sitelib
	mv $sitelib/*.cmxa \
		$sitelib/*.mli \
		$sitelib/Makefile.config \
		"$subpkgdir"/$sitelib/
}

sha512sums="8c4098e6956530bc88d20a1b91512c68368e8a866398ce4d504afe3f71e81124c01644ba31ff97da6e61e7410328b533fb1d31a513166231047dab1933179fc4  findlib-1.6.2.tar.gz
e6f9b0d4519518b01665142061f07f329ab8a4ced0c6b8c7aaa3dd8801548a2154616da7369e9d923635fb5c1d16e77623acb51c235f2141aa25357c907de9af  Makefile.patch"