aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml-cppo
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-03-05 11:25:17 +0100
committerJakub Jirutka <jakub@jirutka.cz>2018-03-05 11:27:18 +0100
commit60c93c968a9cf7307c6bded033a7025d5d9372cd (patch)
treef2de3099ef57647a38d6d95809e638ccc207bc3b /testing/ocaml-cppo
parent57ec7b7b66069fcb7ad2b6bb5692c3d88e74465c (diff)
downloadaports-60c93c968a9cf7307c6bded033a7025d5d9372cd.tar.bz2
aports-60c93c968a9cf7307c6bded033a7025d5d9372cd.tar.xz
testing/ocaml-cppo: new aport
https://github.com/mjambon/cppo C-style preprocessor for OCaml
Diffstat (limited to 'testing/ocaml-cppo')
-rw-r--r--testing/ocaml-cppo/APKBUILD52
1 files changed, 52 insertions, 0 deletions
diff --git a/testing/ocaml-cppo/APKBUILD b/testing/ocaml-cppo/APKBUILD
new file mode 100644
index 0000000000..5ba91350ee
--- /dev/null
+++ b/testing/ocaml-cppo/APKBUILD
@@ -0,0 +1,52 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=ocaml-cppo
+_pkgname=cppo
+pkgver=1.6.4
+pkgrel=0
+pkgdesc="C-style preprocessor for OCaml"
+url="https://github.com/mjambon/cppo"
+arch="all !x86 !armhf !s390x" # limited by ocaml abuild
+license="BSD-3-Clause"
+makedepends="dune ocaml ocamlbuild ocaml-findlib opam"
+subpackages="$pkgname-dev"
+source="$pkgname-$pkgver.tar.gz::https://github.com/mjambon/$_pkgname/archive/v$pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-$pkgver"
+
+build() {
+ cd "$builddir"
+ jbuilder build --root . @install @DEFAULT
+}
+
+check() {
+ cd "$builddir"
+ jbuilder runtest
+}
+
+package() {
+ cd "$builddir"
+
+ mkdir -p "$pkgdir"/usr/lib/ocaml
+ jbuilder install \
+ --destdir="$pkgdir/usr" \
+ --libdir="$pkgdir/usr/lib/ocaml"
+
+ # Remove compiled tests
+ rm -Rf "$pkgdir"/usr/lib/ocaml/$_pkgname*/*.cmt*
+
+ # Nothing interesting here.
+ rm -Rf "$pkgdir"/usr/doc
+}
+
+dev() {
+ default_dev
+
+ depends="$pkgname=$pkgver-r$pkgrel"
+ local sitelib="usr/lib/ocaml/${_pkgname}_ocamlbuild"
+
+ cd "$pkgdir"/$sitelib
+ mkdir -p "$subpkgdir"/$sitelib
+ mv *.cmx *.cmxa *.ml *.mli "$subpkgdir"/$sitelib/
+}
+
+sha512sums="89c6df66d597d929be7532ad82f0206b028bdbd79a0b4b39451bce3fa5bd63a80dce931d575f69bd7066de829347498c736657dfe9610b20700a652b9b542a4d ocaml-cppo-1.6.4.tar.gz"