diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2018-03-09 18:24:49 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2018-03-09 18:27:24 +0100 |
commit | 20e66fe784fc00e23733ae9d59092fdeec1d6253 (patch) | |
tree | 1db3468402b3d16c38bae86b05325645134def30 /community/ocaml-camlp4 | |
parent | 8530b1bd92515675782ad22333ef86cc1c97754c (diff) | |
download | aports-20e66fe784fc00e23733ae9d59092fdeec1d6253.tar.bz2 aports-20e66fe784fc00e23733ae9d59092fdeec1d6253.tar.xz |
community/ocaml-camlp4: add -dev subpkg
Diffstat (limited to 'community/ocaml-camlp4')
-rw-r--r-- | community/ocaml-camlp4/APKBUILD | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/community/ocaml-camlp4/APKBUILD b/community/ocaml-camlp4/APKBUILD index ea97256ea9..5f59d60ee8 100644 --- a/community/ocaml-camlp4/APKBUILD +++ b/community/ocaml-camlp4/APKBUILD @@ -1,4 +1,5 @@ # Contributor: Jon Ong <jonongjs@rottenmage.com> +# Contributor: Jakub Jirutka <jakub@jirutka.cz> # Maintainer: Anil Madhavapeddy <anil@recoil.org> pkgname=ocaml-camlp4 _pkgname=camlp4 @@ -12,9 +13,11 @@ url="https://github.com/ocaml/camlp4/releases" arch="all !x86 !armhf !s390x" # ocaml not avail on excluded platforms license="LGPL-2.0-or-later-WITH-linking-exception" depends="ocaml" +depends_dev="$pkgname=$pkgver-r$pkgrel" makedepends="ocamlbuild" replaces="camlp4" # for backward compatibility provides="camlp4=$pkgver-r$pkgrel" # for backward compatibility +subpackages="$pkgname-dev" source="$_pkgname-$_pkgver.tar.gz::https://github.com/ocaml/$_pkgname/archive/$_pkgver.tar.gz" builddir="$srcdir/$_pkgname-${_pkgver/+/-}" @@ -34,4 +37,22 @@ package() { install install-META } +dev() { + default_dev + replaces="camlp4" # for backward compatibility + local sitelib="usr/lib/ocaml/$_pkgname" + + cd "$pkgdir" + + mkdir -p "$subpkgdir"/usr + mv usr/bin "$subpkgdir"/usr/ + + local path + for path in $(find $sitelib/ -name '*.cmx' -o -name '*.cmxa'); do + mkdir -p "$subpkgdir"/${path%/*} + mv "$path" "$subpkgdir"/${path%/*}/ + done + rmdir "$subpkgdir"/$sitelib 2>/dev/null || true +} + sha512sums="7db8eebcf3d230f60650ba62d9cb630c069394237e97b678a40b61d3dcaded752a2b7e089a50ff528f1ea0740d0291b722df123a072f2cee489cadc5201c6776 camlp4-4.04+1.tar.gz" |