From 7ae600eb21ed723d7b36cfb9b2ee69276ae27d0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Sat, 17 Oct 2020 17:54:01 +0700 Subject: [PATCH] anydesk: patch pangox out --- srcpkgs/anydesk/template | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/srcpkgs/anydesk/template b/srcpkgs/anydesk/template index 7c0e2b470f0..7adba150911 100644 --- a/srcpkgs/anydesk/template +++ b/srcpkgs/anydesk/template @@ -1,9 +1,10 @@ # Template file for 'anydesk' pkgname=anydesk version=6.0.1 -revision=1 +revision=2 archs="i686 x86_64" -wrksrc=${pkgname}-${version} +create_wrksrc=yes +hostmakedepends="patchelf rpmextract w3m" short_desc="Fast remote desktop application" maintainer="mobinmob " license="custom:Proprietary" @@ -12,20 +13,32 @@ homepage="https://anydesk.com/remote-desktop" nopie=yes restricted=yes +distfiles="https://download.anydesk.com/linux/anydesk_$version-1_$XBPS_TARGET_MACHINE.rpm" if [ "${XBPS_TARGET_MACHINE}" = "x86_64" ] ; then - distfiles="https://download.anydesk.com/linux/anydesk-${version}-amd64.tar.gz" - checksum=b7826dcd379c27f615424d36d9383b8033c0b8c221751cad4ae7d9809f0fe5a4 + checksum=df029878486944bf0400e90746fe738eee0fc3f849e7f47f19d432fcb357c03e elif [ "${XBPS_TARGET_MACHINE}" = "i686" ]; then - distfiles="https://download.anydesk.com/linux/anydesk-${version}-i386.tar.gz" - checksum=cb22b026e2d81c0de220238fa3d4e13a6d0016787b8c680923794296bbd548e2 + checksum=b92a366a8233be44f556c81f274bdce3e527591987cc4c8d2b490fcd410305ed fi +_eula_digest=bfc62609b48b12f2c8c904e5b01b378d099836317334c6a634b2447bbf52ddcf + +post_extract() { + $XBPS_FETCH_CMD -o eula.html https://anydesk.com/en/terms + < eula.html w3m -dump -I utf-8 -T text/html | + sed -n '/Terms [&] Conditions/,/envelope-p/{/envelope-p/!p}' >eula.txt + + filesum="$($XBPS_DIGEST_CMD eula.txt)" + if [ "$filesum" != $_eula_digest ]; then + msg_error "EULA changed, new digest: $filesum\n" + fi +} + +do_build() { + patchelf --replace-needed libpangox-1.0.so.0 libpangoxft-1.0.so.0 \ + usr/bin/anydesk +} do_install() { - vinstall icons/hicolor/256x256/apps/anydesk.png 644 /usr/share/pixmaps - vmkdir usr/share/applications - vinstall anydesk.desktop 644 usr/share/applications - vmkdir usr/share/polkit-1/actions - vcopy "polkit-1/*.policy" usr/share/polkit-1/actions - vbin anydesk - vlicense copyright + vcopy usr/share usr + vbin usr/bin/anydesk + vlicense eula.txt }