Remove SRCINFO, fix SKIP insertion
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
177876de7d
commit
93e3d6b048
3 changed files with 18 additions and 48 deletions
25
.SRCINFO
25
.SRCINFO
|
@ -1,25 +0,0 @@
|
||||||
pkgbase = discord
|
|
||||||
pkgdesc = Discord using system provided electron (v22) for increased security and performance
|
|
||||||
pkgver = 0.0.51
|
|
||||||
pkgrel = 1
|
|
||||||
url = https://discord.com
|
|
||||||
arch = x86_64
|
|
||||||
license = custom
|
|
||||||
makedepends = asar
|
|
||||||
makedepends = curl
|
|
||||||
makedepends = python-html2text
|
|
||||||
depends = electron22
|
|
||||||
depends = libnotify
|
|
||||||
depends = libxss
|
|
||||||
depends = nspr
|
|
||||||
depends = nss
|
|
||||||
depends = gtk3
|
|
||||||
optdepends = libpulse: Pulseaudio support
|
|
||||||
optdepends = xdg-utils: Open files
|
|
||||||
provides = discord
|
|
||||||
conflicts = discord
|
|
||||||
options = !strip
|
|
||||||
source = https://dl.discordapp.net/apps/linux/0.0.51/discord-0.0.51.tar.gz
|
|
||||||
sha512sums = b98072a64cfb593176e7e057b926fcf2d9e1a4aa555a659cebb8abe20fe463ff135a8028fd0fc36dc6c1bd40235da98c7c055c372e707cae00b882c8b0462dd9
|
|
||||||
|
|
||||||
pkgname = discord
|
|
10
PKGBUILD
10
PKGBUILD
|
@ -34,12 +34,10 @@ source=(
|
||||||
'LICENSE.html::https://discord.com/terms'
|
'LICENSE.html::https://discord.com/terms'
|
||||||
'OSS-LICENSES.html::https://discord.com/licenses'
|
'OSS-LICENSES.html::https://discord.com/licenses'
|
||||||
)
|
)
|
||||||
sha512sums=(
|
sha512sums=('42ff4b59a0dd846f06a297a1a8b5a1e28f37daa6951b4ce597d103492458c5ae90f69545908cd41238c5ed91b249ad2dd9b9cec3ef4feeb9ad22245c692eaa72'
|
||||||
'42ff4b59a0dd846f06a297a1a8b5a1e28f37daa6951b4ce597d103492458c5ae90f69545908cd41238c5ed91b249ad2dd9b9cec3ef4feeb9ad22245c692eaa72'
|
'140b8fd340caf1069fcde0d23c8058488a59518b0b55db70290bd2c50b6c3c1c28978fe7d3a6e8feff65cec990f41e34cf68876acfc0183c51f6a58e9f8cb668'
|
||||||
'140b8fd340caf1069fcde0d23c8058488a59518b0b55db70290bd2c50b6c3c1c28978fe7d3a6e8feff65cec990f41e34cf68876acfc0183c51f6a58e9f8cb668'
|
'SKIP'
|
||||||
SKIP
|
'SKIP')
|
||||||
SKIP
|
|
||||||
)
|
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
# fix the .desktop file
|
# fix the .desktop file
|
||||||
|
|
|
@ -6,40 +6,37 @@ PKG=$(awk -F '=' '/pkgname=/{ print $2 }' PKGBUILD)
|
||||||
|
|
||||||
# Get latest version
|
# Get latest version
|
||||||
VER=$(
|
VER=$(
|
||||||
curl -fsS \
|
curl -fsS \
|
||||||
-o /dev/null \
|
-o /dev/null \
|
||||||
-w '%{redirect_url}' \
|
-w '%{redirect_url}' \
|
||||||
'https://discord.com/api/download?platform=linux&format=tar.gz' |
|
'https://discord.com/api/download?platform=linux&format=tar.gz' |
|
||||||
grep -o '[0-9]*\.[0-9]*\.[0-9]*' |
|
grep -o '[0-9]*\.[0-9]*\.[0-9]*' |
|
||||||
head -n1
|
head -n1
|
||||||
)
|
)
|
||||||
|
|
||||||
[[ -n $VER ]]
|
[[ -n $VER ]]
|
||||||
|
|
||||||
# Insert latest version into PKGBUILD
|
# Insert latest version into PKGBUILD
|
||||||
sed -i \
|
sed -i \
|
||||||
-e "s/^pkgver=.*/pkgver=${VER}/" \
|
-e "s/^pkgver=.*/pkgver=${VER}/" \
|
||||||
PKGBUILD
|
PKGBUILD
|
||||||
|
|
||||||
# Check whether this changed anything
|
# Check whether this changed anything
|
||||||
if (git diff --exit-code PKGBUILD); then
|
if (git diff --exit-code PKGBUILD); then
|
||||||
echo "Package ${PKG} has most recent version ${VER}"
|
echo "Package ${PKG} has most recent version ${VER}"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Reset pkgrel
|
# Reset pkgrel
|
||||||
sed -i \
|
sed -i \
|
||||||
-e 's/pkgrel=.*/pkgrel=1/' \
|
-e 's/pkgrel=.*/pkgrel=1/' \
|
||||||
PKGBUILD
|
PKGBUILD
|
||||||
|
|
||||||
# Update source hashes
|
# Update source hashes
|
||||||
updpkgsums
|
updpkgsums
|
||||||
# Remove checksums for HTML files (they change all the time)
|
# Remove checksums for HTML files (they change all the time)
|
||||||
sed -i -e "/sha512sums/,/)/ {s/ '.*'/ 'SKIP'/}" PKGBUILD
|
sed -i -e "/sha512sums/,/)/ {n;n;s/ '.*'/ 'SKIP'/;n;s/ '.*'/ 'SKIP'/}" PKGBUILD
|
||||||
|
|
||||||
# Update .SRCINFO
|
|
||||||
makepkg --printsrcinfo >.SRCINFO
|
|
||||||
|
|
||||||
# Commit changes
|
# Commit changes
|
||||||
git add PKGBUILD .SRCINFO
|
git add PKGBUILD
|
||||||
git commit -m "${PKG} v${VER}"
|
git commit -m "${PKG} v${VER}"
|
||||||
|
|
Loading…
Reference in a new issue