aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml-qtest/APKBUILD
diff options
context:
space:
mode:
authorAndy Li <andy@onthewings.net>2019-12-05 09:45:57 +0800
committerLeo <thinkabit.ukim@gmail.com>2019-12-05 06:30:08 +0100
commit89a66a3f5d308e4281d40bd34d1e85f950794a73 (patch)
tree69551ec984ce7c4471c760a242e0550e5acb612f /testing/ocaml-qtest/APKBUILD
parent435cad13513f52d2faa98f9a19d63b34d3a5bc83 (diff)
downloadaports-89a66a3f5d308e4281d40bd34d1e85f950794a73.tar.bz2
aports-89a66a3f5d308e4281d40bd34d1e85f950794a73.tar.xz
testing/ocaml-qtest: new aport
https://github.com/vincent-hugot/qtest Lightweight inline test extraction from comments
Diffstat (limited to 'testing/ocaml-qtest/APKBUILD')
-rw-r--r--testing/ocaml-qtest/APKBUILD56
1 files changed, 56 insertions, 0 deletions
diff --git a/testing/ocaml-qtest/APKBUILD b/testing/ocaml-qtest/APKBUILD
new file mode 100644
index 0000000000..7250e23820
--- /dev/null
+++ b/testing/ocaml-qtest/APKBUILD
@@ -0,0 +1,56 @@
+# Contributor: Andy Li <andy@onthewings.net>
+# Maintainer: Andy Li <andy@onthewings.net>
+pkgname=ocaml-qtest
+_pkgname=qtest
+pkgver=2.10.1
+pkgrel=0
+pkgdesc="Lightweight inline test extraction from comments"
+url="https://github.com/vincent-hugot/qtest"
+arch="all !x86 !armhf !armv7 !s390x" # limited by ocaml aport
+license="GPL-3.0-or-later"
+depends="ocaml-runtime ocaml-qcheck"
+depends_dev="$pkgname=$pkgver-r$pkgrel"
+makedepends="dune ocaml ocaml-findlib ocaml-qcheck-dev ocaml-ounit-dev"
+subpackages="$pkgname-dev"
+source="$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-$pkgver"
+
+build() {
+ dune build @install -p qtest -j1 --no-buffer --verbose
+}
+
+check() {
+ dune runtest --verbose
+}
+
+package() {
+ mkdir -p "$pkgdir"/usr/lib/ocaml
+ dune install --destdir="$pkgdir"
+
+ # There's just a README and LICENSE.
+ rm -Rf "$pkgdir"/usr/doc
+
+ # Remove annotation files and sources.
+ find "$pkgdir"/usr/lib/ocaml \
+ \( \
+ -name '*.cmt' \
+ -o -name '*.ml' \
+ \) \
+ -exec rm "{}" \;
+}
+
+dev() {
+ default_dev
+
+ cd "$pkgdir"
+
+ find usr/lib/ocaml \
+ \( \
+ -name '*.cmx' \
+ -o -name '*.cmxa' \
+ -o -name '*.mli' \
+ \) \
+ -exec sh -c 'mkdir -p "$(dirname $1)" && mv "$1" "$subpkgdir/$(dirname $1)/"' _ {} \;
+}
+
+sha512sums="838ff1951b8da35f0551b1db4d36a03ad803a57ba8b85816a51e6b1bc2ad7778299a7fd026a062437252b40c0de1c83b6171605b19f01e3874274b2676341bf0 ocaml-qtest-2.10.1.tar.gz"