# Maintainer: SimPilotAdamT # Contributor: Chris Severance aur.severach aATt spamgourmet dott com # Contributor: Alex Taber # Contributor: Louis Tim Larsen # Contributor: Ignacio # Contributor: Gun Onen # Contributor: Christian Hesse # Contributor: Yakir Sitbon # Contributor: Alucryd # Contributor: Stas S # Contributor: Hilinus # TODO: Complete tar install # TODO: There are missing packages on a fresh Manjaro install' _opt_Type='D' # D=Debian, R=RPM, T=tar set -u pkgname=teamviewer pkgname+='-beta' pkgver=15.31.3 pkgrel=1 pkgdesc='All-In-One Software for Remote Support and Online Meetings' arch=('i686' 'x86_64' 'armv7h') url='https://www.teamviewer.com/en-us/download/linux/' license=('custom') options=('!strip') provides=("teamviewer=${pkgver%%.*}") conflicts=('teamviewer') depends=( 'qt5-base' 'qt5-declarative' 'hicolor-icon-theme' 'qt5-webkit' 'qt5-x11extras' 'qt5-quickcontrols' # Doesn't appear in namcap, won't display UI without it. ) optdepends=( 'teamviewer-openrc: OpenRC scripts' ) install=teamviewer.install _dl='https://dl.tvcdn.de' source_x86_64=("${_dl}/download/linux/version_${pkgver%%.*}x/teamviewer_${pkgver}_amd64.deb") source_i686=("${_dl}/download/linux/version_${pkgver%%.*}x/teamviewer_${pkgver}_i386.deb") source_armv7h=("${_dl}/download/linux/version_${pkgver%%.*}x/teamviewer-host_${pkgver}_armhf.deb") sha256sums_i686=('5f04adb969857e96af19195494cf219c128d0b7ffdcc77f851b5397eeb244ca4') sha256sums_x86_64=('bbb2125d8b40a779d599de0a7ce06533206a450d1e56b6628a4eb6dd08b1337d') sha256sums_armv7h=('4437d674b492dc388bdad33f3a232003b9e64636efb1899dabccc801f66e3e00') sha512sums_i686=('276a91c1a299986dbcc5813c09e041f5e1897dcc1d00692484573e25c822005918b8113756aa3ba68944cb4cd36a3d401779d6a15f1dacc2c56b60d6d155c3f8') sha512sums_x86_64=('1a1777257a3207865cee1fcd843c91ebb017b5e818f8762997ed2fb848d169898017c2ca36e50d438f29b4a3b071787a9cd3a6141cdad88ce3adea85ef94e99a') sha512sums_armv7h=('9743296c0617aeec20e00417c3b96a3e467ad4a8c3cd3a42729f455244ec964657d3fbd689e5a207440cbcf734c08464ee7c030bb1d15d4bb593826a5a137751') case "${_opt_Type}" in 'R') source_x86_64=("${source_x86_64[@]//_amd64.deb/.x86_64.rpm}") source_i686=("${source_i686[@]//_i386.deb/.i686.rpm}") source_armv7h=("${source_armv7h[@]//_armhf.deb/.armv7hl.rpm}") ;; 'T') source_x86_64=("${source_x86_64[@]//_amd64.deb/_amd64.tar.xz}") source_i686=("${source_i686[@]//_i386.deb/_i386.tar.xz}") source_armv7h=("${source_armv7h[@]//_armhf.deb/_armhf.tar.xz}") ;; esac prepare() { warning "If the install fails, you need to uninstall previous major version of Teamviewer" local datatar shopt -s nullglob for datatar in data.tar.*; do msg2 "Unpacking $datatar" tar -xf $datatar done shopt -u nullglob sed -i '/function CheckQtQuickControls()/{N;a ls /usr/lib/qt/qml/QtQuick/Controls/qmldir &>/dev/null && return # ArchLinux }' ./opt/teamviewer/tv_bin/script/teamviewer_setup || msg2 "Patching CheckQtQuickControls failed! Contact maintainer" sed -e 's:/var/run/:/run/:g' -i 'opt/teamviewer/tv_bin/script/teamviewerd.service' } check() { msg2 "Running teamviewer_setup checklibs" if ! ./opt/teamviewer/tv_bin/script/teamviewer_setup checklibs; then msg2 "teamviewer_setup checklibs failed, contact maintainer with /tmp/teamviewerTARLibCheck/DependencyCheck.log" # Currently it always exits 0 false fi } package() { # Install warning "If the install fails, you need to uninstall previous major version of Teamviewer" cp -dr --no-preserve=ownership {etc,opt,usr,var} "${pkgdir}"/ # Additional files rm "${pkgdir}"/opt/teamviewer/tv_bin/xdg-utils/xdg-email rm -rf "${pkgdir}"/etc/apt rm -rf "${pkgdir}"/etc/yum.repos.d #touch "${pkgdir}/etc/teamviewer/global.conf" # enable later and remove from .install 8/15/2019 install -d "${pkgdir}/var/log/teamviewer${pkgver%%.*}" install -D -m0644 "${pkgdir}"/opt/teamviewer/tv_bin/script/teamviewerd.service \ "${pkgdir}"/usr/lib/systemd/system/teamviewerd.service sed -e 's: NetworkManager-wait-online.service::g' -i "${pkgdir}"/usr/lib/systemd/system/teamviewerd.service install -d -m0755 "${pkgdir}"/usr/{share/applications,share/licenses/teamviewer} ln -s /opt/teamviewer/doc/License.txt \ "${pkgdir}"/usr/share/licenses/teamviewer/LICENSE if [ "$CARCH" = "x86_64" ] && [ -f "${pkgdir}/opt/teamviewer/tv_bin/script/libdepend" ]; then msg2 "Removing libdepend to ditch lib32 dependencies" rm "${pkgdir}/opt/teamviewer/tv_bin/script/libdepend" fi } set +u