yandex-browser.sh 1.26 KB
Newer Older
1 2
#!/bin/sh

3 4
BASEPKGNAME=yandex-browser
SUPPORTEDARCHES="x86_64"
5
PRODUCTALT="stable beta corporate"
6
VERSION="$2"
7
DESCRIPTION="Yandex browser from the official site"
8
TIPS="Run 'epm play yandex-browser=beta' to install beta version of the browser."
9

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

# See also https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=yandex-browser-beta

14
URL="https://repo.yandex.ru/yandex-browser"
15

16 17 18 19
repack=''
[ "$(epm print info -s)" = "alt" ] && repack='--repack'

if [ "$(epm print info -p)" = "rpm" ] ; then
20
    # https://repo.yandex.ru/yandex-browser/rpm/stable/x86_64/yandex-browser-stable-23.1.1.1114-1.x86_64.rpm
21 22
    [ "$BRANCH" = "corporate" ] && BRANCH="stable"
    epm install --repack "$URL/rpm/$BRANCH/x86_64/$(epm print constructname $PKGNAME "$VERSION*" x86_64 rpm)" || exit
23 24 25
else
    # https://repo.yandex.ru/yandex-browser/deb/pool/main/y/yandex-browser-beta/yandex-browser-beta_23.5.4.682-1_amd64.deb
    epm install "$URL/deb/pool/main/y/$PKGNAME/$(epm print constructname $PKGNAME "$VERSION*" amd64 deb)" || exit
26
fi
27

28 29 30 31 32 33
# TODO: use needed version
if [ "$(epm print info -s)" = "alt" ] ; then
    epm install ffmpeg-plugin-browser
    exit
fi

34 35
UPDATEFFMPEG=$(epm ql $PKGNAME | grep update-ffmpeg) || fatal
epm pack --install $PKGNAME-codecs-ffmpeg-extra $UPDATEFFMPEG