diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2018-03-10 20:46:22 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2018-03-11 21:37:43 +0100 |
commit | 91f8af81ecaa28b550fe2b04ed7307cea441e83e (patch) | |
tree | 517dd8ed56ab7b878f04689ee42834e0ef0447a6 /testing/ocaml-ppx_derivers | |
parent | 4659d0887b2c4ac60f310b4d7d033faf611dd5c7 (diff) | |
download | aports-91f8af81ecaa28b550fe2b04ed7307cea441e83e.tar.bz2 aports-91f8af81ecaa28b550fe2b04ed7307cea441e83e.tar.xz |
testing/ocaml-ppx_derivers: new aport
https://github.com/ocaml-ppx/ppx_derivers
Shared [@@deriving] plugins registry
Diffstat (limited to 'testing/ocaml-ppx_derivers')
-rw-r--r-- | testing/ocaml-ppx_derivers/APKBUILD | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/testing/ocaml-ppx_derivers/APKBUILD b/testing/ocaml-ppx_derivers/APKBUILD new file mode 100644 index 0000000000..cf41988db6 --- /dev/null +++ b/testing/ocaml-ppx_derivers/APKBUILD @@ -0,0 +1,50 @@ +# Contributor: Jakub Jirutka <jakub@jirutka.cz> +# Maintainer: Jakub Jirutka <jakub@jirutka.cz> +pkgname=ocaml-ppx_derivers +_pkgname=ppx_derivers +pkgver=1.2 +pkgrel=0 +pkgdesc="Shared [@@deriving] plugins registry" +url="https://github.com/ocaml-ppx/ppx_derivers" +arch="all !x86 !armhf !s390x" # limited by ocaml aport +license="BSD-3-Clause" +depends="ocaml-runtime" +depends_dev="$pkgname=$pkgver-r$pkgrel" +makedepends="dune ocaml ocaml-findlib opam" +options="!check" # no tests provided +subpackages="$pkgname-dev" +source="$pkgname-$pkgver.tar.gz::https://github.com/ocaml-ppx/$_pkgname/archive/$pkgver.tar.gz" +builddir="$srcdir/$_pkgname-$pkgver" + +build() { + cd "$builddir" + jbuilder build @install +} + +package() { + cd "$builddir" + + mkdir -p "$pkgdir"/usr/lib/ocaml + jbuilder install \ + --destdir="$pkgdir/usr" \ + --libdir="$pkgdir/usr/lib/ocaml" + + # There's just a readme and changelog. + rm -Rf "$pkgdir"/usr/doc + + # Remove annotation files and sources. + cd "$pkgdir"/usr/lib/ocaml/$_pkgname + rm -f *.cmt* *.ml +} + +dev() { + local sitelib="usr/lib/ocaml/$_pkgname" + default_dev + + cd "$pkgdir"/$sitelib + + mkdir -p "$subpkgdir"/$sitelib + mv *.cmx *.cmxa *.mli "$subpkgdir"/$sitelib/ +} + +sha512sums="68e8773cec2ee3c0feb08b7cc8e1b6ce226add4ed6d2ced0e77fe485e48b04570f7049c5bde2ce917a4965d114bbc44400b409c2d76d928913ef4f76c6591a8e ocaml-ppx_derivers-1.2.tar.gz" |