summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052024-10-21 18:46:58 +0800
committerzxp198210052024-10-21 18:46:58 +0800
commite894656c1ef971c50eca5f575377982ef539a6e9 (patch)
tree51811022d6c7b5747583c4a4627a25cdd9f3a845
parentb23dc56b447062741a6c6f8fdd3f361e5c1e7876 (diff)
downloadaur-musicfree-desktop-bin.tar.gz
fix errors
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD29
-rw-r--r--musicfree-desktop.sh2
3 files changed, 22 insertions, 17 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b4a0812392c5..4e5e074584cf 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = musicfree-desktop-bin
- pkgdesc = 插件化、定制化、无广告的免费音乐播放器
+ pkgdesc = Plug-in, customized, ad-free music player.Prebuilt version.Use system-wide electron.插件化、定制化、无广告的免费音乐播放器
pkgver = 0.0.5
- pkgrel = 1
+ pkgrel = 2
url = http://musicfree.upup.fun/
arch = x86_64
license = GPL-3.0-only
@@ -11,9 +11,9 @@ pkgbase = musicfree-desktop-bin
conflicts = musicfree-desktop
options = !strip
options = !emptydirs
- source = musicfree-desktop-bin-0.0.5.deb::https://github.com/maotoumao/MusicFreeDesktop/releases/download/v0.0.5/MusicFree-0.0.5-linux-amd64.deb
+ source = musicfree-desktop-0.0.5.deb::https://github.com/maotoumao/MusicFreeDesktop/releases/download/v0.0.5/MusicFree-0.0.5-linux-amd64.deb
source = musicfree-desktop.sh
sha256sums = a5578c6b72fc79a4f80635c9f18d0efd05b7bb4dd5e15938ab6dd26889cd0882
- sha256sums = 2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051
+ sha256sums = 291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980
pkgname = musicfree-desktop-bin
diff --git a/PKGBUILD b/PKGBUILD
index e9b1f6bd1c57..98ef3a8daf71 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,8 +4,8 @@ pkgname="${_pkgname}-desktop-bin"
_appname=MusicFreeDesktop
pkgver=0.0.5
_electronversion=25
-pkgrel=1
-pkgdesc="插件化、定制化、无广告的免费音乐播放器"
+pkgrel=2
+pkgdesc="Plug-in, customized, ad-free music player.Prebuilt version.Use system-wide electron.插件化、定制化、无广告的免费音乐播放器"
arch=('x86_64')
url="http://musicfree.upup.fun/"
_ghurl="https://github.com/maotoumao/MusicFreeDesktop"
@@ -22,25 +22,30 @@ options=(
'!emptydirs'
)
source=(
- "${pkgname}-${pkgver}.deb::${_ghurl}/releases/download/v${pkgver}/${_appname%Desktop}-${pkgver}-linux-amd64.deb"
+ "${pkgname%-bin}-${pkgver}.deb::${_ghurl}/releases/download/v${pkgver}/${_appname%Desktop}-${pkgver}-linux-amd64.deb"
"${pkgname%-bin}.sh"
)
sha256sums=('a5578c6b72fc79a4f80635c9f18d0efd05b7bb4dd5e15938ab6dd26889cd0882'
- '2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051')
+ '291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980')
build() {
- sed -e "s|@electronversion@|${_electronversion}|" \
- -e "s|@appname@|${pkgname%-bin}|g" \
- -e "s|@runname@|app|g" \
- -e "s|@cfgdirname@|${_appname%Desktop}|g" \
- -e "s|@options@||g" \
- -i "${srcdir}/${pkgname%-bin}.sh"
+ sed -e "
+ s/@electronversion@/${_electronversion}/g
+ s/@appname@/${pkgname%-bin}/g
+ s/@runname@/app/g
+ s/@cfgdirname@/${_appname%Desktop}/g
+ s/@options@//g
+ " -i "${srcdir}/${pkgname%-bin}.sh"
bsdtar -xf "${srcdir}/data."*
- sed "s|${_pkgname}|${pkgname%-bin}|g;s|Utility|AudioVideo|g" -i "${srcdir}/usr/share/applications/${_pkgname}.desktop"
+ sed -e "
+ s/${_pkgname}/${pkgname%-bin}/g
+ s/Utility/AudioVideo/g
+ " -i "${srcdir}/usr/share/applications/${_pkgname}.desktop"
+ find "${srcdir}/usr/lib/${_pkgname}/resources/app/.webpack" -type f -exec sed -i "s/process.resourcesPath/\'\/usr\/lib\/${pkgname%-bin}\'/g" {} +
}
package() {
install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-bin}"
- cp -r "${srcdir}/usr/lib/${_pkgname}/resources/"{app,res} "${pkgdir}/usr/lib/${pkgname%-bin}"
+ cp -Pr --no-preserve=ownership "${srcdir}/usr/lib/${_pkgname}/resources/"{app,res} "${pkgdir}/usr/lib/${pkgname%-bin}"
install -Dm644 "${srcdir}/usr/lib/${_pkgname}/resources/res/logo.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-bin}.png"
install -Dm644 "${srcdir}/usr/share/applications/${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop"
} \ No newline at end of file
diff --git a/musicfree-desktop.sh b/musicfree-desktop.sh
index 4cfe3ac09dd8..40e422ca2ee7 100644
--- a/musicfree-desktop.sh
+++ b/musicfree-desktop.sh
@@ -21,7 +21,7 @@ if [[ -f "${_FLAGS_FILE}" ]]; then
fi
done < "${_FLAGS_FILE}"
fi
-cd "${_APPDIR}"
+cd "${_APPDIR}" || { echo "Failed to change directory to ${_APPDIR}"; exit 1; }
if [[ "${EUID}" -ne 0 ]] || [[ "${ELECTRON_RUN_AS_NODE}" ]]; then
exec electron@electronversion@ "${_RUNNAME}" ${_OPTIONS} "${_USER_FLAGS[@]}" "$@"
else