1 # Maintainer: Daniel M. Capella <polyzen@archlinux.org>
2 # Maintainer: George Rawlinson <grawlinson@archlinux.org>
3 # Contributor: Markus Richter <mqus at disroot dot org>
4 # Contributor: Timothée Ravier <tim@siosm.fr
9 pkgdesc='Unofficial Bitwarden compatible server written in Rust'
11 url=https://github.com/dani-garcia/vaultwarden
21 makedepends=('git' 'rust')
22 optdepends=('vaultwarden-web: for the web app')
23 provides=('bitwarden_rs')
24 replaces=('bitwarden_rs')
25 backup=('etc/vaultwarden.env')
27 install=$pkgname.install
28 _commit='0b28ab3be101b58cf27b43da14bcf893fa37c1c8'
30 "$pkgname::git+$url#commit=$_commit"
36 'ff8e896f820b88f079d3d4f4c2eb394362569c921f53693e25d3badaf9fdca841e4d7665862e09d22421f544802f3a64014696fd92d7f0b923faf41f8d99e472'
37 '6580cf4031f262638abf11e529e8dfc489197afd6cd616c6a7810741e03c004706a5f9358f825aac6644c0ab6b251627ff988ed68f8264120b3575a655972390'
38 '9cdcd6c997c884eb3c1ad0c9b8cd91e68ec6762a27f9b80a7eb6c0cb1ffa4e500a654da6f17e9f985cc67add154efe737761f74e4e5f72892fc0e9d457314973')
43 git describe --tags | sed 's/^v//'
49 # change various defaults
50 sed -i "s,# DATA_FOLDER=data,DATA_FOLDER=/var/lib/$pkgname,
51 s,web-vault/,/usr/share/webapps/$pkgname-web,
52 s,# WEB_VAULT_ENABLED=true,WEB_VAULT_ENABLED=false,
53 s,/path/to/log,/var/log/$pkgname.log,
54 /^# ROCKET_TLS/a ROCKET_LIMITS={json=10485760}" .env.template
56 # download dependencies
57 cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
63 VW_VERSION="$pkgver" cargo build --release --frozen --features sqlite,mysql,postgresql
69 cargo test --frozen --features sqlite,mysql,postgresql
74 install -vDm644 systemd.service "$pkgdir/usr/lib/systemd/system/$pkgname.service"
75 install -vDm644 sysusers.conf "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
76 install -vDm644 tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
81 install -Dm644 .env.template "$pkgdir"/etc/$pkgname.env
84 install -vDm755 -t "$pkgdir/usr/bin" "target/release/$pkgname"
87 # vim:set ts=2 sw=2 et: