blob: 759bec2ebcf7bb9e44be3c4b56656573d9e2f6b4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# Contributor: Chris Kruger <alpine@krugerheavyindustries.com>
# Maintainer: Chris Kruger <alpine@krugerheavyindustries.com>
pkgname=vaultwarden
pkgver=1.25.2
pkgrel=0
pkgdesc="bitwarden alternative backend"
_bw_web_ver=2022.6.2
provides="bitwarden_rs=$pkgver-r$pkgrel"
replaces="bitwarden_rs"
url="https://github.com/dani-garcia/vaultwarden"
arch="all !ppc64le !s390x !riscv64" # ring crate has platform specific asm - no ppc support, no rust on s390x
license="GPL-3.0-only"
makedepends="rust cargo sqlite-dev libpq-dev mariadb-dev openssl-dev"
subpackages="$pkgname-doc $pkgname-openrc"
install="$pkgname.pre-install"
pkgusers="vaultwarden"
pkggroups="vaultwarden"
source="$pkgname-$pkgver.tar.gz::https://github.com/dani-garcia/vaultwarden/archive/$pkgver.tar.gz
$pkgname-webvault-$_bw_web_ver.tar.gz::https://github.com/dani-garcia/bw_web_builds/releases/download/v$_bw_web_ver/bw_web_v$_bw_web_ver.tar.gz
$pkgname.initd
$pkgname.confd"
export CARGO_PROFILE_RELEASE_LTO=true
export CARGO_PROFILE_RELEASE_PANIC=abort
export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1
export CARGO_PROFILE_RELEASE_OPT_LEVEL="s"
prepare() {
default_prepare
cargo fetch --locked
}
build() {
cargo build --release --features sqlite,postgresql,mysql,enable_mimalloc --frozen
}
check() {
cargo test --release --features sqlite,postgresql,mysql,enable_mimalloc --frozen
}
package() {
install -d "$pkgdir"/usr/sbin
install -m755 target/release/vaultwarden "$pkgdir"/usr/sbin/
install -d -m744 -o vaultwarden -g vaultwarden "$pkgdir"/var/lib/vaultwarden "$pkgdir"/var/log/"$pkgname"
(cd "$srcdir"/web-vault; find . -type f -exec \
install -Dm644 -o vaultwarden -g vaultwarden {} "$pkgdir"/var/lib/vaultwarden/web-vault/{} \;)
(cd "$builddir"/src/static; find . -type f -exec \
install -Dm644 -o vaultwarden -g vaultwarden {} "$pkgdir"/var/lib/vaultwarden/{} \;)
install -Dm644 README.md "$pkgdir"/usr/share/doc/vaultwarden/README.md
install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
install -Dm655 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
}
sha512sums="
a8fa394cf3313b6f83e81b6b3969eb12b19a81f55289539d8ef7aac7fdc670404dc4af27d635364d61bc34fb7d4512eed6089aa6a6c901d35db0dabcbda123c2 vaultwarden-1.25.2.tar.gz
e4a079a36842e23919a03f14bc4ec66dae8db71139747faa788f5026c219a24394b0a6cc99b51c4f0454e323730222a09e1d21a6dd7ab2851c0b8e92903c77df vaultwarden-webvault-2022.6.2.tar.gz
c15bbe6b21ab576c7532e1e2781068d99ef163a84a93414db0246113730e1cc058b6007ea2129d81c678aae035fd91be0e8c031f25de24b826a92d4ce8999aa3 vaultwarden.initd
115cfa4ca84cdac41736b366a2c5e729adf5a5a8499c8a06dfd9d1544b64a365d6fbc3ceeb3aef54141aa29694e7054f03dd9589092c46be32d94e3537167e16 vaultwarden.confd
"
|