From 93e3d6b048308ed4c99510c13d39acef1a6d787d Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Tue, 30 Apr 2024 13:25:47 +0200 Subject: [PATCH] Remove SRCINFO, fix SKIP insertion Signed-off-by: Knut Ahlers --- .SRCINFO | 25 ------------------------- PKGBUILD | 10 ++++------ update_version.sh | 31 ++++++++++++++----------------- 3 files changed, 18 insertions(+), 48 deletions(-) delete mode 100644 .SRCINFO diff --git a/.SRCINFO b/.SRCINFO deleted file mode 100644 index 0fbadb8..0000000 --- a/.SRCINFO +++ /dev/null @@ -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 diff --git a/PKGBUILD b/PKGBUILD index a7a797b..76dfa55 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -34,12 +34,10 @@ source=( 'LICENSE.html::https://discord.com/terms' 'OSS-LICENSES.html::https://discord.com/licenses' ) -sha512sums=( - '42ff4b59a0dd846f06a297a1a8b5a1e28f37daa6951b4ce597d103492458c5ae90f69545908cd41238c5ed91b249ad2dd9b9cec3ef4feeb9ad22245c692eaa72' - '140b8fd340caf1069fcde0d23c8058488a59518b0b55db70290bd2c50b6c3c1c28978fe7d3a6e8feff65cec990f41e34cf68876acfc0183c51f6a58e9f8cb668' - SKIP - SKIP -) +sha512sums=('42ff4b59a0dd846f06a297a1a8b5a1e28f37daa6951b4ce597d103492458c5ae90f69545908cd41238c5ed91b249ad2dd9b9cec3ef4feeb9ad22245c692eaa72' + '140b8fd340caf1069fcde0d23c8058488a59518b0b55db70290bd2c50b6c3c1c28978fe7d3a6e8feff65cec990f41e34cf68876acfc0183c51f6a58e9f8cb668' + 'SKIP' + 'SKIP') prepare() { # fix the .desktop file diff --git a/update_version.sh b/update_version.sh index 6008357..fe94da9 100755 --- a/update_version.sh +++ b/update_version.sh @@ -6,40 +6,37 @@ PKG=$(awk -F '=' '/pkgname=/{ print $2 }' PKGBUILD) # Get latest version VER=$( - curl -fsS \ - -o /dev/null \ - -w '%{redirect_url}' \ - 'https://discord.com/api/download?platform=linux&format=tar.gz' | - grep -o '[0-9]*\.[0-9]*\.[0-9]*' | - head -n1 + curl -fsS \ + -o /dev/null \ + -w '%{redirect_url}' \ + 'https://discord.com/api/download?platform=linux&format=tar.gz' | + grep -o '[0-9]*\.[0-9]*\.[0-9]*' | + head -n1 ) [[ -n $VER ]] # Insert latest version into PKGBUILD sed -i \ - -e "s/^pkgver=.*/pkgver=${VER}/" \ - PKGBUILD + -e "s/^pkgver=.*/pkgver=${VER}/" \ + PKGBUILD # Check whether this changed anything if (git diff --exit-code PKGBUILD); then - echo "Package ${PKG} has most recent version ${VER}" - exit 0 + echo "Package ${PKG} has most recent version ${VER}" + exit 0 fi # Reset pkgrel sed -i \ - -e 's/pkgrel=.*/pkgrel=1/' \ - PKGBUILD + -e 's/pkgrel=.*/pkgrel=1/' \ + PKGBUILD # Update source hashes updpkgsums # Remove checksums for HTML files (they change all the time) -sed -i -e "/sha512sums/,/)/ {s/ '.*'/ 'SKIP'/}" PKGBUILD - -# Update .SRCINFO -makepkg --printsrcinfo >.SRCINFO +sed -i -e "/sha512sums/,/)/ {n;n;s/ '.*'/ 'SKIP'/;n;s/ '.*'/ 'SKIP'/}" PKGBUILD # Commit changes -git add PKGBUILD .SRCINFO +git add PKGBUILD git commit -m "${PKG} v${VER}"