43 lines
1.1 KiB
Bash
43 lines
1.1 KiB
Bash
# Template file for 'vaultwarden-web'
|
|
pkgname=vaultwarden-web
|
|
version=2022.10.2
|
|
revision=1
|
|
_patch_ver=2022.10.0
|
|
create_wrksrc=yes
|
|
build_wrksrc="clients-web-v${version}"
|
|
hostmakedepends="git nodejs"
|
|
short_desc="Web vault builds for vaultwarden"
|
|
maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
|
|
license="GPL-3.0-or-later"
|
|
homepage="https://github.com/dani-garcia/bw_web_builds"
|
|
distfiles="https://github.com/bitwarden/clients/archive/web-v${version}.tar.gz
|
|
https://raw.githubusercontent.com/dani-garcia/bw_web_builds/master/patches/v${_patch_ver}.patch"
|
|
checksum="6ec4fcae9ce26ecf55647f58598cbb4c4c0b6b093053f9d208781a4fc0c81fda
|
|
83484ec2106cf8b9d2c52b4284e3f3b876a5b9e9e0767eda69a1987304ddbaad"
|
|
|
|
post_extract() {
|
|
mv v$_patch_ver.patch ${build_wrksrc}
|
|
}
|
|
|
|
post_patch() {
|
|
patch -Np1 -i v$_patch_ver.patch
|
|
}
|
|
|
|
do_configure() {
|
|
npm ci --ignore-scripts
|
|
}
|
|
|
|
do_build() {
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
i686*) export NODE_OPTIONS="--max-old-space-size=2048" ;;
|
|
esac
|
|
cd apps/web
|
|
npm run dist:oss:selfhost
|
|
}
|
|
|
|
do_install() {
|
|
cd apps/web
|
|
vmkdir usr/share/webapps/vaultwarden-web
|
|
vcopy build/* usr/share/webapps/vaultwarden-web
|
|
}
|