summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorxihale2023-08-07 14:45:41 +0800
committerxihale2023-08-07 14:45:41 +0800
commita1b80b28b6f3e50ebc62439f2b4e85967ea2554b (patch)
tree3a9a91b9a403f9c52d7f16f83ad93329ab669d7b
downloadaur-listen1-git.tar.gz
fix: electron remote problem, feat: support more version of electron
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD44
2 files changed, 59 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..8544e02f5499
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = listen1-git
+ pkgdesc = Listen 1 可以搜索和播放来自多个主流音乐网站的歌曲,让你的曲库更全面。并支持收藏功能,方便的创建自己的歌单。
+ pkgver = 0
+ pkgrel = 1
+ url = https://github.com/listen1/listen1_desktop
+ arch = x86_64
+ license = MIT
+ makedepends = gendesk
+ makedepends = git
+ depends = electron
+ depends = npm
+ source = listen1::git+https://github.com/xihale/listen1_desktop.git
+ sha512sums = SKIP
+
+pkgname = listen1-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..045a8504f33b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,44 @@
+# Maintainer: xihale <xihale.top@qq.com>
+pkgname=listen1-git
+pkgver=0
+pkgrel=1
+pkgdesc="Listen 1 可以搜索和播放来自多个主流音乐网站的歌曲,让你的曲库更全面。并支持收藏功能,方便的创建自己的歌单。"
+arch=("x86_64")
+license=('MIT')
+depends=('electron' 'npm')
+makedepends=('gendesk' 'git')
+url="https://github.com/listen1/listen1_desktop"
+source=("listen1::git+https://github.com/xihale/listen1_desktop.git")
+sha512sums=("SKIP")
+
+prepare() {
+ cd listen1
+ # Use ther second hand dev version of mine, it's a temporary work
+ git clone https://github.com/xihale/listen1_chrome_extension app/listen1_chrome_extension
+ # git submodule update --init --recursive
+}
+
+build() {
+ cd listen1/app
+ if command -v cnpm &>/dev/null; then
+ cnpm i --production
+ elif command -v pnpm &>/dev/null; then
+ pnpm i -P
+ else
+ npm i --production
+ fi
+}
+
+package() {
+
+ gendesk -f -n --icon "listen1" --categories "Utility" --name "${pkgname%-git}" --exec "electron /opt/${pkgname%-git}/"
+ install -Dm644 "${srcdir}/${pkgname%-git}.desktop" -t "${pkgdir}/usr/share/applications"
+
+ cd listen1/app/listen1_chrome_extension
+ install -Dm644 "./LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname%-git}"
+ install -Dm644 "./images/logo.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-git}.png"
+ cd ..
+ # Only 755 can build success!
+ install -dm755 $pkgdir/opt/${pkgname%-git}/
+ mv * $pkgdir/opt/${pkgname%-git}/
+}