Skip to content

Instantly share code, notes, and snippets.

@sukanka
Created December 8, 2021 16:31
Show Gist options
  • Save sukanka/b41e9a3033ef31befa51e06344f5e164 to your computer and use it in GitHub Desktop.
Save sukanka/b41e9a3033ef31befa51e06344f5e164 to your computer and use it in GitHub Desktop.
PKGBUILD For rustdesk-server-demo
# Maintainer: taotieren <[email protected]>
pkgname=rustdesk-server
_pkgname=rustdesk-server
pkgver=1.1.8
pkgrel=2
pkgdesc="Yet another remote desktop software, written in Rust. Works out of the box, no configuration required. Great alternative to TeamViewer and AnyDesk! "
arch=('x86_64')
url="https://github.com/rustdesk/rustdesk"
license=('GPLv3')
makedepends=("cargo" "curl")
provides=(${_pkgname})
source=("git+https://github.com/rustdesk/rustdesk-server-demo.git")
sha256sums=('SKIP')
prepare(){
cd $srcdir
_ip=$(curl ifconfig.me)
echo """[Unit]
Description=RustDesk server
Requires=network.target
After=systemd-user-sessions.service
[Service]
Type=simple
Environment=\"IP=${_ip}\"
ExecStart=/usr/bin/rustdesk-server
PIDFile=/run/rustdesk-server.pid
KillMode=mixed
TimeoutStopSec=30
User=root
LimitNOFILE=100000
[Install]
WantedBy=multi-user.target
"""> rustdesk-server.service
}
build(){
cd $srcdir/rustdesk-server-demo
cargo build --release
}
package() {
cd $srcdir
install -Dm755 rustdesk-server-demo/target/release/rustdesk-server -t ${pkgdir}/usr/bin
install -Dm644 rustdesk-server.service -t ${pkgdir}/usr/lib/systemd/system/
}
@sukanka
Copy link
Author

sukanka commented Dec 8, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment