diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2018-03-06 22:16:12 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2018-03-07 01:33:56 +0100 |
commit | 1fcb3c3fb94934f9246991620f38182a8c4ef60a (patch) | |
tree | 19947577e8057867d7ad6f8f996e01ce41144507 /testing/ocaml-camomile/APKBUILD | |
parent | b163afa05dc3b21613988cc9185836c29f19cfe7 (diff) | |
download | aports-1fcb3c3fb94934f9246991620f38182a8c4ef60a.tar.bz2 aports-1fcb3c3fb94934f9246991620f38182a8c4ef60a.tar.xz |
testing/ocaml-camomile: new aport
https://github.com/yoriyuki/Camomile
A Unicode library for OCaml
Diffstat (limited to 'testing/ocaml-camomile/APKBUILD')
-rw-r--r-- | testing/ocaml-camomile/APKBUILD | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/testing/ocaml-camomile/APKBUILD b/testing/ocaml-camomile/APKBUILD new file mode 100644 index 0000000000..4487ca76e2 --- /dev/null +++ b/testing/ocaml-camomile/APKBUILD @@ -0,0 +1,64 @@ +# Contributor: Jakub Jirutka <jakub@jirutka.cz> +# Maintainer: Jakub Jirutka <jakub@jirutka.cz> +pkgname=ocaml-camomile +_pkgname=camomile +pkgver=0.8.7 +pkgrel=0 +pkgdesc="A Unicode library for OCaml" +url="https://github.com/yoriyuki/Camomile" +arch="all !x86 !armhf !s390x !ppc64le" # limited by ocaml and ocaml-cppo aports +license="LGPL-2.0-or-later" +depends="$pkgname-data=$pkgver-r$pkgrel" +makedepends="dune ocaml ocaml-cppo ocaml-findlib opam" +subpackages="$pkgname-dev $pkgname-data::noarch" +source="$pkgname-$pkgver.tar.gz::https://github.com/yoriyuki/$_pkgname/archive/rel-$pkgver.tar.gz" +builddir="$srcdir/Camomile-rel-$pkgver" + +build() { + cd "$builddir" + jbuilder build @install +} + +check() { + cd "$builddir" + jbuilder runtest +} + +package() { + cd "$builddir" + + mkdir -p "$pkgdir"/usr/lib/ocaml + jbuilder install \ + --destdir="$pkgdir/usr" \ + --libdir="$pkgdir/usr/lib/ocaml" + + cd "$pkgdir" + + # There's just a readme. + rm -Rf usr/doc + + # Remove annotation files and sources. + rm -Rf usr/lib/ocaml/$_pkgname/*.cmt* + rm -Rf usr/lib/ocaml/$_pkgname/*.ml +} + +dev() { + default_dev + depends="$pkgname=$pkgver-r$pkgrel" + local sitelib="usr/lib/ocaml/$_pkgname" + + cd "$pkgdir"/$sitelib + + mkdir -p "$subpkgdir"/$sitelib + mv *.cmx *.cmxa *.mli "$subpkgdir"/$sitelib/ +} + +data() { + pkgdesc="$pkgdesc (data files)" + depends="" + + mkdir -p "$subpkgdir"/usr/share + mv "$pkgdir"/usr/share/$_pkgname "$subpkgdir"/usr/share/ +} + +sha512sums="a8db2086030b703e1ada0e2cc195e1c6338946439b3a6b6a05febb3a0d24388add9fe06961025e043181a885bb085e33cebc8027c66c7dbbe1cc30e18df27cf2 ocaml-camomile-0.8.7.tar.gz" |