aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml-ppx_deriving
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-03-10 22:53:22 +0100
committerJakub Jirutka <jakub@jirutka.cz>2018-03-11 21:37:43 +0100
commit2109a58605485138ebe3a5cc2913c5b716ab48aa (patch)
tree07935f9ace3e21385f7e8dd92a644610a137bc5a /testing/ocaml-ppx_deriving
parentf19a5a28ad3bfe797d3709975c822f563c8eb57b (diff)
downloadaports-2109a58605485138ebe3a5cc2913c5b716ab48aa.tar.bz2
aports-2109a58605485138ebe3a5cc2913c5b716ab48aa.tar.xz
testing/ocaml-ppx_deriving: new aport
https://github.com/ocaml-ppx/ppx_deriving Type-driven code generation for OCaml
Diffstat (limited to 'testing/ocaml-ppx_deriving')
-rw-r--r--testing/ocaml-ppx_deriving/APKBUILD86
1 files changed, 86 insertions, 0 deletions
diff --git a/testing/ocaml-ppx_deriving/APKBUILD b/testing/ocaml-ppx_deriving/APKBUILD
new file mode 100644
index 0000000000..d6c9fdc399
--- /dev/null
+++ b/testing/ocaml-ppx_deriving/APKBUILD
@@ -0,0 +1,86 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=ocaml-ppx_deriving
+_pkgname=ppx_deriving
+pkgver=4.2.1
+pkgrel=0
+pkgdesc="Type-driven code generation for OCaml"
+url="https://github.com/ocaml-ppx/ppx_deriving"
+arch="all !x86 !armhf !s390x" # limited by ocaml aport
+license="MIT"
+depends="
+ ocaml-migrate-parsetree
+ ocaml-ppx_derivers
+ ocaml-ppx_tools
+ ocaml-result
+ ocaml-runtime
+ "
+depends_dev="$pkgname=$pkgver-r$pkgrel"
+checkdepends="ocaml-ounit"
+makedepends="
+ grep
+ ocaml
+ ocaml-compiler-libs
+ ocaml-cppo-dev
+ ocaml-cppo-ocamlbuild
+ ocaml-findlib-dev
+ ocaml-migrate-parsetree-dev
+ ocaml-ocamlbuild-dev
+ ocaml-ppx_derivers-dev
+ ocaml-ppx_tools-dev
+ ocaml-result-dev
+ ocamlbuild
+ opam
+ "
+subpackages="$pkgname-dev"
+source="$pkgname-$pkgver.tar.gz::https://github.com/ocaml-ppx/$_pkgname/archive/v$pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-$pkgver"
+
+build() {
+ cd "$builddir"
+ make
+}
+
+check() {
+ cd "$builddir"
+ make test
+}
+
+package() {
+ cd "$builddir"
+
+ opam-installer -i \
+ --prefix="$pkgdir/usr" \
+ --libdir="$pkgdir/usr/lib/ocaml" \
+ --docdir="$builddir/.omit" \
+ $_pkgname.install
+
+ cd "$pkgdir"
+
+ # Move executable to /usr/bin.
+ mkdir -p usr/bin
+ mv usr/lib/$_pkgname/ppx_deriving usr/bin/
+ rmdir usr/lib/$_pkgname
+
+ # Remove annotation files.
+ rm -Rf "$pkgdir"/usr/lib/ocaml/$_pkgname/*.cmt*
+}
+
+dev() {
+ local sitelib="usr/lib/ocaml/$_pkgname"
+ default_dev
+
+ cd "$pkgdir"
+
+ mkdir -p "$subpkgdir"/usr
+ mv usr/bin "$subpkgdir"/usr/
+
+ ln -s ../../../bin/ppx_deriving \
+ "$subpkgdir"/usr/lib/ocaml/$_pkgname/ppx_deriving
+
+ cd "$pkgdir"/$sitelib
+ mkdir -p "$subpkgdir"/$sitelib
+ mv *.cmx *.cmxa *.mli "$subpkgdir"/$sitelib/
+}
+
+sha512sums="306cd62a5a2906782789967c9df3efd0f9fc31c4f59e39d3f678a0a24a5c48a210af8a28c9483a0f6ae174a36f79a00a2b1a0d547006c84fcc7a91101c2cd41b ocaml-ppx_deriving-4.2.1.tar.gz"