diff options
author | Zhong Lufan | 2022-02-12 03:11:28 +0800 |
---|---|---|
committer | Zhong Lufan | 2022-02-12 03:11:28 +0800 |
commit | 47593288417fd4b1ae369e829ad1e68ac66a37d2 (patch) | |
tree | ccdc222acac2760c1f9ff40f6a78c5e04a2b9b40 /PKGBUILD | |
parent | 5f3848b5c87a193fa326ca53a862f59a0f4c12e8 (diff) | |
download | aur-47593288417fd4b1ae369e829ad1e68ac66a37d2.tar.gz |
Fix search error for some keywords
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 28 |
1 files changed, 19 insertions, 9 deletions
@@ -4,7 +4,7 @@ pkgname=qqmusic-bin _pkgname=qqmusic pkgver=1.1.3 -pkgrel=1 +pkgrel=2 pkgdesc="tencent qq music" arch=("x86_64") url="https://y.qq.com/" @@ -17,15 +17,25 @@ source=( sha512sums=('1638c60fb92aee9c4bf53a6b8eea2e75b7edd366c2250106357987c3583228e98904809511c2b0216f53078c3c65ad81b6123ba72e57d14cd45afbc9f43650f8') package(){ - cd ${srcdir} + cd "${srcdir}" tar -xvf data.tar.xz -C "${pkgdir}" - mkdir -p "${pkgdir}"/usr/bin - ln -s /opt/qqmusic/qqmusic "${pkgdir}"/usr/bin/qqmusic - cd $pkgdir/usr/share/applications/ - sed -i '3c Exec=qqmusic %U' qqmusic.desktop - sed -i 'N;2aName[zh_CN]=QQ音乐\nKeywords=qqmusic' qqmusic.desktop - chmod g-w -R ${pkgdir} - sed -e 's/\xA4\x8B\x7A\xB9\x8D\xCF\x54\xAE/\xA4\x8B\x7A\xB9\x85\xEF\x54\xAE/' -i ${pkgdir}/opt/qqmusic/resources/app.asar + mkdir -p "${pkgdir}/usr/bin" + ln -s /opt/qqmusic/qqmusic "${pkgdir}/usr/bin/qqmusic" + + local desktopfile="${pkgdir}/usr/share/applications/qqmusic.desktop" + sed -i '3c Exec=qqmusic %U' "$desktopfile" + sed -i 'N;2aName[zh_CN]=QQ音乐\nKeywords=qqmusic' "$desktopfile" + + # Hex patch + # 1. Fix orphaned processes + # 2. Fix search + local _subst=" + s|\xA4\x8B\x7A\xB9\x8D\xCF\x54\xAE|\xA4\x8B\x7A\xB9\x85\xEF\x54\xAE| + s|\xB3\x1D\xF5\xCB\x24\xBC|\xA3\x63\xBB\xC9\x3F\xBC| + " + sed "$_subst" -i "${pkgdir}/opt/qqmusic/resources/app.asar" + + chmod g-w -R "${pkgdir}" # Fix directory permissions } |