Commit 26a6ddc5 authored by Vitaly Lipatov's avatar Vitaly Lipatov

add alternatives xbrowser/x-www-browser and webclient provides for all browsers

parent de591d72
......@@ -4,10 +4,21 @@ BUILDROOT="$1"
SPEC="$2"
PRODUCT=chromium-gost
PRODUCTDIR=/opt/$PRODUCT
# can be in the repo
subst '1iConflicts:chromium-gost' $SPEC
# needed alternatives
subst '1iProvides:webclient' $SPEC
subst "s|%files|%files\n/etc/alternatives/packages.d/$PRODUCT|" $SPEC
mkdir -p $BUILDROOT/etc/alternatives/packages.d/
cat <<EOF >$BUILDROOT/etc/alternatives/packages.d/$PRODUCT
/usr/bin/xbrowser /usr/bin/$PRODUCT 62
/usr/bin/x-www-browser /usr/bin/$PRODUCT 62
EOF
subst 's|%files|%files\n/usr/share/icons/hicolor/*x*/apps/*.png|' $SPEC
# Make relative symlink
......
......@@ -4,13 +4,27 @@ BUILDROOT="$1"
SPEC="$2"
PRODUCT=google-chrome
PRODUCTDIR=/opt/google/chrome
subst '1iProvides:webclient' $SPEC
subst "s|%files|%files\n/etc/alternatives/packages.d/$PRODUCT|" $SPEC
mkdir -p $BUILDROOT/etc/alternatives/packages.d/
cat <<EOF >$BUILDROOT/etc/alternatives/packages.d/$PRODUCT
/usr/bin/xbrowser /usr/bin/$PRODUCT 65
/usr/bin/x-www-browser /usr/bin/$PRODUCT 65
EOF
subst 's|%files|%files\n/usr/share/icons/hicolor/*x*/apps/*.png|' $SPEC
# Make relative symlink
rm -f $BUILDROOT/usr/bin/google-chrome-stable
ln -s ../../opt/google/chrome/google-chrome $BUILDROOT/usr/bin/google-chrome-stable
ln -s google-chrome-stable $BUILDROOT/usr/bin/google-chrome
# short command for run
ln -s google-chrome-stable $BUILDROOT/usr/bin/$PRODUCT
subst 's|%files|%files\n/usr/bin/$PRODUCT|' $SPEC
for i in 16 24 32 48 64 128 256 ; do
mkdir -p $BUILDROOT/usr/share/icons/hicolor/${i}x${i}/apps/
......
......@@ -5,8 +5,19 @@ SPEC="$2"
PRODUCT=microsoft-edge-dev
PRODUCTDIR=/opt/microsoft/msedge-dev
subst 's|%files|%files\n/usr/share/icons/hicolor/*x*/apps/*.png|' $SPEC
# needed alternatives
subst '1iProvides:webclient' $SPEC
subst "s|%files|%files\n/etc/alternatives/packages.d/$PRODUCT|" $SPEC
mkdir -p $BUILDROOT/etc/alternatives/packages.d/
cat <<EOF >$BUILDROOT/etc/alternatives/packages.d/$PRODUCT
/usr/bin/xbrowser /usr/bin/$PRODUCT 80
/usr/bin/x-www-browser /usr/bin/$PRODUCT 80
EOF
for i in 16 22 24 32 48 64 128 256 ; do
mkdir -p $BUILDROOT/usr/share/icons/hicolor/${i}x${i}/apps/
cp $BUILDROOT/$PRODUCTDIR/product_logo_${i}_dev.png $BUILDROOT/usr/share/icons/hicolor/${i}x${i}/apps/$PRODUCT.png
......
......@@ -4,12 +4,24 @@ BUILDROOT="$1"
SPEC="$2"
PRODUCT=sputnik-browser
PRODUCTDIR=/opt/$PRODUCT
# needed alternatives
subst '1iProvides:webclient' $SPEC
subst "s|%files|%files\n/etc/alternatives/packages.d/$PRODUCT|" $SPEC
mkdir -p $BUILDROOT/etc/alternatives/packages.d/
cat <<EOF >$BUILDROOT/etc/alternatives/packages.d/$PRODUCT
/usr/bin/xbrowser /usr/bin/$PRODUCT 55
/usr/bin/x-www-browser /usr/bin/$PRODUCT 55
EOF
subst 's|%files|%files\n/usr/share/icons/hicolor/*x*/apps/*.png|' $SPEC
# Make relative symlink
mkdir -p $BUILDROOT/usr/bin
ln -s ../../opt/$PRODUCT/$PRODUCT $BUILDROOT/usr/bin/$PRODUCT-stable
ln -s $PRODUCT-stable $BUILDROOT/usr/bin/$PRODUCT
subst "s|%files|%files\n/usr/bin/$PRODUCT|" $SPEC
......@@ -18,3 +30,16 @@ for i in 16 24 32 48 64 128 256 ; do
cp $BUILDROOT/opt/$PRODUCT/product_logo_$i.png $BUILDROOT/usr/share/icons/hicolor/${i}x${i}/apps/$PRODUCT.png
done
# replace embedded xdg tools
for EMBDIR in $PRODUCTDIR/{xdg-mime,xdg-settings} ; do
[ -s $BUILDROOT$EMBDIR ] || continue
rm -v $BUILDROOT$EMBDIR
ln -s /usr/bin/$(basename $EMBDIR) $BUILDROOT$EMBDIR
done
# fix permission
chmod o-w -v $BUILDROOT$PRODUCTDIR/*
# install all requires packages before packing (the list have got with rpmreqs package | xargs echo)
epm install --skip-installed at-spi2-atk file gawk GConf glib2 grep libatk libat-spi2-core libcairo libcups libdbus libdrm libexpat libgbm libgdk-pixbuf libgio libgtk+3 libnspr libnss libpango \
libX11 libxcb libXcomposite libXcursor libXdamage libXext libXfixes libXi libXrandr libXrender libXtst sed tar which xdg-utils xprop
......@@ -5,6 +5,17 @@ SPEC="$2"
PRODUCT=vivaldi
PRODUCTDIR=/opt/vivaldi
# needed alternatives
subst '1iProvides:webclient' $SPEC
subst "s|%files|%files\n/etc/alternatives/packages.d/$PRODUCT|" $SPEC
mkdir -p $BUILDROOT/etc/alternatives/packages.d/
cat <<EOF >$BUILDROOT/etc/alternatives/packages.d/$PRODUCT
/usr/bin/xbrowser /usr/bin/$PRODUCT 83
/usr/bin/x-www-browser /usr/bin/$PRODUCT 83
EOF
subst 's|%files|%files\n/usr/share/icons/hicolor/*x*/apps/*.png|' $SPEC
for i in 16 22 24 32 48 64 128 256 ; do
......
......@@ -6,6 +6,17 @@ SPEC="$2"
PRODUCT=yandex-browser-beta
PRODUCTDIR=/opt/yandex/browser-beta
# needed alternatives
subst '1iProvides:webclient' $SPEC
subst "s|%files|%files\n/etc/alternatives/packages.d/$PRODUCT|" $SPEC
mkdir -p $BUILDROOT/etc/alternatives/packages.d/
cat <<EOF >$BUILDROOT/etc/alternatives/packages.d/$PRODUCT
/usr/bin/xbrowser /usr/bin/$PRODUCT 55
/usr/bin/x-www-browser /usr/bin/$PRODUCT 55
EOF
subst 's|%files|%files\n/usr/share/icons/hicolor/*x*/apps/*.png|' $SPEC
for i in 16 22 24 32 48 64 128 256 ; do
......
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