blob: e701206bc0dcf6e66e78cce37b75c13220a6af7e (
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: Sankalp Gambhir <sankalp.gambhir42@gmail.com>
pkgname=stainless-git
pkgver=0.9.8.9.r0.00103687f
pkgrel=1
pkgdesc="Verification framework and tool for higher-order Scala programs"
arch=(x86_64)
url="https://github.com/epfl-lara/stainless"
license=('Apache-2.0')
groups=()
depends=('java-runtime>=11')
makedepends=(git sbt)
optdepends=('z3: for using as a solver backend' 'cvc4: for using as a solver backend' 'cvc5: for using as a solver backend')
provides=("${pkgname%-*}")
conflicts=("${pkgname%-*}")
replaces=()
backup=()
options=()
install=
source=('git+https://github.com/epfl-lara/stainless')
noextract=()
md5sums=('SKIP')
pkgver() {
cd "$srcdir/${pkgname%-*}"
printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
}
prepare() {
cd "$srcdir/${pkgname%-*}"
git submodule update --init --recursive
}
build() {
cd "$srcdir/${pkgname%-*}"
sbt assembly
SCALA_VER="$(grep "val stainlessScalaVersion = " build.sbt | awk '{gsub(/"/, "", $4); print $4}')"
cp "./frontends/dotty/target/scala-$SCALA_VER/stainless-dotty-assembly-$(git describe).jar" stainless.jar
touch stainless
chmod +x stainless
echo "#!/bin/sh" > stainless
echo "exec /usr/bin/java -jar './stainless.jar' \"\$@\"" >> stainless
}
package() {
cd "$srcdir/${pkgname%-*}"
echo "#!/bin/sh" > stainless
echo "exec /usr/bin/java -jar '/usr/share/java/stainless/stainless.jar' \"\$@\"" >> stainless
# copy package jar
install -Dm644 "stainless.jar" "$pkgdir/usr/share/java/stainless/stainless.jar"
# copy shell script
install -Dm755 "stainless" "$pkgdir/usr/bin/stainless"
# copy license
install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
|