diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2018-03-11 16:05:34 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2018-03-11 21:37:43 +0100 |
commit | 72564b4d6a50dd0aa109202adbf70364d4cb54c5 (patch) | |
tree | 7d2e25fc6dcb7d61e682c3c5f6c4b23f9928aeba /testing | |
parent | 2c4ceb843827eeb107b90db555f8d06a4b82c3ef (diff) | |
download | aports-72564b4d6a50dd0aa109202adbf70364d4cb54c5.tar.bz2 aports-72564b4d6a50dd0aa109202adbf70364d4cb54c5.tar.xz |
testing/ocaml-re: new aport
https://github.com/ocaml/ocaml-re
Pure OCaml regular expressions, with support for Perl and POSIX-style strings
Diffstat (limited to 'testing')
-rw-r--r-- | testing/ocaml-re/APKBUILD | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/testing/ocaml-re/APKBUILD b/testing/ocaml-re/APKBUILD new file mode 100644 index 0000000000..2b05d5948a --- /dev/null +++ b/testing/ocaml-re/APKBUILD @@ -0,0 +1,60 @@ +# Contributor: Jakub Jirutka <jakub@jirutka.cz> +# Maintainer: Jakub Jirutka <jakub@jirutka.cz> +pkgname=ocaml-re +pkgver=1.7.2 +pkgrel=0 +pkgdesc="Pure OCaml regular expressions, with support for Perl and POSIX-style strings" +url="https://github.com/ocaml/ocaml-re" +arch="all !x86 !armhf !s390x" # limited by ocaml aport +license="LGPL-2.1-or-later" +depends="ocaml-runtime" +depends_dev="$pkgname=$pkgver-r$pkgrel" +checkdepends="ocaml-ounit-dev" +makedepends="dune ocaml ocaml-findlib ocamlbuild opam" +subpackages="$pkgname-dev" +source="$pkgname-$pkgver.tar.gz::https://github.com/ocaml/$pkgname/archive/$pkgver.tar.gz" +builddir="$srcdir/$pkgname-$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 and changelog. + rm -Rf usr/doc + + # Remove annotation files and sources. + find usr/lib/ocaml \ + \( -name '*.cmt' -o -name '*.cmti' -o -name '*.ml' \) \ + -a -delete +} + +dev() { + local sitelib="usr/lib/ocaml/re" + default_dev + + cd "$pkgdir" + + local path + for path in $(find $sitelib -name '*.cmx' -o -name '*.cmxa' -o -name '*.mli'); do + mkdir -p "${path%/*}" + mv "$path" "$subpkgdir"/${path%/*}/ + done +} + +sha512sums="d8820aed7728ba5d195b1db5135281b1c95bbcd105800e52ca2efb1637b2b251e3b5e1b14dadc212b87f2ec5e7af0bfe3e9244b13e905433240cd34c102029c2 ocaml-re-1.7.2.tar.gz" |