# Maintainer: Erich Eckner # Contributor: Fredy GarcĂ­a # Contributor: Ivelin Velkov pkgname=teams-for-linux pkgver=1.0.24 pkgrel=30 pkgdesc="Unofficial Microsoft Teams client for Linux using Electron." arch=("aarch64" "armv7h" "i686" "x86_64") url="https://github.com/IsmaelMartinez/${pkgname}" license=("GPL3") _pinned_dependencies=( 'at-spi2-atk=2.38.0' 'at-spi2-core=2.44.1' 'cairo=1.17.6' 'gcc-libs=12.1.0' 'glibc>=2.35' 'libatk-1.0.so=0' 'libcups=1:2.4.1' 'libdbus-1.so=3' 'libdrm=2.4.110' 'libexpat.so=1' 'libgdk_pixbuf-2.0.so=0' 'libgio-2.0.so=0' 'libglib-2.0.so=0' 'libgmodule-2.0.so=0' 'libgobject-2.0.so=0' 'libgtk-3.so=0' 'libpango-1.0.so=0' 'libx11=1.8' 'libxcb=1.15' 'libxcomposite=0.4.5' 'libxdamage=1.1.5' 'libxext=1.3.4' 'libxfixes=6.0.0' 'libxkbcommon.so=0' 'libxrandr=1.5.2' 'mesa=22.1.0' 'nspr=4.33' 'nss=3.78' ) depends=("gtk3" "libxss" "${_pinned_dependencies[@]}") makedepends=('nodejs-lts-fermium' "node-gyp" "python2" "yarn") source=( "${pkgname}-${pkgver}.tar.gz::https://github.com/IsmaelMartinez/${pkgname}/archive/v${pkgver}.tar.gz" "${pkgname}.desktop" ) sha512sums=('c501256f411414f8c32e96f267eceafbb7b671f594f4509fddf9d321d0f59a0052477d53d8399955158ed7d7dd28499e04e3034147b0acccb0573b2d54e2b413' '3e80d0aaefe42644265bd379f2279912c9358b2ce5c5efcd9aa7c4c67a07841da77c0fabac87eb7837f3cd7f0e620ce322c8791ff61bd3729c343108bd5d5d61') build() { cd "${srcdir}/${pkgname}-${pkgver}" yarn install --non-interactive --pure-lockfile --cache-folder "${srcdir}/yarn-cache" if [[ ${CARCH} == "aarch64" ]]; then yarn electron-builder build --arm64 --linux dir elif [[ ${CARCH} == "armv7h" ]]; then yarn electron-builder build --armv7l --linux dir elif [[ ${CARCH} == "i686" ]]; then yarn electron-builder build --ia32 --linux dir elif [[ ${CARCH} == "x86_64" ]]; then yarn electron-builder build --x64 --linux dir fi } package() { cd "${srcdir}/${pkgname}-${pkgver}" install -dm755 "${pkgdir}/opt" "${pkgdir}/usr/bin" if [[ ${CARCH} == "aarch64" ]]; then _unpacked_dirname="linux-arm64-unpacked" elif [[ ${CARCH} == "armv7h" ]]; then _unpacked_dirname="linux-armv7l-unpacked" elif [[ ${CARCH} == "i686" ]]; then _unpacked_dirname="linux-ia32-unpacked" elif [[ ${CARCH} == "x86_64" ]]; then _unpacked_dirname="linux-unpacked" fi cp -r --preserve=mode "${srcdir}/${pkgname}-${pkgver}/dist/${_unpacked_dirname}" "${pkgdir}/opt/${pkgname}" install -Dm644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop" for _file in "${srcdir}/${pkgname}-${pkgver}/build/icons/"*.png do _filename="$(basename ${_file})" install -Dm644 "${_file}" "${pkgdir}/usr/share/icons/hicolor/${_filename%.png}/apps/${pkgname}.png" done ln -sf "/opt/${pkgname}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}" }