debmaker/ressources/rustdesk-server/debmaker

38 lines
982 B
Text
Raw Normal View History

#!/bin/bash
APP=rustdesk-server
2023-06-12 10:55:41 +02:00
VERSION=1.1.8
GIT_VERSION=$VERSION
DEB_VERSION=$VERSION-$(date +%Y%m%d%H%M)
DEBIAN_VERSION_CODENAME=bullseye
IMAGE_SIZE=5
DEPOT=https://github.com/rustdesk/rustdesk-server.git
2023-01-18 01:42:07 +01:00
PACKAGE_DEPENDENCY="build-essential"
2023-01-18 01:42:07 +01:00
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
2023-01-18 01:42:07 +01:00
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
}