aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml-sha
diff options
context:
space:
mode:
authorAndy Li <andy@onthewings.net>2019-12-13 22:12:22 +0800
committerRasmus Thomsen <oss@cogitri.dev>2019-12-23 00:45:10 +0100
commitc0d6f1321393c5220147b5883b4548d66d0ce901 (patch)
tree22d2b51acf6e4823526caf2b32806ebbc0af5f9f /testing/ocaml-sha
parente606071a92b095ff6618bdff1106afa5fd43c0a7 (diff)
downloadaports-c0d6f1321393c5220147b5883b4548d66d0ce901.tar.bz2
aports-c0d6f1321393c5220147b5883b4548d66d0ce901.tar.xz
testing/ocaml-sha: new aport
https://github.com/djs55/ocaml-sha Binding to the SHA cryptographic functions
Diffstat (limited to 'testing/ocaml-sha')
-rw-r--r--testing/ocaml-sha/APKBUILD49
1 files changed, 49 insertions, 0 deletions
diff --git a/testing/ocaml-sha/APKBUILD b/testing/ocaml-sha/APKBUILD
new file mode 100644
index 0000000000..0dcec29b61
--- /dev/null
+++ b/testing/ocaml-sha/APKBUILD
@@ -0,0 +1,49 @@
+# Contributor: Andy Li <andy@onthewings.net>
+# Maintainer: Andy Li <andy@onthewings.net>
+pkgname=ocaml-sha
+pkgver=1.12
+pkgrel=0
+pkgdesc="Binding to the SHA cryptographic functions"
+url="https://github.com/djs55/ocaml-sha"
+arch="all !x86 !armhf !armv7 !s390x" # limited by ocaml aport
+license="ISC"
+depends="ocaml-runtime"
+depends_dev="$pkgname=$pkgver-r$pkgrel"
+makedepends="dune ocaml ocaml-findlib ocaml-ounit-dev"
+subpackages="$pkgname-dev"
+source="$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz"
+
+build() {
+ dune build @install -p sha --no-buffer --verbose
+}
+
+check() {
+ dune runtest --verbose
+}
+
+package() {
+ mkdir -p "$pkgdir"/usr/lib/ocaml
+ dune install --destdir="$pkgdir"
+
+ # There are just CHANGES, README, and LICENSE.
+ rm -Rf "$pkgdir"/usr/doc
+
+ # Remove annotation files and sources.
+ rm \
+ "$pkgdir"/usr/lib/ocaml/sha/*.cmt \
+ "$pkgdir"/usr/lib/ocaml/sha/*.cmti \
+ "$pkgdir"/usr/lib/ocaml/sha/*.ml
+}
+
+dev() {
+ default_dev
+
+ mkdir -p "$subpkgdir"/usr/lib/ocaml/sha
+ mv \
+ "$pkgdir"/usr/lib/ocaml/sha/*.cmx \
+ "$pkgdir"/usr/lib/ocaml/sha/*.cmxa \
+ "$pkgdir"/usr/lib/ocaml/sha/*.mli \
+ "$subpkgdir"/usr/lib/ocaml/sha/
+}
+
+sha512sums="e6cdbc66202281a72ccc3592d6efba0448fe28dba7a23f8079d3a3cee12c03d01338191da88e4e4834f5ee19321ffed1c950e7a5babc73479221d8da3fe372d3 ocaml-sha-1.12.tar.gz"