debmaker/ressources/vaultwarden/debmaker

27 lines
742 B
Plaintext
Raw Normal View History

2022-02-12 18:30:28 +01:00
#!/bin/bash
VERSION=1.25.2
APP=vaultwarden
GIT_VERSION=$VERSION
DEB_VERSION=$VERSION-$(date +%Y%m%d%H%M)
DEBIAN_VERSION_CODENAME=bullseye
IMAGE_SIZE=8
DEPOT=https://github.com/dani-garcia/vaultwarden.git
2022-08-17 20:35:16 +02:00
PACKAGE_DEPENDENCY="build-essential libmariadb-dev libpq-dev pkg-config libmysql++-dev"
2022-08-17 20:35:16 +02:00
STEP="base_package_upgrade install_package_dependency install_rust default_prebuild build makedeb"
2022-02-12 18:30:28 +01:00
build() {
cd /tmp/${APP}
2022-02-12 18:30:28 +01:00
source ~/.cargo/env
cargo build --features sqlite,mysql,postgresql --release
}
makedeb(){
2022-02-24 00:02:53 +01:00
PATH_DEB=/tmp/src/rootfs
2022-02-12 18:30:28 +01:00
cp -fr /tmp/${APP}/target/release/vaultwarden ${PATH_DEB}/usr/lib/vaultwarden/
2022-02-24 00:02:53 +01:00
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
2022-02-12 18:30:28 +01:00
}