From 20e66fe784fc00e23733ae9d59092fdeec1d6253 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Fri, 9 Mar 2018 18:24:49 +0100 Subject: community/ocaml-camlp4: add -dev subpkg --- community/ocaml-camlp4/APKBUILD | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'community/ocaml-camlp4') 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 +# Contributor: Jakub Jirutka # Maintainer: Anil Madhavapeddy 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" -- cgit v1.2.3