33 lines
679 B
Bash
Executable file
33 lines
679 B
Bash
Executable file
#!/bin/bash
|
|
|
|
VERSION=0.15.1
|
|
APP=sqlpage
|
|
GIT_VERSION=v$VERSION
|
|
DEB_VERSION=$VERSION-$(date +%Y%m%d%H%M)
|
|
DEBIAN_VERSION_CODENAME=bookworm
|
|
IMAGE_SIZE=8
|
|
DEPOT=https://github.com/lovasoa/SQLpage.git
|
|
PACKAGE_DEPENDENCY="build-essential"
|
|
|
|
main(){
|
|
base_package_upgrade
|
|
install_package_dependency
|
|
install_rust
|
|
default_prebuild
|
|
build
|
|
#makedeb
|
|
}
|
|
|
|
build() {
|
|
cd /tmp/${APP}
|
|
source ~/.cargo/env
|
|
cargo build --profile superoptimized --locked
|
|
}
|
|
|
|
makedeb(){
|
|
PATH_DEB=/tmp/src/rootfs
|
|
|
|
cp -fr /tmp/${APP}/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
|
|
}
|