blob: f937494c38c9b12f8c26b0a2032be29430f2fb60 (
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
|
# Contributor: alpine-mips-patches <info@mobile-stream.com>
# Maintainer: alpine-mips-patches <info@mobile-stream.com>
pkgname=ocaml-num
_pkgname=num
pkgver=1.3
pkgrel=0
pkgdesc="Arbitray-precision rational arithmetic for OCaml"
url="https://github.com/ocaml/num"
arch="aarch64 ppc64le x86_64" # reflect ocaml aport platforms
license="LGPL-2.1-or-later-WITH-linking-exception-AND-MIT"
depends="ocaml-runtime"
makedepends="ocaml ocaml-compiler-libs ocaml-findlib"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/ocaml/$_pkgname/archive/v$pkgver.tar.gz
"
builddir="$srcdir/$_pkgname-$pkgver"
build() {
make
}
check() {
make test
}
package() {
local _libdir="usr/lib/ocaml"
mkdir -p "$pkgdir/$_libdir"
OCAMLFIND_DESTDIR="$pkgdir/$_libdir" \
OCAMLFIND_LDCONF="ignore" \
make DESTDIR="$pkgdir" findlib-install
# drop temporary files
find "$pkgdir/$_libdir" -name '*.cmti' -delete
# move dllnums.so into standard shared stublibs dir
local _numdir="$_libdir/$_pkgname"
mkdir -p "$pkgdir/$_libdir/stublibs"
mv "$pkgdir/$_numdir/"dll*.so "$pkgdir/$_libdir/stublibs"
}
dev() {
depends="$pkgname=$pkgver-r$pkgrel"
pkgdesc="$pkgdesc (development files)"
local _numdir="usr/lib/ocaml/$_pkgname"
mkdir -p "$subpkgdir/$_numdir"
for p in '*.a' '*.cmx' '*.cmxa' '*.mli'; do
mv "$pkgdir/$_numdir/"$p "$subpkgdir/$_numdir"
done
}
sha512sums="c88310f8c45700990095e6b2e9abf24c27347711b9abfd1dde75e540fbbfc6a365e6713bd69f66009af305728fcb36dc61eb37fdd0be7d73824b0e92fbe8c031 ocaml-num-1.3.tar.gz"
|