Commit 16237ae8 authored by Vitaly Lipatov's avatar Vitaly Lipatov

pack yandex-browser-stable (ALT bug 42238)

parent ba4a316f
#!/bin/sh
# TODO: common place
fatal()
{
echo "FATAL: $*" >&2
exit 1
}
PKGNAME=yandex-browser-beta
PKGNAME=yandex-browser-stable
PRODUCTDIR=/opt/yandex/browser
DESCRIPTION="Yandex browser from the official site"
if [ "$1" = "--remove" ] ; then
epm remove $PKGNAME
epm remove $PKGNAME-codecs-ffmpeg-extra
exit
fi
[ "$1" != "--run" ] && echo "Yandex browser from the official site" && exit
. $(dirname $0)/common.sh
[ "$($DISTRVENDOR -a)" != "x86_64" ] && echo "Only x86_64 is supported" && exit 1
# See also https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=yandex-browser-beta
# epm uses eget to download * names
epm install "https://repo.yandex.ru/yandex-browser/deb/pool/main/y/yandex-browser-beta/$(epm print constructname $PKGNAME "*" amd64 deb)"
epm install "https://repo.yandex.ru/yandex-browser/deb/pool/main/y/$PKGNAME/$(epm print constructname $PKGNAME "*" amd64 deb)" || exit
# used in update-ffmpeg
epm install jq tar binutils
epm install jq tar binutils || exit
# install appropriate ffmpeg extra codecs
pack_ffmpeg() {
SOURCE="usr/lib/chromium-browser/libffmpeg.so"
DEST="/opt/yandex/browser-beta"
DEST="$PRODUCTDIR"
mkdir -p .$DEST
cp $SOURCE .$DEST
CNAME=$(echo "$(basename $SUITABLE_URLS)" | sed -e "s|chromium|$PKGNAME|" -e "s|-0ubuntu.*|-1.tar|")
......@@ -37,15 +33,9 @@ pack_ffmpeg() {
epm --repack install $CNAME
}
[ -s /opt/yandex/browser-beta/update-ffmpeg ] || fatal "/opt/yandex/browser-beta/update-ffmpeg is missed"
# download ffmpeg with upstream script but with our pack_ffmpeg function
[ -s $PRODUCTDIR/update-ffmpeg ] || fatal "$PRODUCTDIR/update-ffmpeg is missed"
SC=$(mktemp)
sed -e 's|install_ffmpeg &&|pack_ffmpeg &&|' < /opt/yandex/browser-beta/update-ffmpeg > $SC
sed -e 's|install_ffmpeg &&|pack_ffmpeg &&|' < $PRODUCTDIR/update-ffmpeg > $SC
. $SC
rm -f $SC
#echo
#echo '
#You can run
# # /opt/yandex/browser-beta/update-ffmpeg
#to download and install libffmpeg.so with proprietary codecs from chromium-codecs-ffmpeg-extra package
#'
......@@ -8,6 +8,7 @@ PRODUCT=yandex-browser
PRODUCTCUR=yandex-browser-beta
PRODUCTDIR=/opt/yandex/browser-beta
subst '1iConflicts:yandex-browser-stable' $SPEC
. $(dirname $0)/common-chromium-browser.sh
......
#!/bin/sh -x
# It will be run with two args: buildroot spec
BUILDROOT="$1"
SPEC="$2"
PRODUCT=yandex-browser
PRODUCTCUR=yandex-browser-stable
PRODUCTDIR=/opt/yandex/browser
subst '1iConflicts:yandex-browser-beta' $SPEC
. $(dirname $0)/common-chromium-browser.sh
set_alt_alternatives 65
copy_icons_to_share
cleanup
add_bin_commands
use_system_xdg
install_deps
#if ! grep -q '^"/usr/bin/yandex-browser"' $SPEC ; then
# subst 's|\(.*/usr/bin/yandex-browser.*\)|"/usr/bin/yandex-browser"\n\1|' $SPEC
#fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment