feat: various fixes

This commit is contained in:
otaj 2025-09-15 22:06:26 +02:00
parent 1a1bf09355
commit 9ef68328ca
3 changed files with 13 additions and 7 deletions

View file

@ -1,7 +1,7 @@
pkgbase = surfshark-client
pkgdesc = Official Surfshark VPN client
pkgver = 3.5.4
pkgrel = 1
pkgrel = 2
url = https://surfshark.com
install = surfshark-client.install
arch = x86_64

View file

@ -2,7 +2,7 @@
pkgname=surfshark-client
pkgver=3.5.4
pkgrel=1
pkgrel=2
pkgdesc="Official Surfshark VPN client"
arch=('x86_64')
url="https://surfshark.com"
@ -28,20 +28,26 @@ prepare() {
}
package(){
mv usr/ opt/ "${pkgdir}"
mv usr/ opt/ etc/ "${pkgdir}"
# Install License file
install -D -m644 "${pkgdir}/opt/Surfshark/resources/dist/resources/surfsharkd.js.LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
# Create link for surfshark executable in /bin
mkdir -p "${pkgdir}/usr/bin" && ln -sf "${pkgdir}/opt/Surfshark/surfshark" "${pkgdir}/usr/bin/surfshark"
mkdir -p "${pkgdir}/usr/bin" && ln -sf "/opt/Surfshark/surfshark" "${pkgdir}/usr/bin/surfshark"
# Correct permissions on OpenVPN secrets
chmod 750 "${pkgdir}/etc/openvpn/client"
# SUID chrome-sandbox for Electron 5+
chmod 4755 "${pkgdir}/opt/Surfshark/chrome-sandbox" || true
# Assign correct permissions for systemctl to run surfsharkd service as user
# Please note that surfsharkd2 systemd service is run as system user and only
# root user executable permission needs to be set
chmod 755 "${pkgdir}/opt/Surfshark/resources/dist/resources/surfsharkd.js" || true
chmod 744 "${pkgdir}/opt/Surfshark/resources/dist/resources/surfsharkd2.js" || true
# Permissions for update and diagnostics
chmod 755 "${pkgdir}/opt/Surfshark/resources/dist/resources/update" || true
chmod 755 "${pkgdir}/opt/Surfshark/resources/dist/resources/diagnostics" || true
}

View file

@ -1,6 +1,6 @@
post_install() {
echo -e " sudo systemctl daemon-reload"
echo -e " sudo systemctl enable surfsharkd2.service && sudo systemctl start surfsharkd2.service\n"
echo -e " sudo systemctl enable surfsharkd2.service && sudo systemctl start surfsharkd2.service"
}
post_upgrade() {