From baf84b5dc40680c2500732d39d1a1e8aa8dec2ec Mon Sep 17 00:00:00 2001 From: madomado Date: Thu, 14 Aug 2025 13:57:26 +0800 Subject: [PATCH] add: bitwarden-cli (#6022) --- anda/apps/bitwarden/cli/anda.hcl | 8 +++++ anda/apps/bitwarden/cli/bitwarden-cli.spec | 40 ++++++++++++++++++++++ anda/apps/bitwarden/cli/update.rhai | 3 ++ 3 files changed, 51 insertions(+) create mode 100644 anda/apps/bitwarden/cli/anda.hcl create mode 100644 anda/apps/bitwarden/cli/bitwarden-cli.spec create mode 100644 anda/apps/bitwarden/cli/update.rhai diff --git a/anda/apps/bitwarden/cli/anda.hcl b/anda/apps/bitwarden/cli/anda.hcl new file mode 100644 index 0000000000..240de1b3ce --- /dev/null +++ b/anda/apps/bitwarden/cli/anda.hcl @@ -0,0 +1,8 @@ +project pkg { + rpm { + spec = "bitwarden-cli.spec" + } + labels { + updbranch = 1 + } +} diff --git a/anda/apps/bitwarden/cli/bitwarden-cli.spec b/anda/apps/bitwarden/cli/bitwarden-cli.spec new file mode 100644 index 0000000000..ef3ac97e59 --- /dev/null +++ b/anda/apps/bitwarden/cli/bitwarden-cli.spec @@ -0,0 +1,40 @@ +%define debug_package %nil +%global __strip /bin/true + +%ifarch aarch64 +%global armsuffix -arm64 +%endif + +Name: bitwarden-cli +Version: 2025.7.0 +Release: 1%?dist +Summary: Bitwarden command-line client +License: GPL-3.0-only +URL: https://bitwarden.com +Source0: https://github.com/bitwarden/clients/archive/refs/tags/cli-v%version.tar.gz + +Packager: madonuko +Provides: bw + +BuildRequires: nodejs-npm +BuildRequires: gcc-c++ gcc make + +%description +%summary. + +%prep +%autosetup -n clients-cli-v%version +npm i + +%build +pushd apps/cli +npm i +npm run dist:oss:lin%?armsuffix + +%install +install -Dm755 apps/cli/dist/oss/linux%?armsuffix/bw -t %buildroot%_bindir + +%files +%doc README.md SECURITY.md CONTRIBUTING.md +%license LICENSE.txt LICENSE_GPL.txt LICENSE_BITWARDEN.txt +%_bindir/bw diff --git a/anda/apps/bitwarden/cli/update.rhai b/anda/apps/bitwarden/cli/update.rhai new file mode 100644 index 0000000000..5ac855ef2d --- /dev/null +++ b/anda/apps/bitwarden/cli/update.rhai @@ -0,0 +1,3 @@ +import "andax/bump_extras.rhai" as bump; + +rpm.version(bump::madoguchi("bitwarden-cli.bin", labels.branch));