upgpkg: discord-electron 0.0.28-1
upstream release Refactor PKGBUILD slightly Update Krisp checksum Check for empty lines when parsing flags
This commit is contained in:
parent
0359d05d68
commit
746bf996c0
3 changed files with 24 additions and 24 deletions
|
@ -1,7 +1,7 @@
|
||||||
pkgbase = discord-electron
|
pkgbase = discord-electron
|
||||||
pkgdesc = Discord using system provided electron (v22) for increased security and performance
|
pkgdesc = Discord using system provided electron (v22) for increased security and performance
|
||||||
pkgver = 0.0.27
|
pkgver = 0.0.28
|
||||||
pkgrel = 7
|
pkgrel = 1
|
||||||
url = https://discord.com
|
url = https://discord.com
|
||||||
install = discord-electron.install
|
install = discord-electron.install
|
||||||
arch = x86_64
|
arch = x86_64
|
||||||
|
@ -18,9 +18,9 @@ pkgbase = discord-electron
|
||||||
provides = discord
|
provides = discord
|
||||||
conflicts = discord
|
conflicts = discord
|
||||||
options = !strip
|
options = !strip
|
||||||
source = https://dl.discordapp.net/apps/linux/0.0.27/discord-0.0.27.tar.gz
|
source = https://dl.discordapp.net/apps/linux/0.0.28/discord-0.0.28.tar.gz
|
||||||
source = discord-launcher.sh
|
source = discord-launcher.sh
|
||||||
sha512sums = 285a0119b4740402a3fa94d3679a52bc8d883413ee32187e90087960a4d34aaf316788d2708bbccafe3f995c2b99767b45bc4b7c731704ef887a8de1b3d3926f
|
sha512sums = 763fe47a0fb21a13e852bcc818d4e0e2ea4faf23fcfdc02fddfe06e8c829499e028e27b45d807d3b3edcc36788990f3f21c0460b9b8efc538b62f3b41aeb744d
|
||||||
sha512sums = 4bbe010c28926ca898ac33da15ce8373060af44e0583e6956671fa2ee8a2a379a88a6ff9b4f886806fc05117428834852ba2e81a9163381c678c240067b7abd0
|
sha512sums = f516b1dba10f423f1ebe69b14f70740232b19d343b603c3479ba1e1dd2b7bcf472e92d354fde3a9d553bfae78207ae0420be60372a4b38ba78c3421172230826
|
||||||
|
|
||||||
pkgname = discord-electron
|
pkgname = discord-electron
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
pkgname=discord-electron
|
pkgname=discord-electron
|
||||||
_pkgname=discord
|
_pkgname=discord
|
||||||
_electron=22
|
_electron=22
|
||||||
pkgver=0.0.27
|
pkgver=0.0.28
|
||||||
pkgrel=7
|
pkgrel=1
|
||||||
pkgdesc="Discord using system provided electron (v${_electron}) for increased security and performance"
|
pkgdesc="Discord using system provided electron (v${_electron}) for increased security and performance"
|
||||||
arch=('x86_64')
|
arch=('x86_64')
|
||||||
provides=("${_pkgname}")
|
provides=("${_pkgname}")
|
||||||
|
@ -32,31 +32,27 @@ optdepends=(
|
||||||
'xdg-utils: Open files'
|
'xdg-utils: Open files'
|
||||||
'rizin: Allow patching Krisp support'
|
'rizin: Allow patching Krisp support'
|
||||||
)
|
)
|
||||||
source=("https://dl.discordapp.net/apps/linux/${pkgver}/discord-${pkgver}.tar.gz"
|
source=("https://dl.discordapp.net/apps/linux/${pkgver}/${_pkgname}-${pkgver}.tar.gz"
|
||||||
'discord-launcher.sh')
|
'discord-launcher.sh')
|
||||||
sha512sums=('285a0119b4740402a3fa94d3679a52bc8d883413ee32187e90087960a4d34aaf316788d2708bbccafe3f995c2b99767b45bc4b7c731704ef887a8de1b3d3926f'
|
sha512sums=('763fe47a0fb21a13e852bcc818d4e0e2ea4faf23fcfdc02fddfe06e8c829499e028e27b45d807d3b3edcc36788990f3f21c0460b9b8efc538b62f3b41aeb744d'
|
||||||
'4bbe010c28926ca898ac33da15ce8373060af44e0583e6956671fa2ee8a2a379a88a6ff9b4f886806fc05117428834852ba2e81a9163381c678c240067b7abd0')
|
'f516b1dba10f423f1ebe69b14f70740232b19d343b603c3479ba1e1dd2b7bcf472e92d354fde3a9d553bfae78207ae0420be60372a4b38ba78c3421172230826')
|
||||||
|
|
||||||
_krisp_b2sum='592f55259500afc0d7fd334a10d3c1991fae05db870bf12437edc43cf693988195341f2cb827aba333c0e65fb4cb40dccfcc5d6a84dea4a1645f9563505b6496'
|
_krisp_b2sum='56c8c5167e3c4b51720accf0acfe46e7e073b015600088b6bb4d2b7a259cd788c4facba2d7332b535cfa39b91ee94840d6ea905c5d0c9cca43fa0a26f5185cc9'
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
# prepare launcher script
|
# prepare launcher script
|
||||||
sed -i "s|@PKGNAME@|${_pkgname}|g;s|@PKGVER@|${pkgver}|g;s|@ELECTRON@|${_electron}|g;s|@KRISPB2@|${_krisp_b2sum}|g" discord-launcher.sh
|
sed -i "s|@PKGNAME@|${_pkgname}|g;s|@PKGVER@|${pkgver}|g;s|@ELECTRON@|${_electron}|g;s|@KRISPB2@|${_krisp_b2sum}|g" discord-launcher.sh
|
||||||
|
|
||||||
# fix the .desktop file
|
# fix the .desktop file
|
||||||
sed -i "s|Exec=.*|Exec=/usr/bin/${_pkgname}|" Discord/$_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
|
||||||
curl https://discord.com/licenses | html2text >"${srcdir}"/OSS-LICENSES.md
|
curl https://discord.com/licenses | html2text >"${srcdir}"/OSS-LICENSES.md
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
build() {
|
||||||
# create necessary directories
|
cd "${srcdir}"/${_pkgname^}
|
||||||
install -d "${pkgdir}"/usr/{lib/$_pkgname,bin}
|
|
||||||
install -d "${pkgdir}"/usr/share/{pixmaps,applications,licenses/$_pkgname}
|
|
||||||
|
|
||||||
cd "${srcdir}/Discord"
|
|
||||||
|
|
||||||
# use system electron
|
# use system electron
|
||||||
asar e resources/app.asar resources/app
|
asar e resources/app.asar resources/app
|
||||||
|
@ -65,16 +61,20 @@ package() {
|
||||||
sed -i "s|exeDir,|'/usr/share/pixmaps',|" resources/app/app_bootstrap/autoStart/linux.js
|
sed -i "s|exeDir,|'/usr/share/pixmaps',|" 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
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
# create necessary directories
|
||||||
|
install -d "${pkgdir}"/usr/{lib/$_pkgname,bin}
|
||||||
|
install -d "${pkgdir}"/usr/share/{pixmaps,applications,licenses/$_pkgname}
|
||||||
|
|
||||||
# copy relevant data
|
# copy relevant data
|
||||||
cp -r resources/* "${pkgdir}"/usr/lib/$_pkgname/
|
cp -r ${_pkgname^}/resources/* "${pkgdir}"/usr/lib/$_pkgname/
|
||||||
cp $_pkgname.png \
|
cp ${_pkgname^}/$_pkgname.png \
|
||||||
"${pkgdir}"/usr/share/pixmaps/$_pkgname.png
|
"${pkgdir}"/usr/share/pixmaps/$_pkgname.png
|
||||||
cp $_pkgname.desktop \
|
cp ${_pkgname^}/$_pkgname.desktop \
|
||||||
"${pkgdir}"/usr/share/applications/$_pkgname.desktop
|
"${pkgdir}"/usr/share/applications/$_pkgname.desktop
|
||||||
|
|
||||||
cd "${srcdir}"
|
|
||||||
|
|
||||||
# install the launch script
|
# install the launch script
|
||||||
install -Dm 755 discord-launcher.sh "${pkgdir}"/usr/bin/$_pkgname
|
install -Dm 755 discord-launcher.sh "${pkgdir}"/usr/bin/$_pkgname
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for line in "${MAPFILE[@]}"; do
|
for line in "${MAPFILE[@]}"; do
|
||||||
if [[ ! "${line}" =~ ^[[:space:]]*#.* ]]; then
|
if [[ ! "${line}" =~ ^[[:space:]]*#.* ]] && [[ -n "${line}" ]]; then
|
||||||
flags+=("${line}")
|
flags+=("${line}")
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue