summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 62f559319f5fcc83e1f8e247391c4c2a5c99b313 (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
# Maintainer: Diablo (https://github.com/progzone122) (https://t.me/DiabloSat)
pkgname=warp-gui
pkgver=0.3.0
pkgrel=2
pkgdesc="A GUI application based on warp-cli for linux written in Rust"
arch=('x86_64')
url="https://github.com/progzone122/warp-cloudflare-gui-rust"
options=(!lto !strip)
license=('GPL-3.0-or-later')
depends=(
  'pacman>6.1'
  'cloudflare-warp-bin'
  'qt6-base'
  'webkit2gtk-4.1'
)
optdepends=(
  'sudo: privilege elevation'
  'doas: privilege elevation'
)
makedepends=()
source=(
  "https://github.com/progzone122/warp-cloudflare-gui-rust/releases/download/$pkgver/warp-gui.deb"
)
sha256sums=('5beca64e4dacb0b3937d443625c7ca993ceb4f6dacd0155e7e8e947e437ae87a')
build() {
  :
}

package() {
  mkdir -p "$srcdir/data"

  bsdtar -xf "$srcdir/data.tar.gz" -C "$srcdir/data"

  if [ -d "$srcdir/data/usr" ]; then
    cp -r "$srcdir/data/usr" "$pkgdir/"
  elif [ -d "$srcdir/data/opt" ]; then
    cp -r "$srcdir/data/opt" "$pkgdir/"
  else
    echo "ERROR: Invalid structure data.tar.gz" >&2
    return 1
  fi

  chmod -R 755 "$pkgdir/"
}

post_install() {
  echo "To enable the warp-svc service, run the following command:"
  echo "sudo systemctl enable warp-svc.service --now"
  echo "And then type in:"
  echo "warp-cli registration new"
}