Created
August 29, 2024 08:17
-
-
Save jinzhongjia/39336af318ee89d26e71404f85587a76 to your computer and use it in GitHub Desktop.
qq-music-appimage
This file contains hidden or 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
_pkgname=qqmusic | |
pkgname="${_pkgname}"-appimage | |
pkgver=1.1.7 | |
pkgrel=1 | |
pkgdesc="A music player from Tencent" | |
arch=('x86_64') | |
url="https://y.qq.com" | |
license=('custom') | |
depends=('fuse2' 'hicolor-icon-theme' 'zlib' 'glibc') | |
options=(!strip) | |
_appimage="qqmusic-${pkgver}.AppImage" | |
source=("https://dldir1.qq.com/music/clntupate/linux/${_appimage}") | |
sha256sums=('4b26ea482831cdf11a4ff824db738af679b7ff124e372dcae5623853463ebd9d') | |
prepare() { | |
chmod +x "${_appimage}" | |
./"${_appimage}" --appimage-extract | |
} | |
build() { | |
# Adjust .desktop so it will work outside of AppImage container | |
sed -i -E "s|Exec=AppRun|Exec=env DESKTOPINTEGRATION=false /usr/bin/${_pkgname} %u|; s|Name=qqmusic|Name=QQ 音乐|" \ | |
"squashfs-root/${_pkgname}.desktop" | |
# Fix permissions; .AppImage permissions are 700 for all directories | |
chmod -R a-x+rX squashfs-root/usr | |
} | |
package() { | |
# AppImage | |
install -Dm755 "${srcdir}/${_appimage}" "${pkgdir}/opt/${pkgname}/${pkgname}.AppImage" | |
# Desktop file | |
install -Dm644 "${srcdir}/squashfs-root/${_pkgname}.desktop"\ | |
"${pkgdir}/usr/share/applications/${_pkgname}.desktop" | |
# Icon images | |
install -dm755 "${pkgdir}/usr/share/" | |
cp -a "${srcdir}/squashfs-root/usr/share/icons" "${pkgdir}/usr/share/" | |
# Symlink executable | |
install -dm755 "${pkgdir}/usr/bin" | |
ln -s "/opt/${pkgname}/${pkgname}.AppImage" "${pkgdir}/usr/bin/${_pkgname}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment