summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d82ce589153aae8817dfdbfe15a0dfdac19d2cad (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
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
pkgname=mullvad-ping
pkgver=0.8.0
pkgrel=1
pkgdesc="Gets the list of Mullvad servers with the best latency according to ping"
arch=('x86_64' 'aarch64')
url="https://github.com/grant0417/mullvad-ping"
license=('MIT')
depends=('gcc-libs')
makedepends=('deno' 'unzip')
options=('!strip')
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('6f5c0a667b22471dc5752d3ca42f52b51d864e48fe99d6aaa6bac3e6a2315562')

build() {
  cd "$pkgname-$pkgver"
  deno compile \
    --allow-net=api.mullvad.net,deno.land \
    --allow-run=ping \
    --target ${CARCH}-unknown-linux-gnu \
    -o "$pkgname" script.ts
}

package() {
  cd "$pkgname-$pkgver"
  install -Dm755 "$pkgname" -t "$pkgdir/usr/bin/"
  install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
}