Guest User

PKGBUILD

a guest
May 9th, 2021
85
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Maintainer: coco
  2. # Co-Maintainer: dramm <dramm at archlinux dot email>
  3. # Contributor: thatgeek
  4. # Contributor: TorGuard Support <support@torguard.com>
  5. pkgname=torguard
  6. pkgver=4.6.1
  7. pkgrel=1
  8. pkgdesc="TorGuard VPN Software
  9. Stay private online with TorGuard's anonymous VPN software and connect to 37+ countries worldwide."
  10. arch=('x86_64')
  11. url="https://www.torguard.com"
  12. depends=('iproute2'
  13. 'qt5-websockets'
  14. 'qt5-declarative'
  15. 'shadowsocks-libev'
  16. 'unbound'
  17. 'stunnel')
  18. optdepends=('wireguard-tools: wireguard support')
  19. license=(custom)
  20. source_x86_64=("https://updates.torguard.biz/Software/Linux/torguard-v${pkgver}-amd64-arch.tar.gz")
  21. sha256sums_x86_64=('3168c83f372649a8b0b56226b2dce7862f5826bea6bd2c2a262996175d9c1209')
  22.  
  23. prepare() {
  24. tar -xf "${srcdir}/${pkgname}-v${pkgver}-amd64-arch/torguard-v${pkgver}-amd64-arch.tar"
  25. }
  26.  
  27. package() {
  28. mkdir "$pkgdir"/opt/
  29. mkdir "$pkgdir"/opt/torguard/
  30. mkdir "$pkgdir"/opt/torguard/bin/
  31. mkdir "$pkgdir"/opt/torguard/doc/
  32.  
  33. cp "${srcdir}/${pkgname}-v${pkgver}-amd64-arch/opt/torguard/bin/torguard" "${pkgdir}/opt/torguard/bin/"
  34. cp "${srcdir}/${pkgname}-v${pkgver}-amd64-arch/opt/torguard/bin/torguard-wrapper" "${pkgdir}/opt/torguard/bin/"
  35. cp "${srcdir}/${pkgname}-v${pkgver}-amd64-arch/opt/torguard/bin/openconnect" "${pkgdir}/opt/torguard/bin/"
  36. cp "${srcdir}/${pkgname}-v${pkgver}-amd64-arch/opt/torguard/bin/openvpn" "${pkgdir}/opt/torguard/bin/"
  37. cp "${srcdir}/${pkgname}-v${pkgver}-amd64-arch/opt/torguard/bin/vpnc-script" "${pkgdir}/opt/torguard/bin/"
  38. cp -r "${srcdir}/${pkgname}-v${pkgver}-amd64-arch/opt/torguard/doc" "${pkgdir}/opt/torguard" -R
  39. cp -r "${srcdir}/${pkgname}-v${pkgver}-amd64-arch/usr" "${pkgdir}/" -R
  40.  
  41. find "$pkgdir"/opt/torguard/ -type f -exec chmod 644 {} \;
  42. find "$pkgdir"/opt/torguard/ -name torguard -exec chmod 755 {} \;
  43. find "$pkgdir"/opt/torguard/ -name torguard-wrapper -exec chmod 755 {} \;
  44. find "$pkgdir"/opt/torguard/ -name openconnect -exec chmod 755 {} \;
  45. find "$pkgdir"/opt/torguard/ -name openvpn -exec chmod 755 {} \;
  46. find "$pkgdir"/opt/torguard/ -name vpnc-script -exec chmod 755 {} \;
  47.  
  48. install -d "$pkgdir"/usr/bin/
  49. ln -s /opt/torguard/bin/torguard-wrapper "$pkgdir"/usr/bin/torguard
  50. ln -s /usr/bin/ss-local "$pkgdir"/opt/torguard/bin/ss-local
  51. ln -s /usr/bin/stunnel "$pkgdir"/opt/torguard/bin/stunnel
  52. }
  53.  
RAW Paste Data