summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 32a90f04ca08fa5570489705fd03d7ad77a5b3bd (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
# Maintainer Marek Vospěl <marek@vospel.cz>

pkgname='elk-zone-git'
pkgdesc='Native version of Elk, a nimble Mastodon web client.'
url='https://github.com/elk-zone/elk-native'
pkgver=r191.73fd12c
pkgrel=1
arch=('any')
license=('MIT')

makedepends=('rust' 'cargo' 'cargo-tauri' 'pnpm' 'jq' 'openssl' 'appmenu-gtk-module' 'webkit2gtk' 'gtk3' 'libappindicator-gtk3' 'librsvg' 'libvips' 'git' 'npm' 'binutils')
depends=('webkit2gtk' 'gtk3' 'libappindicator-gtk3' 'librsvg' 'libvips')

source=("$pkgname::git+https://github.com/elk-zone/elk-native.git")
sha256sums=('SKIP')

pkgver() {
  cd "$pkgname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "$pkgname"
  git submodule init
  git submodule update

  cd elk
  pnpm i
  cd ..

  # Disable updater and only build the executable
  echo "$(cat src-tauri/tauri.conf.json | jq 'del(.tauri.updater)')" > src-tauri/tauri.conf.json
  echo "$(cat src-tauri/tauri.conf.json | jq '.tauri.bundle.targets = "deb"')" > src-tauri/tauri.conf.json
  cargo tauri build
}

package() {
  ar x elk-zone-git/target/release/bundle/deb/elk_*.deb

  tar -zxvf ./data.tar.gz -C "$pkgdir"
}