[updpkg] todesk-bin 1.2.4d

This commit is contained in:
yjun 2021-02-09 15:01:04 +08:00
parent 6b4d195900
commit b095cb57d0
3 changed files with 37 additions and 46 deletions

View file

@ -1,22 +1,24 @@
pkgbase = todesk-bin
pkgdesc = Remote control and team work
pkgver = 1.2.3
pkgrel = 2
pkgver = 1.2.4d
pkgrel = 1
url = https://www.todesk.cn/
install = todesk.install
arch = x86_64
arch = aarch64
arch = armv7h
license = unknown
makedepends = tar
depends = libxtst
depends = freetype2
provides = todesk
conflicts = todesk
options = !strip
source_x86_64 = https://update.todesk.com/todesk_1.2.3_amd64.deb
sha256sums_x86_64 = d7b7cc986e28160f700bab8e821c8fe31b3e3d46ed75def4c9158b64ed398a3b
source_aarch64 = https://update.todesk.com/todesk_1.2.3_aarch64.deb
sha256sums_aarch64 = bf40ada6f54b7683433951356447f21b58026b9e471a447b8ba909afba766a84
options = emptydirs
source_x86_64 = https://update.todesk.com/linux/todesk_1.2.4d_amd64.deb
sha256sums_x86_64 = ea82cdf8dd0439a7282a3f50b4fab8b95fbd873e68be5e9ef1bfd68c93a1e691
source_aarch64 = https://update.todesk.com/linux/todesk_1.2.4d_aarch64.deb
sha256sums_aarch64 = 1131532d3e6b8d0ebc2d9ea792d9eee37925f2b1f74259ceeb362a9e66e77498
source_armv7h = https://update.todesk.com/linux/todesk_1.2.4d_armv7.deb
sha256sums_armv7h = e79cd6063baedce0326f90376114b7453964c7b22886e8467d5b846df238d26a
pkgname = todesk-bin

View file

@ -2,23 +2,28 @@
pkgname=todesk-bin
_pkgname=${pkgname%-bin}
pkgver=1.2.3
pkgrel=2
pkgver=1.2.4d
pkgrel=1
pkgdesc="Remote control and team work"
arch=('x86_64' 'aarch64')
arch=('x86_64' 'aarch64' 'armv7h')
url="https://www.todesk.cn/"
license=('unknown')
depends=('libxtst'
'freetype2')
makedepends=('tar')
provides=("${_pkgname}")
conflicts=("${_pkgname}")
# !strip: strip could generate error.
# --->
# strip: error: the input file './opt/todesk/bin/todeskc' has no sections
#
# emptydirs: leave /opt/todesk/config empty dir
options=('!strip' 'emptydirs')
install="${_pkgname}.install"
options=('!strip')
source_x86_64=("https://update.todesk.com/${_pkgname}_${pkgver}_amd64.deb")
source_aarch64=("https://update.todesk.com/${_pkgname}_${pkgver}_aarch64.deb")
sha256sums_x86_64=('d7b7cc986e28160f700bab8e821c8fe31b3e3d46ed75def4c9158b64ed398a3b')
sha256sums_aarch64=('bf40ada6f54b7683433951356447f21b58026b9e471a447b8ba909afba766a84')
source_x86_64=("https://update.todesk.com/linux/${_pkgname}_${pkgver}_amd64.deb")
source_aarch64=("https://update.todesk.com/linux/${_pkgname}_${pkgver}_aarch64.deb")
source_armv7h=("https://update.todesk.com/linux/${_pkgname}_${pkgver}_armv7.deb")
sha256sums_x86_64=('ea82cdf8dd0439a7282a3f50b4fab8b95fbd873e68be5e9ef1bfd68c93a1e691')
sha256sums_aarch64=('1131532d3e6b8d0ebc2d9ea792d9eee37925f2b1f74259ceeb362a9e66e77498')
sha256sums_armv7h=('e79cd6063baedce0326f90376114b7453964c7b22886e8467d5b846df238d26a')
build() {
mkdir -p ${srcdir}/build
@ -31,7 +36,6 @@ package() {
# binary wrapper
install -Dm 755 usr/local/bin/${_pkgname} -t ${pkgdir}/usr/bin/
# install -Dm 755 usr/local/bin/${_pkgname}update -t ${pkgdir}/usr/bin/
# lib
find opt/${_pkgname}/lib -type f -exec install -Dm644 {} ${pkgdir}/{} \;
@ -40,32 +44,25 @@ package() {
# font
find opt/${_pkgname}/res -type f -exec install -Dm644 {} ${pkgdir}/{} \;
# binary & scripts
install -Dm755 opt/${_pkgname}/${_pkgname} -t ${pkgdir}/opt/${_pkgname}/
install -Dm755 opt/${_pkgname}/${_pkgname}d -t ${pkgdir}/opt/${_pkgname}/
# install -Dm755 opt/${_pkgname}/${_pkgname}update -t ${pkgdir}/opt/${_pkgname}/
install -Dm755 opt/${_pkgname}/daemon.sh -t ${pkgdir}/opt/${_pkgname}/
install -Dm755 opt/${_pkgname}/${_pkgname}c -t ${pkgdir}/opt/${_pkgname}/
# config
# empty dir
install -dm755 ${pkgdir}/opt/${_pkgname}/config
# qt.conf & todeskd.conf
install -Dm644 opt/${_pkgname}/qt.conf -t ${pkgdir}/opt/${_pkgname}/
install -Dm666 opt/${_pkgname}/${_pkgname}d.conf -t ${pkgdir}/opt/${_pkgname}/
# binary & scripts
install -Dm755 opt/${_pkgname}/bin/${_pkgname} -t ${pkgdir}/opt/${_pkgname}/bin
install -Dm755 opt/${_pkgname}/bin/${_pkgname}d -t ${pkgdir}/opt/${_pkgname}/bin
install -Dm755 opt/${_pkgname}/bin/${_pkgname}c -t ${pkgdir}/opt/${_pkgname}/bin
# qt.conf
install -Dm644 opt/${_pkgname}/bin/qt.conf -t ${pkgdir}/opt/${_pkgname}/bin
# desktop entry
install -Dm 644 usr/share/applications/${_pkgname}.desktop -t ${pkgdir}/usr/share/applications
sed -i "s|Emulator;||g" ${pkgdir}/usr/share/applications/${_pkgname}.desktop
# systemd service
install -Dm644 etc/systemd/system/${_pkgname}d.service -t ${pkgdir}/usr/lib/systemd/system
# icon
install -Dm 644 usr/share/pixmaps/${_pkgname}.png -t ${pkgdir}/usr/share/pixmaps
# ugly permission fix
chmod 0777 ${pkgdir}//opt/${_pkgname}
# log files
install -Dm666 opt/${_pkgname}/${_pkgname}.log -t ${pkgdir}/opt/${_pkgname}/
install -Dm666 opt/${_pkgname}/${_pkgname}d.log -t ${pkgdir}/opt/${_pkgname}/
}
# vim: set sw=2 ts=2 et:

View file

@ -15,22 +15,14 @@ post_install() {
$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() {
# ugly permission fix
chmod 0777 /opt/todesk
chmod 0755 /opt/todesk
}
post_upgrade() {
post_install
}
post_remove() {
# remove log file
rm -rf /opt/todesk/*.log
# clear tmp files
rm -rf /tmp/todesk*
}