summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSahil Gupte2022-04-11 16:08:16 +0530
committerSahil Gupte2022-04-11 16:08:16 +0530
commite623ec06f4a5febdd7d54f9256f8b4a28693d71f (patch)
treeceef6640d46c41788185c500b8b39a69ac96b402
parent886ce546e1b67d71e1ffaf714bc1ccf9596de414 (diff)
downloadaur-e623ec06f4a5febdd7d54f9256f8b4a28693d71f.tar.gz
Bump to 2.0.0 and build package from scratch
Signed-off-by: Sahil Gupte <sahilsachingupte@gmail.com>
-rwxr-xr-x.SRCINFO18
-rw-r--r--.gitignore3
-rwxr-xr-xPKGBUILD55
-rwxr-xr-xmoosync2
4 files changed, 57 insertions, 21 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 816f03e0543e..c80ed16a63d5 100755
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,20 @@
pkgbase = moosync
pkgdesc = A simple music player
- pkgver = 1.2.0
- pkgrel = 2
+ pkgver = 2.0.0
+ pkgrel = 1
url = https://github.com/Moosync/Moosync
- arch = x86_64
+ arch = any
license = GPL3
- depends = electron17-bin
+ makedepends = nodejs-lts-gallium
+ makedepends = yarn
+ depends = electron
depends = libvips
provides = moosync
- source = moosync-1.2.0.tar::https://github.com/Moosync/Moosync/releases/download/v1.2.0/Moosync-1.2.0-linux-x64.pacman
+ source = moosync-2.0.0.tar::https://github.com/Moosync/Moosync/archive/v2.0.0.tar.gz
source = moosync
- sha256sums = 25cb1930bede987828fc518566f2773a380290157ea560eee8d959be6353376c
- sha256sums = 4358bc8c2511a4d8c7ca3ca88357a07124be7dff827009317e19f1b3e4fa3ec5
+ source = moosync.desktop
+ sha256sums = 2b3cb52b97f2d600f28a2e299dd7e905bc815c859c3ab4c2627c3b51e0705e10
+ sha256sums = 36867efee6f9a491e64979ed329ce87f2136da2afcce4c9ef5696a9f2538d9ba
+ sha256sums = 4b63fa17717239db8a87ebeae1fdd96c5318b71d7d851d6c5a4f337793d3fecd
pkgname = moosync
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..c4db1d2669eb
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+*.tar
+src
+pkg \ No newline at end of file
diff --git a/PKGBUILD b/PKGBUILD
index edb7a86cc7f8..f3a0063ceecb 100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,32 +1,61 @@
# Maintainer: Sahil Gupte <ovenoboyo@gmail.com>
pkgname=moosync
-pkgver=1.2.0
-pkgrel=2
+pkgver=2.0.0
+pkgrel=1
pkgdesc='A simple music player'
-arch=('x86_64')
+arch=('any')
url='https://github.com/Moosync/Moosync'
license=('GPL3')
provides=("${pkgname}")
-depends=('electron17-bin' 'libvips')
-source=("${pkgname}-${pkgver}.tar::https://github.com/Moosync/Moosync/releases/download/v${pkgver}/Moosync-${pkgver}-linux-x64.pacman" moosync)
-sha256sums=('25cb1930bede987828fc518566f2773a380290157ea560eee8d959be6353376c' '4358bc8c2511a4d8c7ca3ca88357a07124be7dff827009317e19f1b3e4fa3ec5')
+depends=('electron' 'libvips')
+makedepends=('nodejs-lts-gallium' 'yarn')
+source=("${pkgname}-${pkgver}.tar::https://github.com/Moosync/Moosync/archive/v${pkgver}.tar.gz" moosync moosync.desktop)
+sha256sums=('2b3cb52b97f2d600f28a2e299dd7e905bc815c859c3ab4c2627c3b51e0705e10'
+ '36867efee6f9a491e64979ed329ce87f2136da2afcce4c9ef5696a9f2538d9ba'
+ '4b63fa17717239db8a87ebeae1fdd96c5318b71d7d851d6c5a4f337793d3fecd')
+_sourcedirectory="Moosync-$pkgver"
+
+prepare() {
+ cd "$srcdir/$_sourcedirectory/"
+
+ # Remove electron from package.json
+ sed -E -i 's|("electron": ").*"|\1'"$(cat "/usr/lib/electron/version")"'"|' 'package.json'
+
+
+ # Change electronDist from electron18 to electron
+ sed -E -i 's/electron18/electron/g' vue.config.js
+
+ yarn install
+}
+
+build() {
+ cd "$srcdir/$_sourcedirectory/"
+
+ yarn electron:build --linux --dir
+}
package() {
- cd "$srcdir"
+ cd "$srcdir/$_sourcedirectory/"
+ local _outpath='dist_electron/linux-unpacked'
# Place files
install -d "${pkgdir}/opt/Moosync"
- cp -R "${srcdir}/opt/Moosync/resources" "${pkgdir}/opt/Moosync/resources"
+ cp -R "${_outpath}/resources" "${pkgdir}/opt/Moosync/resources"
+ for _size in 16 32 48 256 512; do
+ install -Dm644 "build/icons/${_size}x${_size}.png" "$pkgdir/usr/share/icons/hicolor/${_size}x${_size}/apps/moosync.png"
+ done
+
+ cd "$srcdir"
install -d "${pkgdir}/usr/bin"
install "moosync" "${pkgdir}/usr/bin/moosync"
# Edit desktop entry executable path
- sed -i "s/opt\/Moosync\/moosync/usr\/bin\/moosync/g" "${srcdir}/usr/share/applications/moosync.desktop"
+ # sed -i "s/opt\/Moosync\/moosync/usr\/bin\/moosync/g" "${srcdir}/usr/share/applications/moosync.desktop"
# Place desktop entry and icons
- desktop-file-install -m 644 --dir "${pkgdir}/usr/share/applications/" "${srcdir}/usr/share/applications/moosync.desktop"
- install -dm755 "${pkgdir}/usr/share/icons/hicolor/"
- cp -R "${srcdir}/usr/share/icons/hicolor/"* "${pkgdir}/usr/share/icons/hicolor/"
-} \ No newline at end of file
+ desktop-file-install -m 644 --dir "${pkgdir}/usr/share/applications/" "moosync.desktop"
+ # install -dm755 "${pkgdir}/usr/share/icons/hicolor/"
+ # cp -R "${srcdir}/usr/share/icons/hicolor/"* "${pkgdir}/usr/share/icons/hicolor/"
+}
diff --git a/moosync b/moosync
index 6c47d1239aba..31187ea8ea86 100755
--- a/moosync
+++ b/moosync
@@ -1,2 +1,2 @@
#!/bin/sh
-exec electron17 /opt/Moosync/resources/app.asar "$@"
+exec electron /opt/Moosync/resources/app.asar "$@"