upgpkg: ufw 0.36.2-1
[ArchLinux/community.git] / vaultwarden-web / repos / community-any / PKGBUILD
blob5bd43198b27d82d0283a056cf70ac7e1c520decc
1 # Maintainer: Daniel M. Capella <polyzen@archlinux.org>
2 # Maintainer: George Rawlinson <grawlinson@archlinux.org>
3 # Contributor: Markus Richter <mqus at disroot dot org>
5 pkgname=vaultwarden-web
6 _pkgver=2023.4.2
7 pkgver=2023.4.2
8 _upstreamver=${_pkgver%[[:lower:]]}
9 #_patchver=$_upstreamver
10 _patchver=2023.4.0 # almost always out of sync now
11 pkgrel=1
12 pkgdesc='Bitwarden web vault with the patches to make it work with Vaultwarden'
13 arch=('any')
14 url='https://github.com/dani-garcia/bw_web_builds'
15 license=('GPL3')
16 depends=('vaultwarden')
17 makedepends=('git' 'nodejs-lts-gallium' 'npm')
18 provides=('bitwarden_rs-vault' 'bitwarden_rs-web')
19 replaces=('bitwarden_rs-vault' 'bitwarden_rs-web')
20 install=$pkgname.install
21 source=(
22   "bitwarden-clients::git+https://github.com/bitwarden/clients.git#tag=web-v$_upstreamver"
23   "bw_web_builds::git+https://github.com/dani-garcia/bw_web_builds#tag=v$_pkgver"
25 b2sums=('SKIP'
26         'SKIP')
28 pkgver() {
29   echo $_pkgver | sed 's/[[:lower:]]$/.&/'
32 prepare() {
33   cd bitwarden-clients
35   # copy vaultwarden images
36   cp -vr "$srcdir/bw_web_builds/resources/src/images/"{logo-{dark,white}@2x,icon-white}.png apps/web/src/images
38   # apply vaultwarden patch
39   patch --forward --strip=1 --input="$srcdir/bw_web_builds/patches/v$_patchver.patch"
41   npm ci
44 build() {
45   cd bitwarden-clients/apps/web
47   npm run dist:oss:selfhost
50 package() {
51   install -d "$pkgdir/usr/share/webapps/$pkgname"
53   cp -R bitwarden-clients/apps/web/build/* "$pkgdir/usr/share/webapps/$pkgname"
56 # vim:set ts=2 sw=2 et: