blob: 74b190b35a2d122ea7c788c102d08c7ba6fb9a88 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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 !mips !mips64" # 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"
|