From 81827cb15e317846d75503869be2ca74551bb903 Mon Sep 17 00:00:00 2001 From: Andrey Rodionov Date: Thu, 18 Apr 2024 10:49:28 +0300 Subject: [PATCH] Update skypeforlinux-bin --- skypeforlinux-bin/.SRCINFO | 8 +++++--- skypeforlinux-bin/.gitignore | 1 + skypeforlinux-bin/PKGBUILD | 23 ++++++++++++++++++----- skypeforlinux-bin/flags.sh | 15 +++++++++++++++ 4 files changed, 39 insertions(+), 8 deletions(-) create mode 100644 skypeforlinux-bin/flags.sh diff --git a/skypeforlinux-bin/.SRCINFO b/skypeforlinux-bin/.SRCINFO index b894332..05da7b8 100644 --- a/skypeforlinux-bin/.SRCINFO +++ b/skypeforlinux-bin/.SRCINFO @@ -1,6 +1,6 @@ pkgbase = skypeforlinux-bin pkgdesc = Skype for Linux - pkgver = 8.116.0.213 + pkgver = 8.117.0.202 pkgrel = 1 url = https://www.skype.com/ arch = x86_64 @@ -21,7 +21,9 @@ pkgbase = skypeforlinux-bin conflicts = skype options = !strip options = !emptydirs - source_x86_64 = skypeforlinux-8.116.0.213-x86_64.snap::https://api.snapcraft.io/api/v1/snaps/download/QRDEfjn4WJYnm0FzDKwqqRZZI77awQEV_340.snap - sha256sums_x86_64 = 2bba37a1222e18787533cd402a4fd277d83b1338a23c4c47bfb18041b8c26783 + source = flags.sh + sha256sums = d83693ffd8034c21030262ac00ce529c8da7b0196ea4b4eb2168861fc2657a2a + source_x86_64 = skypeforlinux-8.117.0.202-x86_64.snap::https://api.snapcraft.io/api/v1/snaps/download/QRDEfjn4WJYnm0FzDKwqqRZZI77awQEV_342.snap + sha256sums_x86_64 = 7b8acb67490139ee4ab8be9756ed32345850f4ad018babf106d3e073e1f3e053 pkgname = skypeforlinux-bin diff --git a/skypeforlinux-bin/.gitignore b/skypeforlinux-bin/.gitignore index 05c6d4d..e013aef 100644 --- a/skypeforlinux-bin/.gitignore +++ b/skypeforlinux-bin/.gitignore @@ -2,3 +2,4 @@ !.gitignore !.SRCINFO !PKGBUILD +!*.sh diff --git a/skypeforlinux-bin/PKGBUILD b/skypeforlinux-bin/PKGBUILD index 5d7174e..33b7bfc 100644 --- a/skypeforlinux-bin/PKGBUILD +++ b/skypeforlinux-bin/PKGBUILD @@ -1,6 +1,10 @@ +# curl -H 'Snap-Device-Series: 16' 'https://api.snapcraft.io/v2/snaps/info/skype' +_snap_id='QRDEfjn4WJYnm0FzDKwqqRZZI77awQEV' +_snap_rev_x86_64=342 + _name=skypeforlinux pkgname=${_name}-bin -pkgver=8.116.0.213 +pkgver=8.117.0.202 pkgrel=1 pkgdesc='Skype for Linux' arch=('x86_64') @@ -29,9 +33,16 @@ optdepends=( 'libappindicator-gtk3: system tray icon support' ) -# curl -H 'Snap-Device-Series: 16' 'https://api.snapcraft.io/v2/snaps/info/skype' -source_x86_64=("${_name}-${pkgver}-x86_64.snap::https://api.snapcraft.io/api/v1/snaps/download/QRDEfjn4WJYnm0FzDKwqqRZZI77awQEV_340.snap") -sha256sums_x86_64=('2bba37a1222e18787533cd402a4fd277d83b1338a23c4c47bfb18041b8c26783') +_get_source() { + local rname="_snap_rev_${1}" + echo -n "${_name}-${pkgver}-${1}.snap::https://api.snapcraft.io/api/v1/snaps/download/${_snap_id}_${!rname}.snap" +} + +source=('flags.sh') +source_x86_64=("$(_get_source 'x86_64')") + +sha256sums=('d83693ffd8034c21030262ac00ce529c8da7b0196ea4b4eb2168861fc2657a2a') +sha256sums_x86_64=('7b8acb67490139ee4ab8be9756ed32345850f4ad018babf106d3e073e1f3e053') package() { local sname="source_${CARCH}" @@ -50,8 +61,10 @@ package() { mv "${pkgdir}/usr/share/skypeforlinux" -t "${pkg_opt}" local pkg_bin="${pkgdir}/usr/bin" + local exec="${pkg_bin}/${_name}" install -dm755 "${pkg_bin}" - ln -s '/opt/skypeforlinux/skypeforlinux' -t "${pkg_bin}" + sed -e 's|@NAME@|skypeforlinux|;s|@EXEC@|/opt/skypeforlinux/skypeforlinux|' "${source[0]}" > "${exec}" + chmod 755 "${exec}" local pkg_app="${pkgdir}/usr/share/applications" mv "${pkgdir}/snap/gui" -T "${pkg_app}" diff --git a/skypeforlinux-bin/flags.sh b/skypeforlinux-bin/flags.sh new file mode 100644 index 0000000..fdaff68 --- /dev/null +++ b/skypeforlinux-bin/flags.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +FLAGS_FILE="${XDG_CONFIG_HOME:-"${HOME}/.config"}/@NAME@-flags.conf" + +[ -f "${FLAGS_FILE}" ] || exec '@EXEC@' "$@" + +mapfile -t FLAGS_LINES < "${FLAGS_FILE}" +declare -a FLAGS + +for line in "${FLAGS_LINES[@]}"; do + [[ "${line}" =~ ^[[:space:]]*#.* ]] && continue + FLAGS+=("${line}") +done + +exec '@EXEC@' "${FLAGS[@]}" "$@"