diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2018-03-09 00:54:15 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2018-03-10 02:17:25 +0100 |
commit | b80a6560548dee8072800db92df85b9bbeb27911 (patch) | |
tree | c40158ae0aba59ce6763c406dbdaf04234bf6098 /community | |
parent | 739ef0b03a5c8f4a26e00c927e29ee245304b209 (diff) | |
download | aports-b80a6560548dee8072800db92df85b9bbeb27911.tar.bz2 aports-b80a6560548dee8072800db92df85b9bbeb27911.tar.xz |
community/ocaml: split into more subpackages
Based on Fedora package.
Diffstat (limited to 'community')
-rw-r--r-- | community/ocaml/APKBUILD | 57 |
1 files changed, 55 insertions, 2 deletions
diff --git a/community/ocaml/APKBUILD b/community/ocaml/APKBUILD index 294591c7e2..8dbe02227d 100644 --- a/community/ocaml/APKBUILD +++ b/community/ocaml/APKBUILD @@ -1,4 +1,5 @@ # Contributor: Borys Zhukov <mp5@mp5.im> +# Contributor: Jakub Jirutka <jakub@jirutka.cz> # Maintainer: Borys Zhukov <mp5@mp5.im> pkgname=ocaml pkgver=4.06.1 @@ -7,9 +8,15 @@ pkgdesc="Main implementation of the Caml programming language" url="http://ocaml.org/" arch="all !x86 !armhf !s390x" license="LGPL-2.1-or-later-WITH-linking-exception" -makedepends="ncurses-dev zlib-dev gdbm-dev gcc libc-dev" +depends="$pkgname-runtime=$pkgver-r$pkgrel gcc" +makedepends="gdbm-dev libc-dev ncurses-dev zlib-dev" options="textrels" -subpackages="$pkgname-doc" +subpackages=" + $pkgname-doc + $pkgname-ocamldoc + $pkgname-compiler-libs:_compiler_libs + $pkgname-runtime + " source="http://caml.inria.fr/pub/distrib/ocaml-${pkgver%.*}/$pkgname-$pkgver.tar.gz fix-mcontext-fields.patch fix-segfault-in-ppc64le.patch @@ -55,6 +62,52 @@ package() { install -Dm644 Changes "$pkgdir"/usr/share/doc/$pkgname/Changes } +ocamldoc() { + pkgdesc="Documentation generator for OCaml" + depends="$pkgname=$pkgver-r$pkgrel" + replaces="$pkgname" # for backward compatibility + + _submv usr/bin/ocamldoc\* + _submv usr/lib/ocaml/ocamldoc +} + +_compiler_libs() { + pkgdesc="Compiler libraries for OCaml" + depends="$pkgname=$pkgver-r$pkgrel" + replaces="$pkgname" # for backward compatibility + + _submv usr/lib/ocaml/compiler-libs +} + +runtime() { + pkgdesc="OCaml runtime environment" + depends="" + replaces="$pkgname" # for backward compatibility + + _submv usr/bin/ocamlrun + + local i; for i in \ + '*.cmo' \ + '*.cmi' \ + '*.cma' \ + 'VERSION' \ + 'stublibs' \ + 'vmthreads/*.cmi' \ + 'vmthreads/*.cma' \ + 'threads/*.cmi' \ + 'threads/*.cma' + do + _submv "usr/lib/ocaml/$i" + done +} + +_submv() { + local path="$1" + mkdir -p "$subpkgdir"/${path%/*} + mv "$pkgdir"/$path "$subpkgdir"/${path%/*}/ + rmdir -p "$pkgdir"/${path%/*} 2>/dev/null || true +} + sha512sums="42560874ce363212fa4e862138d7260113bc8dff8b39c040332bbd9b039ba938788344ba8ce63ffc0a251bf21a6e493f3c1e505b6f51db6fec4d21578921060e ocaml-4.06.1.tar.gz 75c67e143a4a05b334bdebbad48ded1e04d383d8ea9b747df2633a5af96b1115b502510faf57753c71bbac38fbc9d9746b167861a63b2fd295901db0d22ea317 fix-mcontext-fields.patch b2cef41400b31c1dcfd206c1534827f7b33b0afd6234b26fb95cf15c092affa85c27a615c14ece254ec326430f31b58ca70b9cc23a84ebf8baac2624bd5b0a71 fix-segfault-in-ppc64le.patch" |