diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2018-03-11 17:30:02 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2018-03-11 19:11:21 +0100 |
commit | 0a773df31fd00b550079d30362924fe4f99c8b4e (patch) | |
tree | e351c6c2ab1b25192bac3b72b0881f03973d717d /community/ocamlbuild | |
parent | 734cc085534f6925bfcb09311ab9accbaaf6bb83 (diff) | |
download | aports-0a773df31fd00b550079d30362924fe4f99c8b4e.tar.bz2 aports-0a773df31fd00b550079d30362924fe4f99c8b4e.tar.xz |
community/ocamlbuild: split to subpkgs and update depending aports
Diffstat (limited to 'community/ocamlbuild')
-rw-r--r-- | community/ocamlbuild/APKBUILD | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/community/ocamlbuild/APKBUILD b/community/ocamlbuild/APKBUILD index 506200d9fd..b8ba764f89 100644 --- a/community/ocamlbuild/APKBUILD +++ b/community/ocamlbuild/APKBUILD @@ -1,23 +1,25 @@ # Contributor: Jon Ong <jonongjs@rottenmage.com> +# Contributor: Jakub Jirutka <jakub@jirutka.cz> # 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." +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 +arch="all !x86 !armhf !s390x" # limited by ocaml aport license="LGPL-2.0-or-later-WITH-linking-exception" checkdepends="ocaml-compiler-libs ocaml-findlib" -depends="cmd:tput" +depends="ocaml-$pkgname=$pkgver-r$pkgrel cmd:tput" makedepends="ocaml" -subpackages="$pkgname-doc" +subpackages="$pkgname-doc ocaml-$pkgname-dev:_libdev ocaml-$pkgname:_lib" 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 \ + make configure \ + OCAML_NATIVE=true \ OCAMLBUILD_BINDIR="/usr/bin" \ OCAMLBUILD_LIBDIR="/usr/lib/ocaml" make @@ -33,10 +35,35 @@ package() { make DESTDIR="$pkgdir" install + # Remove annotation files. + rm -f "$pkgdir"/usr/lib/ocaml/$pkgname/*.cmt* + # Keep only native binary. cd "$pkgdir"/usr/bin rm ocamlbuild.byte mv ocamlbuild.native ocamlbuild } +_libdev() { + pkgdesc="$pkgdesc (development files)" + depends="ocaml-$pkgname=$pkgver-r$pkgrel" + + local file; for file in '*.a' '*.cmx' '*.cmxa' '*.mli' '*.o'; do + _submv "usr/lib/ocaml/$pkgname/$file" + done +} + +_lib() { + pkgdesc="$pkgdesc (library)" + + _submv usr/lib/ocaml +} + +_submv() { + local path="$1" + mkdir -p "$subpkgdir"/${path%/*} + mv "$pkgdir"/$path "$subpkgdir"/${path%/*}/ + rmdir -p "$pkgdir"/${path%/*} 2>/dev/null || true +} + sha512sums="0755a8410a1e083d344e2389bbff06ae2ad5daaf9b186147fd0d2fa094bdc3a2e8e94e2a1e666a63276d10899274b905535300f47d50e747e86f17cf562abe08 ocamlbuild-0.12.0.tar.gz" |