summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0c69dd3cf070860983b068b33d72f374ffcd1d08 (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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Maintainer: justbispo <aur.fyxy0@slmail.me>
pkgname=(
  vencord-git
  chromium-vencord-git
  firefox-vencord-git
  firefox-developer-edition-vencord-git
  librewolf-vencord-git
)
pkgbase=vencord-git
_pkgname=Vencord
pkgver=1.10.4.r0.g013c8d0
pkgrel=1
pkgdesc="The cutest Discord client mod"
arch=(any)
url=https://vencord.dev
_ghurl="https://github.com/Vendicated/Vencord"
license=(GPL3)
makedepends=(
  git
  pnpm
)
source=("git+$_ghurl.git")
sha256sums=('SKIP')

pkgver() {
  cd "$srcdir"/$_pkgname
  git describe --long --tags --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd "$srcdir"/$_pkgname
  pnpm install --frozen-lockfile	
}

build() {
  cd "$srcdir"/$_pkgname
  pnpm buildStandalone && pnpm buildWeb
}

check() {
  cd "$srcdir"/$_pkgname
  pnpm test && pnpm testWeb
}

package_vencord-git() {
  depends=(vesktop)
  provides=(vencord)
  conflicts=(vencord)
  install=vencord.install
  
  cd "$srcdir"/$_pkgname
  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/vencord/LICENSE
  install -Dm644 README.md "$pkgdir"/usr/share/doc/vencord/README.md
  cd dist/
  install -d "$pkgdir"/usr/lib/vencord
  cp -r -- vencord* preload* patcher* renderer* "$pkgdir"/usr/lib/vencord
}

package_chromium-vencord-git() {
  pkgdesc+=' (unpacked webextension)'
  optdepends=(chromium vivaldi google-chrome opera brave ungoogled-chromium)
  provides=(chromium-vencord)
  conflicts=(chromium-vencord)
  install=vencord.install
  
  cd "$srcdir"/$_pkgname/dist/chromium-unpacked
  install -dm755 "$pkgdir"/usr/lib/vencord-chromium
  cp -r -- * "$pkgdir"/usr/lib/vencord-chromium
}

package_firefox-vencord-git() {
  depends=(firefox)
  provides=(firefox-vencord)
  conflicts=(firefox-vencord)
  install=vencord.install

  cd "$srcdir"/$_pkgname/dist
  install -Dm644 extension-firefox.zip "$pkgdir"/usr/lib/firefox/browser/extensions/vencord-firefox@vendicated.dev.xpi
}

package_firefox-developer-edition-vencord-git() {
  depends=(firefox-developer-edition)
  provides=(firefox-vencord)
  conflicts=(firefox-vencord)
  install=vencord.install

  cd "$srcdir"/$_pkgname/dist
  install -Dm644 extension-firefox.zip "$pkgdir"/usr/lib/firefox-developer-edition/browser/extensions/vencord-firefox@vendicated.dev.xpi
}

package_librewolf-vencord-git() {
  depends=(librewolf)
  provides=(librewolf-vencord)
  conflicts=(librewolf-vencord)
  install=vencord.install

  cd "$srcdir"/$_pkgname/dist
  install -Dm644 extension-firefox.zip "$pkgdir"/usr/lib/librewolf/browser/extensions/vencord-firefox@vendicated.dev.xpi
}