summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorSibren Vasse2019-08-16 11:56:29 +0200
committerSibren Vasse2019-08-16 11:56:29 +0200
commit04326794ec3a8399b15d7293f0f5665e32cf6aed (patch)
tree26b67de52a6ef995ab3d3c6ee81392a078aa2365 /PKGBUILD
parent7a745095ee41da2f4f57dc8910fd4812b6e87566 (diff)
downloadaur-04326794ec3a8399b15d7293f0f5665e32cf6aed.tar.gz
Switch from sed replaces to patches
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD34
1 files changed, 23 insertions, 11 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 927b8ca5d9a6..2caeafc49f2c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,13 +10,21 @@ license=('custom:"Copyright (c) 2006-2018 Deezer S.A."')
depends=('electron')
provides=('deezer')
options=('!strip')
-makedepends=('p7zip' 'asar')
+makedepends=('p7zip' 'asar' 'prettier')
source=(
-"$pkgname-$pkgver-setup.exe::https://www.deezer.com/desktop/download/artifact/win32/x86/$pkgver"
-"$pkgname.desktop"
+ "$pkgname-$pkgver-setup.exe::https://www.deezer.com/desktop/download/artifact/win32/x86/$pkgver"
+ "$pkgname.desktop"
+ systray.patch
+ nodeIntegration.patch
+ urls.patch
+ frameless.patch
)
md5sums=('208423389ef47f1c70d60d6e591202e0'
- 'bb851102d63a9cb396b42d7a61c5104c')
+ 'bb851102d63a9cb396b42d7a61c5104c'
+ '4a491cdf76afeffb7680d3abdc3f4b89'
+ '199ce71cc60dd7feb84ee36a8580639d'
+ '7ee49aab9514e5a4df00fbd7da982688'
+ '3ffc8aa66157da1088eeeaa4b3f05587')
package() {
@@ -31,19 +39,23 @@ package() {
7z x -y -bsp0 -bso0 app-32.7z
cd resources/
+ rm -r app || true
asar extract app.asar app
- # Fix crash on startup since 4.14.1 (patch systray icon path)
- sed -i 's/build\/linux\/systray.png/..\/..\/..\/share\/deezer\/systray.png/g' app/app/js/main/Utils/index.js
# Remove NodeRT from package (-205.72 MiB)
rm -r app/node_modules/@nodert
+
+ cd app
+ prettier --write "app/js/**/*.js"
+ # Fix crash on startup since 4.14.1 (patch systray icon path)
+ patch -p1 < "$srcdir/systray.patch"
# Fix electron 5 incompatibility
- sed -i 's/webPreferences:{dev/webPreferences:{nodeIntegration:true,dev/g' app/app/js/main/App/index.js
- sed -i 's/nodeIntegration:!1/nodeIntegration:true/g' app/app/js/main/App/index.js
+ patch -p1 < "$srcdir/nodeIntegration.patch"
# Fix startup error electron 6.0.1 (https://github.com/electron/electron/pull/19570
- sed -i 's|urls:\[\"\*\.\"+r.tld\]|urls:\["\*://\*/\*\"\]|g' app/app/js/main/App/index.js
- sed -i 's|urls:\[\"\*\.\*\"\]|urls:\["\*://\*/\*\"\]|g' app/app/js/main/App/index.js
+ patch -p1 < "$srcdir/urls.patch"
# Disable menu bar
- sed -i 's/frame:!this\.isFrameless/frame:this\.isFrameless/g' app/app/js/main/App/index.js
+ patch -p1 < "$srcdir/frameless.patch"
+
+ cd ..
asar pack app app.asar
cd "${srcdir}"