use generic file name to store compilation instruction

Add GLPI (with github clone to patch install)
This commit is contained in:
thomas 2022-03-06 00:37:44 +01:00
parent 38ded86d9f
commit 853e9f431b
28 changed files with 170 additions and 50 deletions

42
ressources/vaultwarden/debmaker Executable file
View file

@ -0,0 +1,42 @@
#!/bin/bash
[ -e ./lib/function.sh ] && source ./lib/function.sh
APP=vaultwarden
VERSION=1.24.0
GIT_VERSION=$VERSION
DEB_VERSION=$VERSION-1
DEBIAN_VERSION_CODENAME=bullseye
IMAGE_SIZE=6
STEP="envinit prebuild build makedeb"
envinit() {
apt install -y --no-install-recommends build-essential git wget fakeroot dpkg ca-certificates libmariadb-dev libpq-dev pkg-config libmysql++-dev
cd /tmp
wget -qO - https://sh.rustup.rs > rustup
bash rustup -qy
apt clean
}
prebuild(){
GIT_VERSION=$1
git clone --depth 1 -b ${GIT_VERSION} https://github.com/dani-garcia/vaultwarden.git /tmp/vaultwarden
}
build() {
cd /tmp/vaultwarden/
source ~/.cargo/env
cargo build --features sqlite,mysql,postgresql --release
}
makedeb(){
GIT_VERSION=$1
DEB_VERSION=$2
PATH_DEB=/tmp/src/rootfs
cp -fr /tmp/vaultwarden/target/release/vaultwarden ${PATH_DEB}/usr/lib/vaultwarden/
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
}