Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rustdesk-appimage]: fixed "Can't chmod archive file" error. #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[rustdesk-appimage]: fixed "Can't chmod archive file" error.
khozaei committed Sep 1, 2024

Verified

This commit was signed with the committer’s verified signature.
commit 665f5ba085e335a19b9fcd2b3d50721243519109
4 changes: 2 additions & 2 deletions net-misc/rustdesk-appimage/Manifest
Original file line number Diff line number Diff line change
@@ -2,5 +2,5 @@ DIST rustdesk-appimage-1.2.6.amd64 64931008 BLAKE2B 2605d83561e27a18a01ac90477c6
DIST rustdesk-appimage-1.2.6.arm64 59208064 BLAKE2B cfd0826a3a20e0417457f93f75e8aa0c945e7f80a1a8dab033554c0bde178a8f58340aceb7c44f8f303c63da95f10786cf5e849a412ff08e05dcc44e2d2ee608 SHA512 a5d5c4027efd02e31d6befcb07bb2e88ff077845341eaef9dc0e2245bbf580c7e0917f8f2ccbfc24bc89f22aa7148a651a11cd7263c893139e7807a989dc97bd
DIST /tmp/rustdesk-appimage-1.2.7.amd64 65979584 BLAKE2B 05253fe1950ca0f5313d69509d47bd03f5a24609df9e7535e04a9b4ee46a8171978f0b59a80ada00c83e10091c045936a87fc212177f46c248ce2f55e6fadfc9 SHA512 e51b53268b2ea314d668b5010a3bedb01d537db937a304c6af66e126444a87e7c5851e8de7c10bf9517af1a2289f23c822b2b8b4fee07c218ab14049c1b918d8
DIST /tmp/rustdesk-appimage-1.2.7.arm64 60002688 BLAKE2B ebd796ac1b6fd6529247352e544f0a1e49ceff92110515e5eac804caa35075307022c4aeb3f49ac27815da562a7c2e0d115dbbc73c209d18887c0092f5f72d49 SHA512 4e414099f750233f35a2e3681afddee523d756622f38af4583307922626cc89c2d50a8bb14ff54dbf5e64b8555eb4cd5565ab4ff18e902443b26d9e148af5da7
DIST rustdesk-appimage-1.3.0-rustdesk-1.3.0-aarch64.AppImage 55714176 BLAKE2B afabd349eee5b88c54c25e69dcea3b5c8b40ea6c628dc199e984755b7b48dea97e4fe8b5343a465d118b1b3818f3939ec4bd033dd147182b1b6118b95de1a799 SHA512 668f33c87d12c2e97ffab4989e80a653fbc939fedc721dae1b70c6feebe7228816c56774951faf106a4243cce6dd4f55cc640c9dfe52c69b60449f0c0a97d6b8
DIST rustdesk-appimage-1.3.0-rustdesk-1.3.0-x86_64.AppImage 60425408 BLAKE2B 5921771bc0197539323a606a00f9932c850c96209429e91e3a9925714183b703cc1acd5cb42e590c633078ba8a273b577cefc4b92f67839b546be062c5f79378 SHA512 15612acfaca0dc7583b7a3898d203f7ac0d6b84f4c5b1d5f90b405c26d7b696f4450377891a6c09af996fbf83d755c2582deffccbd9b3fea94ef232014cae68b
DIST rustdesk-appimage-1.3.0-aarch64.AppImage 55714176 BLAKE2B afabd349eee5b88c54c25e69dcea3b5c8b40ea6c628dc199e984755b7b48dea97e4fe8b5343a465d118b1b3818f3939ec4bd033dd147182b1b6118b95de1a799 SHA512 668f33c87d12c2e97ffab4989e80a653fbc939fedc721dae1b70c6feebe7228816c56774951faf106a4243cce6dd4f55cc640c9dfe52c69b60449f0c0a97d6b8
DIST rustdesk-appimage-1.3.0-x86_64.AppImage 60425408 BLAKE2B 5921771bc0197539323a606a00f9932c850c96209429e91e3a9925714183b703cc1acd5cb42e590c633078ba8a273b577cefc4b92f67839b546be062c5f79378 SHA512 15612acfaca0dc7583b7a3898d203f7ac0d6b84f4c5b1d5f90b405c26d7b696f4450377891a6c09af996fbf83d755c2582deffccbd9b3fea94ef232014cae68b
18 changes: 11 additions & 7 deletions net-misc/rustdesk-appimage/rustdesk-appimage-1.3.0.ebuild
Original file line number Diff line number Diff line change
@@ -14,26 +14,30 @@ RESTRICT="strip"
inherit xdg-utils

SRC_URI="
arm64? ( https://github.com/rustdesk/rustdesk/releases/download/1.3.0/rustdesk-1.3.0-aarch64.AppImage -> ${P}-rustdesk-1.3.0-aarch64.AppImage )
amd64? ( https://github.com/rustdesk/rustdesk/releases/download/1.3.0/rustdesk-1.3.0-x86_64.AppImage -> ${P}-rustdesk-1.3.0-x86_64.AppImage )
arm64? ( https://github.com/rustdesk/rustdesk/releases/download/1.3.0/rustdesk-1.3.0-aarch64.AppImage -> ${P}-aarch64.AppImage )
amd64? ( https://github.com/rustdesk/rustdesk/releases/download/1.3.0/rustdesk-1.3.0-x86_64.AppImage -> ${P}-x86_64.AppImage )
"

src_unpack() {
chmod a+x "rustdesk.AppImage" || die "Can't chmod archive file"
"./rustdesk.AppImage" --appimage-extract "rustdesk.desktop" || die "Failed to extract .desktop from appimage"
"./rustdesk.AppImage" --appimage-extract "usr/share/icons" || die "Failed to extract hicolor icons from app image"
case ${ARCH} in
amd64) cp ${DISTDIR}/${P}-x86_64.AppImage ${PN} ;;
arm64) cp ${DISTDIR}/${P}-aarch64.AppImage ${PN} ;;
esac
chmod a+x "${PN}" || die "Can't chmod archive file"
"./${PN}" --appimage-extract "rustdesk.desktop" || die "Failed to extract .desktop from appimage"
"./${PN}" --appimage-extract "usr/share/icons" || die "Failed to extract hicolor icons from app image"
}

src_prepare() {
sed -i 's:^Exec=.*:Exec=/opt/bin/rustdesk.AppImage:' 'squashfs-root/rustdesk.desktop'
sed -i 's:^Exec=.*:Exec=/opt/bin/rustdesk-appimage:' 'squashfs-root/rustdesk.desktop'
find squashfs-root -type f \( -name index.theme -or -name icon-theme.cache \) -exec rm {} \;
find squashfs-root -type d -exec rmdir -p --ignore-fail-on-non-empty {} \;
eapply_user
}

src_install() {
exeinto /opt/bin
doexe "rustdesk.AppImage" || die "Failed to install AppImage"
doexe "${PN}" || die "Failed to install AppImage"
insinto /usr/share/applications
doins "squashfs-root/rustdesk.desktop" || die "Failed to install desktop file"
insinto /usr/share/icons