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
7012eb2406
commit
f5e1003ea2
3 changed files with 24 additions and 24 deletions
10
.SRCINFO
10
.SRCINFO
|
@ -1,7 +1,7 @@
|
|||
pkgbase = discord-electron
|
||||
pkgdesc = Discord using system provided electron (v22) for increased security and performance
|
||||
pkgver = 0.0.27
|
||||
pkgrel = 7
|
||||
pkgver = 0.0.28
|
||||
pkgrel = 1
|
||||
url = https://discord.com
|
||||
install = discord-electron.install
|
||||
arch = x86_64
|
||||
|
@ -18,9 +18,9 @@ pkgbase = discord-electron
|
|||
provides = discord
|
||||
conflicts = discord
|
||||
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
|
||||
sha512sums = 285a0119b4740402a3fa94d3679a52bc8d883413ee32187e90087960a4d34aaf316788d2708bbccafe3f995c2b99767b45bc4b7c731704ef887a8de1b3d3926f
|
||||
sha512sums = 4bbe010c28926ca898ac33da15ce8373060af44e0583e6956671fa2ee8a2a379a88a6ff9b4f886806fc05117428834852ba2e81a9163381c678c240067b7abd0
|
||||
sha512sums = 763fe47a0fb21a13e852bcc818d4e0e2ea4faf23fcfdc02fddfe06e8c829499e028e27b45d807d3b3edcc36788990f3f21c0460b9b8efc538b62f3b41aeb744d
|
||||
sha512sums = f516b1dba10f423f1ebe69b14f70740232b19d343b603c3479ba1e1dd2b7bcf472e92d354fde3a9d553bfae78207ae0420be60372a4b38ba78c3421172230826
|
||||
|
||||
pkgname = discord-electron
|
||||
|
|
36
PKGBUILD
36
PKGBUILD
|
@ -14,8 +14,8 @@
|
|||
pkgname=discord-electron
|
||||
_pkgname=discord
|
||||
_electron=22
|
||||
pkgver=0.0.27
|
||||
pkgrel=7
|
||||
pkgver=0.0.28
|
||||
pkgrel=1
|
||||
pkgdesc="Discord using system provided electron (v${_electron}) for increased security and performance"
|
||||
arch=('x86_64')
|
||||
provides=("${_pkgname}")
|
||||
|
@ -32,31 +32,27 @@ optdepends=(
|
|||
'xdg-utils: Open files'
|
||||
'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')
|
||||
sha512sums=('285a0119b4740402a3fa94d3679a52bc8d883413ee32187e90087960a4d34aaf316788d2708bbccafe3f995c2b99767b45bc4b7c731704ef887a8de1b3d3926f'
|
||||
'4bbe010c28926ca898ac33da15ce8373060af44e0583e6956671fa2ee8a2a379a88a6ff9b4f886806fc05117428834852ba2e81a9163381c678c240067b7abd0')
|
||||
sha512sums=('763fe47a0fb21a13e852bcc818d4e0e2ea4faf23fcfdc02fddfe06e8c829499e028e27b45d807d3b3edcc36788990f3f21c0460b9b8efc538b62f3b41aeb744d'
|
||||
'f516b1dba10f423f1ebe69b14f70740232b19d343b603c3479ba1e1dd2b7bcf472e92d354fde3a9d553bfae78207ae0420be60372a4b38ba78c3421172230826')
|
||||
|
||||
_krisp_b2sum='592f55259500afc0d7fd334a10d3c1991fae05db870bf12437edc43cf693988195341f2cb827aba333c0e65fb4cb40dccfcc5d6a84dea4a1645f9563505b6496'
|
||||
_krisp_b2sum='56c8c5167e3c4b51720accf0acfe46e7e073b015600088b6bb4d2b7a259cd788c4facba2d7332b535cfa39b91ee94840d6ea905c5d0c9cca43fa0a26f5185cc9'
|
||||
|
||||
prepare() {
|
||||
# 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
|
||||
|
||||
# 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
|
||||
curl https://discord.com/terms | html2text >"${srcdir}"/LICENSE.md
|
||||
curl https://discord.com/licenses | html2text >"${srcdir}"/OSS-LICENSES.md
|
||||
}
|
||||
|
||||
package() {
|
||||
# create necessary directories
|
||||
install -d "${pkgdir}"/usr/{lib/$_pkgname,bin}
|
||||
install -d "${pkgdir}"/usr/share/{pixmaps,applications,licenses/$_pkgname}
|
||||
|
||||
cd "${srcdir}/Discord"
|
||||
build() {
|
||||
cd "${srcdir}"/${_pkgname^}
|
||||
|
||||
# use system electron
|
||||
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
|
||||
asar p resources/app resources/app.asar
|
||||
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
|
||||
cp -r resources/* "${pkgdir}"/usr/lib/$_pkgname/
|
||||
cp $_pkgname.png \
|
||||
cp -r ${_pkgname^}/resources/* "${pkgdir}"/usr/lib/$_pkgname/
|
||||
cp ${_pkgname^}/$_pkgname.png \
|
||||
"${pkgdir}"/usr/share/pixmaps/$_pkgname.png
|
||||
cp $_pkgname.desktop \
|
||||
cp ${_pkgname^}/$_pkgname.desktop \
|
||||
"${pkgdir}"/usr/share/applications/$_pkgname.desktop
|
||||
|
||||
cd "${srcdir}"
|
||||
|
||||
# install the launch script
|
||||
install -Dm 755 discord-launcher.sh "${pkgdir}"/usr/bin/$_pkgname
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ EOF
|
|||
fi
|
||||
|
||||
for line in "${MAPFILE[@]}"; do
|
||||
if [[ ! "${line}" =~ ^[[:space:]]*#.* ]]; then
|
||||
if [[ ! "${line}" =~ ^[[:space:]]*#.* ]] && [[ -n "${line}" ]]; then
|
||||
flags+=("${line}")
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue