blob: b5dffd1de79b0cbfb4feb1d69337d3fd412eca02 (
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
50
51
52
53
54
55
56
57
|
# Maintainer: Daniel Peukert <daniel@peukert.cc>
# Contributor: Eric Bailey <nerflad@gmail.com>
# Contributor: Marek Kubica <marek@xivilization.net>
# Contributor: Serge Zirukin <ftrvxmtrx@gmail.com>
# Contributor: Sergei Lebedev <superbobry@gmail.com>
# Contributor: Thomas S Hatch <thatch45 at gmail dot com>
# Contributor: Sebastian Wiesner <lunaryorn googlemail com>
# Contributor: Benjamin Andresen <benny(at)klapmuetz(dot)org>
# Contributor: Sylvester Johansson <syljo361(at)gmail(dot)org>
_projectname='ounit'
pkgname="ocaml-$_projectname"
pkgver='2.2.7'
pkgrel='4'
pkgdesc='Unit testing framework for OCaml'
arch=('x86_64' 'aarch64')
url="https://github.com/gildor478/$_projectname"
license=('MIT')
depends=('ocaml>=4.08.0' 'ocaml-lwt>=2.5.2')
makedepends=('dune>=3.0.0' 'ocaml-findlib')
options=('!strip')
source=(
"$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz"
'remove-shim-deps.diff'
)
b2sums=('6fb43eccf33a02d3fbbbec1fd00b2901ae69bb55e9c94790ebcfed68f676bc0a9a573f4e03edc8c542e195b68c77deae0426c884ea81ceef1149548f6b760673'
'529b83b0c45bbe08637bbb12ce5884433a33439f32f212e0614a7e290abb84bd301a5752d89a695378a8c1d2276866f9bf60759a24842a483713f4ea6e8bf969')
_sourcedirectory="$_projectname-$pkgver"
prepare() {
cd "$srcdir/$_sourcedirectory/"
# Remove seq and stdlib-shims dependencies, as we're always running on OCaml >= 4.08.0
patch --forward -p1 < '../remove-shim-deps.diff'
}
build() {
cd "$srcdir/$_sourcedirectory/"
dune build --release --verbose
}
check() {
cd "$srcdir/$_sourcedirectory/"
dune runtest --release --verbose
}
package() {
cd "$srcdir/$_sourcedirectory/"
DESTDIR="$pkgdir" dune install --prefix '/usr' --libdir '/usr/lib/ocaml' --docdir '/usr/share/doc' --mandir '/usr/share/man' --release --verbose
for _folder in "$pkgdir/usr/share/doc/"*; do
mv "$_folder" "$pkgdir/usr/share/doc/ocaml-$(basename "$_folder")"
done
install -dm755 "$pkgdir/usr/share/licenses/$pkgname"
ln -sf "/usr/share/doc/$pkgname/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/MIT"
}
|