upgpkg: discord-electron-openasar 0.0.28+811-1
upstream release Refactor PKGBUILD slightly Update Krisp checksum Check for empty lines when parsing flags
This commit is contained in:
parent
02d1c8dc1d
commit
a7820e7869
3 changed files with 24 additions and 26 deletions
8
.SRCINFO
8
.SRCINFO
|
@ -1,6 +1,6 @@
|
||||||
pkgbase = discord-electron-openasar
|
pkgbase = discord-electron-openasar
|
||||||
pkgdesc = Discord packaged with OpenAsar using system provided electron (v22) for increased security and performance
|
pkgdesc = Discord packaged with OpenAsar using system provided electron (v22) for increased security and performance
|
||||||
pkgver = 0.0.27+811
|
pkgver = 0.0.28+811
|
||||||
pkgrel = 1
|
pkgrel = 1
|
||||||
url = https://discord.com
|
url = https://discord.com
|
||||||
install = discord-electron-openasar.install
|
install = discord-electron-openasar.install
|
||||||
|
@ -20,11 +20,11 @@ pkgbase = discord-electron-openasar
|
||||||
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
|
||||||
source = git+https://github.com/goosemod/openasar.git#commit=5ac246dc92e9a2a9b314d899df728f37096c482b
|
source = git+https://github.com/goosemod/openasar.git#commit=5ac246dc92e9a2a9b314d899df728f37096c482b
|
||||||
sha512sums = 285a0119b4740402a3fa94d3679a52bc8d883413ee32187e90087960a4d34aaf316788d2708bbccafe3f995c2b99767b45bc4b7c731704ef887a8de1b3d3926f
|
sha512sums = 763fe47a0fb21a13e852bcc818d4e0e2ea4faf23fcfdc02fddfe06e8c829499e028e27b45d807d3b3edcc36788990f3f21c0460b9b8efc538b62f3b41aeb744d
|
||||||
sha512sums = 4bbe010c28926ca898ac33da15ce8373060af44e0583e6956671fa2ee8a2a379a88a6ff9b4f886806fc05117428834852ba2e81a9163381c678c240067b7abd0
|
sha512sums = f516b1dba10f423f1ebe69b14f70740232b19d343b603c3479ba1e1dd2b7bcf472e92d354fde3a9d553bfae78207ae0420be60372a4b38ba78c3421172230826
|
||||||
sha512sums = SKIP
|
sha512sums = SKIP
|
||||||
|
|
||||||
pkgname = discord-electron-openasar
|
pkgname = discord-electron-openasar
|
||||||
|
|
40
PKGBUILD
40
PKGBUILD
|
@ -7,7 +7,7 @@
|
||||||
pkgname=discord-electron-openasar
|
pkgname=discord-electron-openasar
|
||||||
_pkgname=discord
|
_pkgname=discord
|
||||||
_electron=22
|
_electron=22
|
||||||
pkgver=0.0.27+811
|
pkgver=0.0.28+811
|
||||||
_pkgver=${pkgver%%+*}
|
_pkgver=${pkgver%%+*}
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Discord packaged with OpenAsar using system provided electron (v${_electron}) for increased security and performance"
|
pkgdesc="Discord packaged with OpenAsar using system provided electron (v${_electron}) for increased security and performance"
|
||||||
|
@ -26,14 +26,14 @@ 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'
|
||||||
"git+https://github.com/goosemod/openasar.git#commit=5ac246dc92e9a2a9b314d899df728f37096c482b")
|
"git+https://github.com/goosemod/openasar.git#commit=5ac246dc92e9a2a9b314d899df728f37096c482b")
|
||||||
sha512sums=('285a0119b4740402a3fa94d3679a52bc8d883413ee32187e90087960a4d34aaf316788d2708bbccafe3f995c2b99767b45bc4b7c731704ef887a8de1b3d3926f'
|
sha512sums=('763fe47a0fb21a13e852bcc818d4e0e2ea4faf23fcfdc02fddfe06e8c829499e028e27b45d807d3b3edcc36788990f3f21c0460b9b8efc538b62f3b41aeb744d'
|
||||||
'4bbe010c28926ca898ac33da15ce8373060af44e0583e6956671fa2ee8a2a379a88a6ff9b4f886806fc05117428834852ba2e81a9163381c678c240067b7abd0'
|
'f516b1dba10f423f1ebe69b14f70740232b19d343b603c3479ba1e1dd2b7bcf472e92d354fde3a9d553bfae78207ae0420be60372a4b38ba78c3421172230826'
|
||||||
'SKIP')
|
'SKIP')
|
||||||
|
|
||||||
_krisp_b2sum='592f55259500afc0d7fd334a10d3c1991fae05db870bf12437edc43cf693988195341f2cb827aba333c0e65fb4cb40dccfcc5d6a84dea4a1645f9563505b6496'
|
_krisp_b2sum='56c8c5167e3c4b51720accf0acfe46e7e073b015600088b6bb4d2b7a259cd788c4facba2d7332b535cfa39b91ee94840d6ea905c5d0c9cca43fa0a26f5185cc9'
|
||||||
|
|
||||||
# just in case I get the version wrong
|
# just in case I get the version wrong
|
||||||
pkgver() {
|
pkgver() {
|
||||||
|
@ -46,37 +46,35 @@ prepare() {
|
||||||
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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "${srcdir}"/openasar
|
||||||
|
|
||||||
|
# pack openasar
|
||||||
|
sed -i -e "s/nightly/nightly-$(git rev-parse HEAD | cut -c 1-7)/" src/index.js
|
||||||
|
node scripts/strip.js
|
||||||
|
asar p src app.asar
|
||||||
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
# create necessary directories
|
# create necessary directories
|
||||||
install -d "${pkgdir}"/usr/{lib/$_pkgname,bin}
|
install -d "${pkgdir}"/usr/{lib/$_pkgname,bin}
|
||||||
install -d "${pkgdir}"/usr/share/{pixmaps,applications,licenses/$_pkgname}
|
install -d "${pkgdir}"/usr/share/{pixmaps,applications,licenses/$_pkgname}
|
||||||
|
|
||||||
cd "${srcdir}/openasar"
|
|
||||||
|
|
||||||
# pack openasar
|
|
||||||
sed -i -e "s/nightly/nightly-$(git rev-parse HEAD | cut -c 1-7)/" src/index.js
|
|
||||||
node scripts/strip.js
|
|
||||||
asar p src app.asar
|
|
||||||
|
|
||||||
cd "${srcdir}/Discord"
|
|
||||||
|
|
||||||
# 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}"
|
# overwrite Discord asar
|
||||||
|
|
||||||
# copy openasar
|
|
||||||
install -Dm 644 openasar/app.asar "${pkgdir}"/usr/lib/$_pkgname/
|
install -Dm 644 openasar/app.asar "${pkgdir}"/usr/lib/$_pkgname/
|
||||||
|
|
||||||
# install the launch script
|
# install the launch script
|
||||||
|
|
|
@ -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