File vaultwarden-webvault.spec of Package vaultwarden-webvault-dark

%define pkg_name vaultwarden

Name:       %{pkg_name}-webvault-dark
Version:    2025.1.1
Release:    0
License:    GPL-3.0
Summary:    Unofficial Bitwarden-WebVault compatible with Vaultwarden
Url:        https://github.com/dani-garcia/bw_web_builds
Group:      Applications/System
BuildArch:  noarch
Source0:    bw_web_v%{version}.tar.gz

BuildRequires: tar

Requires: %{pkg_name} >= 1.32.0

BuildRoot: %{_tmppath}/%{pkg_name}-%{version}-%{release}-root

%description
%{SUMMARY}

%prep
%{__tar} -xf %{SOURCE0}

%clean

%build
%{__sed} -i 's#<html class="theme_light">#<html class="theme_dark">#' web-vault/index.html
%{__sed} -i 's#<html class="theme_light">#<html class="theme_dark">#' web-vault/sso-connector.html
%{__sed} -i 's#this.theme=\(.*\)Light#this.theme=\1Dark#' web-vault/app/main.*.js

%install
install -m 755 -d %{buildroot}%{_datarootdir}/%{pkg_name}

%{__cp} -dR web-vault %{buildroot}%{_datarootdir}/%{pkg_name}/

%files
%defattr(-,root,root,-)
%dir %attr(555,-,-) %{_datarootdir}/%{pkg_name}/
%{_datarootdir}/%{pkg_name}/*
openSUSE Build Service is sponsored by