summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e46909be215a1ad1308ef1d44911c56d533c4040 (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
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
pkgname=mullvad-ping
pkgver=0.9.5
pkgrel=2
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=(
  'iputils'
  'libgcc'
)
makedepends=(
  'deno'
  'unzip'
)
options=('!strip')
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('f6d7f8d3eadd88e5360e58847f1f2950c4a6488b126c49baa2407e2e3ad9e448')

build() {
  cd "$pkgname-$pkgver"
  deno compile \
    --allow-net=api.mullvad.net,jsr.io \
    --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/"
}