summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzhanghua0002022-03-25 21:15:06 +0800
committerzhanghua0002022-03-25 21:15:06 +0800
commit100214bf363b1faff5de3664698c0c3b3a858dcb (patch)
tree6df1ea6458c2446951624348c9ad90d43fbf5afb
parent88e32c12444855e5aeeaaceb9b65c5e59a6a768a (diff)
downloadaur-100214bf363b1faff5de3664698c0c3b3a858dcb.tar.gz
Add sys-electron package
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD43
-rw-r--r--yesplaymusic2
-rw-r--r--yesplaymusic.desktop2
4 files changed, 54 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 73ea1606e3ac..40de05aeddea 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,12 +1,12 @@
pkgbase = yesplaymusic-git
pkgdesc = 高颜值的第三方网易云播放器,支持 Windows / macOS / Linux
- pkgver = 0.4.3.36.gd15b58d
+ pkgver = 0.4.4.beta.1.14.gb1c5873
pkgrel = 1
url = https://music.qier222.com
arch = x86_64
arch = aarch64
license = MIT
- makedepends = nodejs-lts-fermium
+ makedepends = nodejs=16.14.2
makedepends = yarn
makedepends = git
makedepends = libvips
@@ -24,9 +24,22 @@ pkgbase = yesplaymusic-git
optdepends = libnotify
optdepends = libappindicator-gtk3
provides = yesplaymusic
+ conflicts = yesplaymusic
source = git+https://github.com/qier222/YesPlayMusic
source = yesplaymusic.desktop
+ source = yesplaymusic
sha256sums = SKIP
- sha256sums = 54f7ea2d99239749b40fa88109f4962f913421e3954e42f7bec8264d1f8bd89d
+ sha256sums = 56fb010914c3baad7bde6ccac03d9e92f705652c6f0098547cafbf4fcc613630
+ sha256sums = dc7e893cbea98f0f20b7ffdf18c8462c45069618421ea2ebd40ee34051f68e66
pkgname = yesplaymusic-git
+
+pkgname = yesplaymusic-electron-git
+ pkgdesc = 高颜值的第三方网易云播放器,支持 Windows / macOS / Linux (with system electrton)
+ depends = gtk3
+ depends = nss
+ depends = electron13
+ provides = yesplaymusic
+ provides = yesplaymusic-electron
+ conflicts = yesplaymusic
+ conflicts = yesplaymusic-electron
diff --git a/PKGBUILD b/PKGBUILD
index bddcb1242fcf..be1ecd962e10 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,13 +1,15 @@
# Maintainer: qier22 <qier222@outlook.com>
-pkgname=yesplaymusic-git
-pkgver=0.4.3.36.gd15b58d
+pkgbase=yesplaymusic-git
+pkgname=(yesplaymusic-git yesplaymusic-electron-git)
+pkgver=0.4.4.beta.1.14.gb1c5873
pkgrel=1
pkgdesc="高颜值的第三方网易云播放器,支持 Windows / macOS / Linux"
arch=("x86_64" "aarch64")
url="https://music.qier222.com"
license=("MIT")
provides=("yesplaymusic")
+conflicts=("yesplaymusic")
depends=("gtk3" "nss")
optdepends=(
'c-ares'
@@ -22,10 +24,11 @@ optdepends=(
'libnotify'
'libappindicator-gtk3'
)
-makedepends=("nodejs-lts-fermium" "yarn" "git" "libvips")
-source=("git+https://github.com/qier222/YesPlayMusic" "yesplaymusic.desktop")
+makedepends=("nodejs=16.14.2" "yarn" "git" "libvips")
+source=("git+https://github.com/qier222/YesPlayMusic" "yesplaymusic.desktop" "yesplaymusic")
sha256sums=('SKIP'
- '54f7ea2d99239749b40fa88109f4962f913421e3954e42f7bec8264d1f8bd89d')
+ '56fb010914c3baad7bde6ccac03d9e92f705652c6f0098547cafbf4fcc613630'
+ 'dc7e893cbea98f0f20b7ffdf18c8462c45069618421ea2ebd40ee34051f68e66')
pkgver(){
cd "${srcdir}/YesPlayMusic"
git describe --tags | sed "s/-/./g;s/v//"
@@ -39,11 +42,10 @@ build(){
cd "${srcdir}/YesPlayMusic"
yarn electron:build --linux dir
}
-package(){
+package_yesplaymusic-git(){
cd "${srcdir}/YesPlayMusic"
mkdir -p "${pkgdir}/opt/YesPlayMusic"
mkdir -p "${pkgdir}/usr/bin"
- mkdir -p "${pkgdir}/usr/share/applications"
case ${CARCH} in
"x86_64")
_arch="-"
@@ -59,8 +61,33 @@ package(){
ln -sf "/opt/YesPlayMusic/yesplaymusic" "${pkgdir}/usr/bin/yesplaymusic"
for res in 1024x1024 128x128 16x16 24x24 256x256 32x32 48x48 512x512 64x64
do
- mkdir -p "${pkgdir}/usr/share/icons/hicolor/${res}/apps"
install -Dm644 build/icons/${res}.png "${pkgdir}/usr/share/icons/hicolor/${res}/apps/yesplaymusic.png"
done
install -Dm644 "${srcdir}/yesplaymusic.desktop" "${pkgdir}/usr/share/applications/yesplaymusic.desktop"
}
+package_yesplaymusic-electron-git(){
+ depends+=("electron13")
+ pkgdesc+=" (with system electrton)"
+ conflicts+=("yesplaymusic-electron")
+ provides+=("yesplaymusic-electron")
+ cd "${srcdir}/YesPlayMusic"
+ case ${CARCH} in
+ "x86_64")
+ _arch="-"
+ ;;
+ "aarch64")
+ _arch="-arm64-"
+ ;;
+ "*")
+ _arch="-${CARCH}-"
+ ;;
+ esac
+ install -Dm644 dist_electron/linux${_arch}unpacked/resources/app.asar "${pkgdir}/usr/lib/yesplaymusic/yesplaymusic.asar"
+ install -Dm755 "${srcdir}/yesplaymusic" "${pkgdir}/usr/bin/yesplaymusic"
+ install -Dm644 "${srcdir}/yesplaymusic.desktop" "${pkgdir}/usr/share/applications/yesplaymusic.desktop"
+ sed -i "s/electron/electron13/" "${pkgdir}/usr/bin/yesplaymusic"
+ for res in 1024x1024 128x128 16x16 24x24 256x256 32x32 48x48 512x512 64x64
+ do
+ install -Dm644 build/icons/${res}.png "${pkgdir}/usr/share/icons/hicolor/${res}/apps/yesplaymusic.png"
+ done
+}
diff --git a/yesplaymusic b/yesplaymusic
new file mode 100644
index 000000000000..ae71034e0aed
--- /dev/null
+++ b/yesplaymusic
@@ -0,0 +1,2 @@
+#!/usr/bin/env bash
+electron /usr/lib/yesplaymusic/yesplaymusic.asar $@
diff --git a/yesplaymusic.desktop b/yesplaymusic.desktop
index 2bb6df6f268e..965220ce613f 100644
--- a/yesplaymusic.desktop
+++ b/yesplaymusic.desktop
@@ -1,6 +1,6 @@
[Desktop Entry]
Name=YesPlayMusic
-Exec=/opt/YesPlayMusic/yesplaymusic %U
+Exec=yesplaymusic %U
Terminal=false
Type=Application
Icon=yesplaymusic