debmaker/ressources/rustdesk-server/debmaker
2023-02-08 13:21:50 +01:00

38 lines
1,002 B
Bash
Executable file

#!/bin/bash
APP=rustdesk-server
VERSION=1.1.7-2
GIT_VERSION=$VERSION
GIT_VERSION=1.1.7
DEB_VERSION=$VERSION-$(date +%Y%m%d%H%M)
DEBIAN_VERSION_CODENAME=bullseye
IMAGE_SIZE=5
DEPOT=https://github.com/rustdesk/rustdesk-server.git
PACKAGE_DEPENDENCY="build-essential"
main() {
base_package_upgrade
install_package_dependency
install_rust
get_git_source
build
makedeb
}
build() {
cd /tmp/${APP}
source ~/.cargo/env
cargo build --release
}
makedeb(){
PATH_DEB=/tmp/src/rustdesk-server-hbbs
cp -fr //tmp/rustdesk-server/target/release/hbbs ${PATH_DEB}/usr/bin/
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
PATH_DEB=/tmp/src/rustdesk-server-hbbr
cp -fr //tmp/rustdesk-server/target/release/hbbr ${PATH_DEB}/usr/bin/
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
}