Created
September 3, 2022 10:37
-
-
Save shionryuu/748a73b616f24062de024fd017ec8c0e to your computer and use it in GitHub Desktop.
ArchLinux install todesk-bin 4.1.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: | |
@makepkg -si | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: yjun <jerrysteve1101 at gmail dot com> | |
pkgname=todesk-bin | |
_pkgname=${pkgname%-bin} | |
pkgver=4.1.0 | |
pkgrel=1 | |
pkgdesc="Remote control and team work" | |
arch=('x86_64' 'aarch64' 'armv7h') | |
url="https://www.todesk.com/" | |
license=('unknown') | |
depends=('gtk3') | |
optdepends=("noto-fonts-cjk: Chinese display support") | |
makedepends=('tar') | |
provides=("${_pkgname}") | |
conflicts=("${_pkgname}") | |
# !strip: strip could generate error. | |
# ---> | |
# strip: error: the input file './opt/todesk/bin/todesk' has no sections | |
# strip: error: the input file './opt/todesk/bin/todeskd' has no sections | |
# | |
# emptydirs: leave /opt/todesk/config empty dir | |
options=('!strip' 'emptydirs') | |
install="${_pkgname}.install" | |
source_x86_64=("https://dl.todesk.com/linux/${_pkgname}_${pkgver}_amd64.deb") | |
source_aarch64=("https://dl.todesk.com/linux/${_pkgname}_${pkgver}_aarch64.deb") | |
source_armv7h=("https://dl.todesk.com/linux/${_pkgname}_${pkgver}_armv7l.deb") | |
sha256sums_x86_64=('5f680225a1366439b7bec8e39e5c88291f68ddee2a311921fd874b036a6a3057') | |
sha256sums_aarch64=('4497ed0ceec012273fe97e187e9786f55ddfbbe22889de593dc1a5f133dde151') | |
sha256sums_armv7h=('0a467cb8f8f636ea9d8c6fa1ef3a79bfee4a36fe3bed2b01b42e2006912e2a57') | |
_install() { | |
find ${@: 2} -type f -exec install -Dm$1 {} ${pkgdir}/{} \; | |
} | |
build() { | |
mkdir -p ${srcdir}/build | |
tar -xf ${srcdir}/data.tar.xz -C ${srcdir}/build | |
} | |
package() { | |
cd ${srcdir}/build/ | |
# binary wrapper | |
install -Dm755 usr/local/bin/${_pkgname} -t ${pkgdir}/usr/bin/ | |
# lib | |
# find opt/${_pkgname}/lib -type f -exec install -Dm644 {} ${pkgdir}/{} \; | |
_install 644 opt/${_pkgname}/lib | |
# icon | |
# find opt/${_pkgname}/res -maxdepth 1 -type f -exec install -Dm644 {} ${pkgdir}/{} \; | |
_install 644 opt/${_pkgname}/res -maxdepth 1 | |
# config | |
# empty dir | |
install -dm755 ${pkgdir}/opt/${_pkgname}/config | |
# binary & scripts | |
install -Dm755 opt/${_pkgname}/bin/${_pkgname}{,c,d} -t ${pkgdir}/opt/${_pkgname}/bin | |
# desktop entry | |
install -Dm644 usr/share/applications/${_pkgname}.desktop -t ${pkgdir}/usr/share/applications | |
# systemd service | |
install -Dm644 etc/systemd/system/${_pkgname}d.service -t ${pkgdir}/usr/lib/systemd/system | |
# icon | |
# find usr/share/icons -type f -exec install -Dm644 {} ${pkgdir}/{} \; | |
_install 644 usr/share/icons | |
} | |
# vim: set sw=2 ts=2 et: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
post_install() { | |
systemctl daemon-reload | |
if systemctl -q is-active todeskd.service ;then | |
systemctl restart todeskd.service | |
fi | |
ECHOLEN=$(echo -e|awk '{print length($0)}') | |
if [ ${ECHOLEN} = '0' ] | |
then | |
ECHO='echo -e' | |
else | |
ECHO='echo' | |
fi | |
$ECHO "\033[36m**************************************************************\033[0m" | |
$ECHO "\033[36m* todeskd daemon service must be running for todesk to work *\033[0m" | |
$ECHO "\033[36m* Type: systemctl start todeskd.service *\033[0m" | |
$ECHO "\033[36m* Todesk Remote Control doesn't support Wayland, Xorg ONLY! *\033[0m" | |
$ECHO "\033[36m**************************************************************\033[0m" | |
} | |
# pre_upgrade() { | |
# chmod 0755 /opt/todesk | |
# } | |
post_upgrade() { | |
post_install | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
AUR : todesk-bin.git