teams.sh 1.15 KB
Newer Older
1 2
#!/bin/sh

3
PKGNAME=teams
4
SUPPORTEDARCHES="x86_64"
5
VERSION="$2"
6 7
# After April 12, 2023, Microsoft Teams Free (classic), the legacy free Teams app for business, will no longer be available.
# https://www.microsoft.com/en-us/microsoft-teams/free-classic-retirement?rtc=1
8
DESCRIPTION="Microsoft Teams for Linux from the archive.org of the official site"
9

10
. $(dirname $0)/common.sh
11

12
repack=''
13
pkgtype="$(epm print info -p)"
14

15 16 17
# archive.org have only deb packages
#pkgtype=deb

18 19 20
if [ "$pkgtype" = "deb" ] ; then
    URL="https://packages.microsoft.com/repos/ms-teams/pool/main/t/teams"
    arch=amd64
21
    [ "$VERSION" = "*" ] && VERSION="[0-9]*"
22
else
23
    URL="https://packages.microsoft.com/yumrepos/ms-teams"
24 25
    arch=x86_64
    pkgtype=rpm
26
    [ "$VERSION" = "*" ] && VERSION="[0-9]*" || VERSION="$VERSION-1"
27 28
fi

29
if [ "$(epm print info -s)" = "alt" ] ; then
30 31
    repack="--repack"
fi
32 33

# rpm and deb contains the same binaries
34
# $ diff -ru teams-1.5.00.23861-1.x86_64 teams_1.5.00.23861_amd64
35 36
ARCHIVEORG=https://web.archive.org/web/20221130114832if_

37 38

# epm uses eget to download * names
39
epm install $repack "$ARCHIVEORG/$URL/$(epm print constructname teams "$VERSION" $arch $pkgtype)"