blob: 64dde740a7ec8bcbca20ecf515b37382d9e7b133 (
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
|
# Maintainer: Daniel Peukert <daniel@peukert.cc>
# Contributor: Joel Goguen <contact+aur@jgoguen.ca>
# Contributor: Jordan Klassen <forivall@gmail.com>
_pkgname='flow'
pkgname="$_pkgname-bin"
pkgver='0.265.2'
pkgrel='1'
pkgdesc='A static type checker for JavaScript - binary version'
arch=('x86_64' 'aarch64')
url="https://$_pkgname.org"
license=('MIT')
provides=("$_pkgname=$pkgver")
conflicts=("$_pkgname")
source_x86_64=(
"$pkgname-$pkgver-x86_64.zip::https://github.com/facebook/$_pkgname/releases/download/v$pkgver/$_pkgname-linux64-v$pkgver.zip"
"$pkgname-$pkgver-parser-x86_64.zip::https://github.com/facebook/$_pkgname/releases/download/v$pkgver/lib${_pkgname}parser-linux64-v$pkgver.zip"
)
source_aarch64=(
"$pkgname-$pkgver-aarch64.zip::https://github.com/facebook/$_pkgname/releases/download/v$pkgver/$_pkgname-linux-arm64-v$pkgver.zip"
)
source=(
"$pkgname-$pkgver-bash-completion::https://github.com/facebook/$_pkgname/raw/v$pkgver/resources/shell/bash-completion"
"$pkgname-$pkgver-LICENSE::https://github.com/facebook/$_pkgname/raw/v$pkgver/LICENSE"
)
b2sums=('31a3133c70ea57e8fd8025add5701b9be627020d4f82655e7911853b33e3197eb53893fd119348112839d877a8d668aedfa15c7bb214de8f573b8453f69c4cc3'
'20291e21101540292f47589798cc1264fd5fc496b556ccdb1264381ff093a6be8677270fa7b3d342a42d78758b1f2d41fb4a759d3a590c41cefd0b375b8d8b70')
b2sums_x86_64=('c85c5d50e08e82b4e7bc12d2099fd0ff9acb5c221349f4a0f2b27276c3f2438b5ac2fa99dce1faad20a0e06559d40cf45a4b905ec4467fa099f1cbfa3477a29d'
'54481e63867b2b6a538994cde8a95541bca351fcf30950a09a4b4ba1135f0c7701d108315fcfa5ee4a749029e33767f679c8276f8286fadf0b6e55eb720e5dd2')
b2sums_aarch64=('f1318891ccf4d995fc858edcf012dd886963bf3976526b7c6ae78558231cd1cd4f6c1898e99fb00c74827a0828501424310413ccba073313d2c32356d767e47f')
check() {
_checkoutput="$("$srcdir/$_pkgname/$_pkgname" --version)"
printf '%s\n' "$_checkoutput"
printf '%s\n' "$_checkoutput" | grep -q "version $pkgver$"
}
package() {
cd "$srcdir/"
# Binary
install -Dm755 "$_pkgname/$_pkgname" "$pkgdir/usr/bin/$_pkgname"
# Parser library files (if we have them)
if [ "$CARCH" != 'aarch64' ]; then
install -dm755 "$pkgdir/usr/lib/ocaml/${_pkgname}parser/"
install -Dm644 "lib${_pkgname}parser/include/${_pkgname}parser/"* "$pkgdir/usr/lib/ocaml/${_pkgname}parser/"
install -dm755 "$pkgdir/usr/lib/"
install -Dm644 "lib${_pkgname}parser/lib/"* "$pkgdir/usr/lib/"
fi
# Misc files
install -Dm644 "$pkgname-$pkgver-bash-completion" "$pkgdir/usr/share/bash-completion/completions/$_pkgname"
install -Dm644 "$pkgname-$pkgver-LICENSE" "$pkgdir/usr/share/licenses/$pkgname/MIT"
}
|