Compare commits

..

No commits in common. "c2fffeaf877f90d405ea82f686a525939e63b5b3" and "c483c7acdcdb668be0db3865dcf404481b96700e" have entirely different histories.

6 changed files with 27 additions and 43 deletions

View file

@ -1,7 +1,7 @@
pkgbase = discord-electron-openasar pkgbase = discord-electron-openasar
pkgdesc = Discord packaged with OpenAsar using system provided electron (v24) for increased security and performance pkgdesc = Discord packaged with OpenAsar using system provided electron (v24) for increased security and performance
pkgver = 0.0.34+816 pkgver = 0.0.34+813
pkgrel = 2 pkgrel = 1
url = https://discord.com url = https://discord.com
install = discord-electron-openasar.install install = discord-electron-openasar.install
arch = x86_64 arch = x86_64
@ -23,9 +23,9 @@ pkgbase = discord-electron-openasar
options = !strip options = !strip
source = https://dl.discordapp.net/apps/linux/0.0.34/discord-0.0.34.tar.gz source = https://dl.discordapp.net/apps/linux/0.0.34/discord-0.0.34.tar.gz
source = discord-launcher.sh source = discord-launcher.sh
source = git+https://github.com/goosemod/openasar.git#commit=403878f068006a826afc5af86ea4c6aaede1509a source = git+https://github.com/goosemod/openasar.git#commit=eee9bab822e3dbd97a735d0050ddd41ba27917f2
sha512sums = 28ab59e18ca3c800030c7c4b4f016efed033e741ad42f18b993e8493d51a78d430a4ff3c0a3457fdf8b43907a013f3145e67748e7a896d440af56074226c5c46 sha512sums = 28ab59e18ca3c800030c7c4b4f016efed033e741ad42f18b993e8493d51a78d430a4ff3c0a3457fdf8b43907a013f3145e67748e7a896d440af56074226c5c46
sha512sums = 723250b70c7f5367701675c6581e9eac2143263910c4ffc35957a6ab858492c5febe89ea0d46fce19ac1416c23d9ca3953e48b9db5aa174b4a401fb6efa5daf5 sha512sums = b0961f546a4016e24d516c6d1125c1af0e8ca84ab960f6abe10ec98c2c18543da2168ffb2676189ed110e9abbdb889abfb2c610954019250041a0a89b0b03bab
sha512sums = SKIP sha512sums = SKIP
pkgname = discord-electron-openasar pkgname = discord-electron-openasar

View file

@ -6,12 +6,11 @@
pkgname=discord-electron-openasar pkgname=discord-electron-openasar
_pkgname=discord _pkgname=discord
pkgver=0.0.34+816 _electron=24
pkgver=0.0.34+813
_pkgver=${pkgver%%+*} _pkgver=${pkgver%%+*}
pkgrel=2 pkgrel=1
_electronver=24 pkgdesc="Discord packaged with OpenAsar using system provided electron (v${_electron}) for increased security and performance"
_electronname="electron${_electronver}"
pkgdesc="Discord packaged with OpenAsar using system provided electron (v${_electronver}) for increased security and performance"
arch=('x86_64') arch=('x86_64')
provides=("${_pkgname}") provides=("${_pkgname}")
conflicts=("${_pkgname}") conflicts=("${_pkgname}")
@ -19,7 +18,7 @@ url='https://discord.com'
license=('custom') license=('custom')
options=('!strip') options=('!strip')
install="$pkgname.install" install="$pkgname.install"
depends=("${_electronname}" 'libxss' 'unzip') depends=("electron${_electron}" 'libxss' 'unzip')
makedepends=('git' 'asar' 'nodejs' 'curl' 'python-html2text') makedepends=('git' 'asar' 'nodejs' 'curl' 'python-html2text')
optdepends=( optdepends=(
'libpulse: Pulseaudio support' 'libpulse: Pulseaudio support'
@ -29,9 +28,9 @@ optdepends=(
) )
source=("https://dl.discordapp.net/apps/linux/${_pkgver}/${_pkgname}-${_pkgver}.tar.gz" source=("https://dl.discordapp.net/apps/linux/${_pkgver}/${_pkgname}-${_pkgver}.tar.gz"
'discord-launcher.sh' 'discord-launcher.sh'
"git+https://github.com/goosemod/openasar.git#commit=403878f068006a826afc5af86ea4c6aaede1509a") "git+https://github.com/goosemod/openasar.git#commit=eee9bab822e3dbd97a735d0050ddd41ba27917f2")
sha512sums=('28ab59e18ca3c800030c7c4b4f016efed033e741ad42f18b993e8493d51a78d430a4ff3c0a3457fdf8b43907a013f3145e67748e7a896d440af56074226c5c46' sha512sums=('28ab59e18ca3c800030c7c4b4f016efed033e741ad42f18b993e8493d51a78d430a4ff3c0a3457fdf8b43907a013f3145e67748e7a896d440af56074226c5c46'
'723250b70c7f5367701675c6581e9eac2143263910c4ffc35957a6ab858492c5febe89ea0d46fce19ac1416c23d9ca3953e48b9db5aa174b4a401fb6efa5daf5' 'b0961f546a4016e24d516c6d1125c1af0e8ca84ab960f6abe10ec98c2c18543da2168ffb2676189ed110e9abbdb889abfb2c610954019250041a0a89b0b03bab'
'SKIP') 'SKIP')
_krisp_b2sum='e36c3308b34e96f4c33425bb1d7ac0d8130fa5450c9db2ee3fbdbfa10887ab15f3ec06f9fdbd446553f9224052af0705a0eebfc92b55776a33a9cfdf0c3c53e4' _krisp_b2sum='e36c3308b34e96f4c33425bb1d7ac0d8130fa5450c9db2ee3fbdbfa10887ab15f3ec06f9fdbd446553f9224052af0705a0eebfc92b55776a33a9cfdf0c3c53e4'
@ -44,14 +43,10 @@ pkgver() {
prepare() { prepare() {
# prepare launcher script # prepare launcher script
sed -i -e "s|@PKGNAME@|${_pkgname}|g" \ sed -i "s|@PKGNAME@|${_pkgname}|g;s|@PKGVER@|${_pkgver}|g;s|@ELECTRON@|${_electron}|g;s|@KRISPB2@|${_krisp_b2sum}|g" discord-launcher.sh
-e "s|@PKGVER@|${_pkgver}|g" \
-e "s|@ELECTRON@|${_electronname}|g" \
-e "s|@KRISPB2@|${_krisp_b2sum}|g" \
discord-launcher.sh
# fix the .desktop file # fix the .desktop file
sed -i -e "s|Exec=.*|Exec=/usr/bin/${_pkgname}|" ${_pkgname^}/$_pkgname.desktop sed -i "s|Exec=.*|Exec=/usr/bin/${_pkgname}|" ${_pkgname^}/$_pkgname.desktop
# create the license files # create the license files
curl https://discord.com/terms | html2text >"${srcdir}"/LICENSE.md curl https://discord.com/terms | html2text >"${srcdir}"/LICENSE.md
@ -62,9 +57,7 @@ build() {
cd "${srcdir}"/openasar cd "${srcdir}"/openasar
# pack openasar # pack openasar
sed -i -e "s|nightly|nightly-$(git rev-parse HEAD | cut -c 1-7)|" src/index.js sed -i -e "s/nightly/nightly-$(git rev-parse HEAD | cut -c 1-7)/" src/index.js
sed -i -e "s|^Exec=\${exec}$|Exec=/usr/bin/${_pkgname}|" \
-e "s|^Name=\${basename(exec)}$|Name=${_pkgname^}|" src/autoStart.js
node scripts/strip.js node scripts/strip.js
asar p src app.asar asar p src app.asar
} }

View file

@ -39,7 +39,7 @@ done
unset flags_file krisp_bin krisp_b2 unset flags_file krisp_bin krisp_b2
exec /usr/lib/@ELECTRON@/electron \ exec /usr/bin/electron@ELECTRON@ \
/usr/lib/@PKGNAME@/app.asar \ /usr/lib/@PKGNAME@/app.asar \
--ozone-platform-hint=auto \ --ozone-platform-hint=auto \
"${flags[@]}" "$@" "${flags[@]}" "$@"

View file

@ -1,7 +1,7 @@
pkgbase = discord-electron pkgbase = discord-electron
pkgdesc = Discord using system provided electron (v24) for increased security and performance pkgdesc = Discord using system provided electron (v24) for increased security and performance
pkgver = 0.0.34 pkgver = 0.0.34
pkgrel = 2 pkgrel = 1
url = https://discord.com url = https://discord.com
install = discord-electron.install install = discord-electron.install
arch = x86_64 arch = x86_64
@ -21,6 +21,6 @@ pkgbase = discord-electron
source = https://dl.discordapp.net/apps/linux/0.0.34/discord-0.0.34.tar.gz source = https://dl.discordapp.net/apps/linux/0.0.34/discord-0.0.34.tar.gz
source = discord-launcher.sh source = discord-launcher.sh
sha512sums = 28ab59e18ca3c800030c7c4b4f016efed033e741ad42f18b993e8493d51a78d430a4ff3c0a3457fdf8b43907a013f3145e67748e7a896d440af56074226c5c46 sha512sums = 28ab59e18ca3c800030c7c4b4f016efed033e741ad42f18b993e8493d51a78d430a4ff3c0a3457fdf8b43907a013f3145e67748e7a896d440af56074226c5c46
sha512sums = 723250b70c7f5367701675c6581e9eac2143263910c4ffc35957a6ab858492c5febe89ea0d46fce19ac1416c23d9ca3953e48b9db5aa174b4a401fb6efa5daf5 sha512sums = b0961f546a4016e24d516c6d1125c1af0e8ca84ab960f6abe10ec98c2c18543da2168ffb2676189ed110e9abbdb889abfb2c610954019250041a0a89b0b03bab
pkgname = discord-electron pkgname = discord-electron

View file

@ -13,11 +13,10 @@
pkgname=discord-electron pkgname=discord-electron
_pkgname=discord _pkgname=discord
_electron=24
pkgver=0.0.34 pkgver=0.0.34
pkgrel=2 pkgrel=1
_electronver=24 pkgdesc="Discord using system provided electron (v${_electron}) for increased security and performance"
_electronname="electron${_electronver}"
pkgdesc="Discord using system provided electron (v${_electronver}) for increased security and performance"
arch=('x86_64') arch=('x86_64')
provides=("${_pkgname}") provides=("${_pkgname}")
conflicts=("${_pkgname}") conflicts=("${_pkgname}")
@ -25,7 +24,7 @@ url='https://discord.com'
license=('custom') license=('custom')
options=('!strip') options=('!strip')
install="$pkgname.install" install="$pkgname.install"
depends=("${_electronname}" 'libxss') depends=("electron${_electron}" 'libxss')
makedepends=('asar' 'curl' 'python-html2text') makedepends=('asar' 'curl' 'python-html2text')
optdepends=( optdepends=(
'libpulse: Pulseaudio support' 'libpulse: Pulseaudio support'
@ -36,20 +35,16 @@ optdepends=(
source=("https://dl.discordapp.net/apps/linux/${pkgver}/${_pkgname}-${pkgver}.tar.gz" source=("https://dl.discordapp.net/apps/linux/${pkgver}/${_pkgname}-${pkgver}.tar.gz"
'discord-launcher.sh') 'discord-launcher.sh')
sha512sums=('28ab59e18ca3c800030c7c4b4f016efed033e741ad42f18b993e8493d51a78d430a4ff3c0a3457fdf8b43907a013f3145e67748e7a896d440af56074226c5c46' sha512sums=('28ab59e18ca3c800030c7c4b4f016efed033e741ad42f18b993e8493d51a78d430a4ff3c0a3457fdf8b43907a013f3145e67748e7a896d440af56074226c5c46'
'723250b70c7f5367701675c6581e9eac2143263910c4ffc35957a6ab858492c5febe89ea0d46fce19ac1416c23d9ca3953e48b9db5aa174b4a401fb6efa5daf5') 'b0961f546a4016e24d516c6d1125c1af0e8ca84ab960f6abe10ec98c2c18543da2168ffb2676189ed110e9abbdb889abfb2c610954019250041a0a89b0b03bab')
_krisp_b2sum='e36c3308b34e96f4c33425bb1d7ac0d8130fa5450c9db2ee3fbdbfa10887ab15f3ec06f9fdbd446553f9224052af0705a0eebfc92b55776a33a9cfdf0c3c53e4' _krisp_b2sum='e36c3308b34e96f4c33425bb1d7ac0d8130fa5450c9db2ee3fbdbfa10887ab15f3ec06f9fdbd446553f9224052af0705a0eebfc92b55776a33a9cfdf0c3c53e4'
prepare() { prepare() {
# prepare launcher script # prepare launcher script
sed -i -e "s|@PKGNAME@|${_pkgname}|g" \ sed -i "s|@PKGNAME@|${_pkgname}|g;s|@PKGVER@|${pkgver}|g;s|@ELECTRON@|${_electron}|g;s|@KRISPB2@|${_krisp_b2sum}|g" discord-launcher.sh
-e "s|@PKGVER@|${pkgver}|g" \
-e "s|@ELECTRON@|${_electronname}|g" \
-e "s|@KRISPB2@|${_krisp_b2sum}|g" \
discord-launcher.sh
# fix the .desktop file # fix the .desktop file
sed -i -e "s|Exec=.*|Exec=/usr/bin/${_pkgname}|" ${_pkgname^}/$_pkgname.desktop sed -i "s|Exec=.*|Exec=/usr/bin/${_pkgname}|" ${_pkgname^}/$_pkgname.desktop
# create the license files # create the license files
curl https://discord.com/terms | html2text >"${srcdir}"/LICENSE.md curl https://discord.com/terms | html2text >"${srcdir}"/LICENSE.md
@ -62,12 +57,8 @@ build() {
# use system electron # use system electron
asar e resources/app.asar resources/app asar e resources/app.asar resources/app
rm resources/app.asar rm resources/app.asar
sed -i -e "s|process.resourcesPath|'/usr/lib/${_pkgname}'|" resources/app/app_bootstrap/buildInfo.js sed -i "s|process.resourcesPath|'/usr/lib/${_pkgname}'|" resources/app/app_bootstrap/buildInfo.js
sed -i -e "/^const appName/d" -e "/^const exePath/d" -e "/^const exeDir/d" -e "/^const iconPath/d" \ sed -i "s|exeDir,|'/usr/share/pixmaps',|" resources/app/app_bootstrap/autoStart/linux.js
-e "s|^Exec=\${exePath}$|Exec=/usr/bin/${_pkgname}|" \
-e "s|^Name=\${appName}$|Name=${_pkgname^}|" \
-e "s|^Icon=\${iconPath}$|Icon=/usr/share/pixmaps/${_pkgname}.png|" \
resources/app/app_bootstrap/autoStart/linux.js
asar p resources/app resources/app.asar asar p resources/app resources/app.asar
rm -rf resources/app rm -rf resources/app
} }

View file

@ -39,7 +39,7 @@ done
unset flags_file krisp_bin krisp_b2 unset flags_file krisp_bin krisp_b2
exec /usr/lib/@ELECTRON@/electron \ exec /usr/bin/electron@ELECTRON@ \
/usr/lib/@PKGNAME@/app.asar \ /usr/lib/@PKGNAME@/app.asar \
--ozone-platform-hint=auto \ --ozone-platform-hint=auto \
"${flags[@]}" "$@" "${flags[@]}" "$@"