summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3eac99996637bb87c03e4bcf0c4e5a35438b7b85 (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
58
pkgname=extera-next-bin
pkgver=26.4.31
pkgrel=1
pkgdesc="A feature-rich Matrix client made in Flutter"
arch=('x86_64')
url="https://github.com/ExteraApp/Extera"
license=('AGPL-3.0-only')
provides=('extera-next')
conflicts=('extera-next')
depends=(
  'gtk3'
  'libsecret'
  'libkeybinder3'
  'openssl'
  'webkit2gtk-4.1'
  'xdg-user-dirs'
  'ttf-roboto'
  'ttf-roboto-mono'
)
makedepends=('curl')
source=(
  "bundle.tar.gz::https://extera.xyz/next/bundle.tar.gz"
)
sha256sums=('SKIP')

pkgver() {
  curl -s "https://raw.githubusercontent.com/ExteraApp/Extera/main/pubspec.yaml" \
    | sed -n 's/^version: \([^+]*\).*/\1/p'
}

package() {
  cd "$srcdir/bundle"

  install -d "$pkgdir/usr/lib/extera_next"
  cp -r ./* "$pkgdir/usr/lib/extera_next/"

  install -d "$pkgdir/usr/bin"
  ln -s /usr/lib/extera_next/extera_next "$pkgdir/usr/bin/extera-next"

  install -d "$pkgdir/usr/share/applications"
  cat > "$pkgdir/usr/share/applications/extera-next.desktop" <<EOF
[Desktop Entry]
Name=extera-next
Comment=A feature-rich Matrix client made in Flutter
Exec=extera-next
Icon=extera
Type=Application
MimeType=x-scheme-handler/matrix;
StartupWMClass=extera_next
Terminal=false
Categories=Network;Chat;InstantMessaging;X-Matrix;
EOF

  if [ -f "$srcdir/bundle/data/flutter_assets/assets/logo.png" ]; then
    install -Dm644 "$srcdir/bundle/data/flutter_assets/assets/logo.png" \
      "$pkgdir/usr/share/pixmaps/extera.png"
  fi
}