Name: vaultwarden-web Version: 2024.6.2c Epoch: 1 Release: 1%{?dist} Summary: Bitwarden web vault with patches for vaultwarden (upstream build) License: GPL-3.0-only URL: https://github.com/dani-garcia/bw_web_builds Source0: https://github.com/dani-garcia/bw_web_builds/releases/download/v%{version}/bw_web_v%{version}.tar.gz Source1: vaultwarden.sysusers BuildRequires: systemd BuildRequires: systemd-rpm-macros %description This is the Bitwarden web vault with patches applied to make it work with vaultwarden. Upstream built, just packaged. %prep %install tar xf %{SOURCE0} install -d %{buildroot}%{_datadir}/vaultwarden mv web-vault/* %{buildroot}%{_datadir}/vaultwarden/ install -Dpm 644 %{SOURCE1} %{buildroot}%{_sysusersdir}/vaultwarden.conf %files %{_datadir}/vaultwarden %{_sysusersdir}/vaultwarden.conf %pre %if 0%{?fedora} %sysusers_create_compat %{SOURCE1} %else getent group vaultwarden > /dev/null || groupadd -r vaultwarden getent passwd vaultwarden > /dev/null || useradd -M -r -g vaultwarden -c "Vaultwarden User" -s /sbin/nologin vaultwarden %endif %post chown -R vaultwarden:vaultwarden %{_datadir}/vaultwarden