Advertisement
Guest User

Untitled

a guest
Aug 7th, 2021
330
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.08 KB | None | 0 0
  1. # Maintainer: Alex Taber <aft dot pokemon at gmail dot com>
  2.  
  3. pkgname=teamviewer
  4. pkgver=15.20.6
  5. pkgrel=1
  6. pkgdesc='All-In-One Software for Remote Support and Online Meetings'
  7. arch=('i686' 'x86_64' 'armv7h')
  8. url='http://www.teamviewer.com'
  9. license=('custom')
  10. options=('!strip')
  11. provides=('teamviewer')
  12. conflicts=('teamviewer-beta')
  13. # /opt/teamviewer/tv_bin/script/teamviewer_setup checklibs can check deps for each TV component:
  14. # TV_DMN, TV_DESK, TV_GUI
  15. depends=(
  16.     'hicolor-icon-theme'
  17.     'qt5-webkit'
  18.     'qt5-x11extras'
  19.     'qt5-quickcontrols' # Doesn't appear in namcap, won't display UI without it.
  20. )
  21. #depends_x86_64=(
  22. # libdepends:
  23. #   'lib32-libxtst'
  24. #   'lib32-libxinerama'
  25. #   'lib32-libxrandr'
  26. #   'lib32-libxdamage'
  27. #   'lib32-fontconfig'
  28. #   'lib32-libsm')
  29. #depends_i686=()
  30. #depends_armv7h=()
  31. install=teamviewer.install
  32. source_x86_64=("https://dl.teamviewer.com/download/linux/version_${pkgver%%.*}x/teamviewer_${pkgver}_amd64.deb")
  33. source_i686=("https://dl.teamviewer.com/download/linux/version_${pkgver%%.*}x/teamviewer_${pkgver}_i386.deb")
  34. source_armv7h=("https://dl.teamviewer.com/download/linux/version_${pkgver%%.*}x/teamviewer-host_${pkgver}_armhf.deb")
  35. #source_armv7h=("https://dl.teamviewer.com/download/linux/version_${pkgver%%.*}x/teamviewer-host_13.2.13582_armhf.deb")
  36. sha256sums_i686=('00ea57a7df195e996610467dc78df0c38b83b9d44ef837a49557bb547e799862')
  37. sha256sums_x86_64=('3bf8b9368e748e8d412e8286a6570e567f7ae8cbed5d650d0b63adff1aa22b59')
  38. sha256sums_armv7h=('3cde3954a5e800313565717e603e440c729c71f228a53c9721d8260098ac4510')
  39.  
  40. prepare() {
  41.     warning "If the install fails, you need to uninstall previous major version of Teamviewer"
  42.     [ -d data ] && rm -rf data
  43.     mkdir data
  44.     cd data
  45.     for datatar in ../data.tar.*; do
  46.         msg2 "Unpacking $datatar"
  47.         tar -xf $datatar
  48.     done
  49.     sed -i '/function CheckQtQuickControls()/{N;a ls /usr/lib/qt/qml/QtQuick/Controls/qmldir &>/dev/null && return # ArchLinux
  50. }' ./opt/teamviewer/tv_bin/script/teamviewer_setup || msg2 "Patching CheckQtQuickControls failed! Contact maintainer"
  51.     msg2 "Running teamviewer_setup checklibs"
  52.     ./opt/teamviewer/tv_bin/script/teamviewer_setup checklibs \
  53.     || msg2 "teamviewer_setup checklibs failed, contact maintainer with /tmp/teamviewerTARLibCheck/DependencyCheck.log" # Currently it always exits 0
  54. }
  55.  
  56. package() {
  57.     # Install
  58.     warning "If the install fails, you need to uninstall previous major version of Teamviewer"
  59.     cp -dr --no-preserve=ownership ./data/{etc,opt,usr,var} "${pkgdir}"/
  60.  
  61.     # Additional files
  62.     rm "${pkgdir}"/opt/teamviewer/tv_bin/xdg-utils/xdg-email
  63.     rm -rf "${pkgdir}"/etc/apt
  64.     install -D -m0644 "${pkgdir}"/opt/teamviewer/tv_bin/script/teamviewerd.service \
  65.         "${pkgdir}"/usr/lib/systemd/system/teamviewerd.service
  66.     install -d -m0755 "${pkgdir}"/usr/{share/applications,share/licenses/teamviewer}
  67.     ln -s /opt/teamviewer/License.txt \
  68.         "${pkgdir}"/usr/share/licenses/teamviewer/LICENSE
  69.     if [ "$CARCH" = "x86_64" ] && [ -f "${pkgdir}/opt/teamviewer/tv_bin/script/libdepend" ]; then
  70.         msg2 "Removing libdepend to ditch lib32 dependencies"
  71.         rm "${pkgdir}/opt/teamviewer/tv_bin/script/libdepend"
  72.     fi
  73. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement