blob: 94801165e41805edcd5ac8b5786808639aa2bcf9 (
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
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=ocaml-ppx_tools_versioned
_pkgname=ppx_tools_versioned
pkgver=5.2
pkgrel=0
pkgdesc="Tools for authors of ppx rewriters"
url="https://github.com/ocaml-ppx/ppx_tools_versioned"
arch="all !x86 !armhf !armv7 !s390x !mips !mips64" # limited by ocaml aport
license="MIT"
depends="ocaml-runtime ocaml-migrate-parsetree"
makedepends="dune ocaml ocaml-compiler-libs ocaml-findlib
ocaml-migrate-parsetree-dev opam"
# textrels needed for ppc64le
# no tests provided
options="textrels !check"
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"
jbuilder build @install
}
package() {
cd "$builddir"
mkdir -p "$pkgdir"/usr/lib/ocaml
jbuilder install \
--destdir="$pkgdir"/usr \
--libdir="$pkgdir"/usr/lib/ocaml
# There's just a readme and changelog.
rm -Rf "$pkgdir"/usr/doc
# Remove annotation files and sources.
cd "$pkgdir"/usr/lib/ocaml/$_pkgname
rm -f *.cmt* */*.cmt* *.ml */*.ml
}
dev() {
default_dev
depends="$pkgname=$pkgver-r$pkgrel"
cd "$pkgdir"
local path; for path in $(find usr/lib/ocaml/$_pkgname \
-name '*.cmx' \
-o -name '*.cmxa' \
-o -name '*.mli')
do
mkdir -p "${path%/*}"
mv "$path" "$subpkgdir"/${path%/*}/
done
}
sha512sums="1efb7fc24f0b909d948aca53abee6e0613aaf101e6cf914772557ec00c879890d50b9c6e232f55a54381eab164a40d796d953b4992ef40a6e9141abd2b409cba ocaml-ppx_tools_versioned-5.2.tar.gz"
|