Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
eepm
Commits
c31393d5
Commit
c31393d5
authored
Mar 20, 2022
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm play: move all chrome based browser code to the common file
parent
aea2f772
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
194 additions
and
201 deletions
+194
-201
brave-browser-nightly.sh
repack.d/brave-browser-nightly.sh
+7
-39
chromium-gost-stable.sh
repack.d/chromium-gost-stable.sh
+14
-26
common-chromium-browser.sh
repack.d/common-chromium-browser.sh
+114
-0
google-chrome-stable.sh
repack.d/google-chrome-stable.sh
+8
-33
microsoft-edge-dev.sh
repack.d/microsoft-edge-dev.sh
+14
-23
sputnik-browser-stable.sh
repack.d/sputnik-browser-stable.sh
+9
-28
vivaldi-stable.sh
repack.d/vivaldi-stable.sh
+16
-19
yandex-browser-beta.sh
repack.d/yandex-browser-beta.sh
+12
-33
No files found.
repack.d/brave-browser-nightly.sh
View file @
c31393d5
...
...
@@ -7,50 +7,18 @@ PRODUCT=brave-browser
PRODUCTCUR
=
brave-browser-nightly
PRODUCTDIR
=
/opt/brave.com/brave-nightly
# 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
.
$(
dirname
$0
)
/common-chromium-browser.sh
set_alt_alternatives 80
# short command for run
ln
-s
$PRODUCTCUR
$BUILDROOT
/usr/bin/
$PRODUCT
#subst "s|%files|%files\n/usr/bin/$PRODUCT|" $SPEC
copy_icons_to_share
# fix main link
rm
-v
$BUILDROOT
/usr/bin/
$PRODUCTCUR
ln
-s
$PRODUCTDIR
/
$PRODUCTCUR
$BUILDROOT
/usr/bin/
$PRODUCTCUR
cleanup
rm
-v
$BUILDROOT$PRODUCTDIR
/
$PRODUCT
ln
-s
$PRODUCTCUR
$BUILDROOT$PRODUCTDIR
/
$PRODUCT
add_bin_commands
use_system_xdg
for
i
in
16 24 32 48 64 128 256
;
do
[
-r
$BUILDROOT
/
$PRODUCTDIR
/product_logo_
${
i
}
_nightly.png
]
||
continue
mkdir
-p
$BUILDROOT
/usr/share/icons/hicolor/
${
i
}
x
${
i
}
/apps/
cp
$BUILDROOT
/
$PRODUCTDIR
/product_logo_
${
i
}
_nightly.png
$BUILDROOT
/usr/share/icons/hicolor/
${
i
}
x
${
i
}
/apps/
$PRODUCTCUR
.png
done
subst
's|%files|%files\n/usr/share/icons/hicolor/*x*/apps/*.png|'
$SPEC
install_deps
if
[
-r
$BUILDROOT
/etc/cron.daily/
$PRODUCTCUR
]
;
then
rm
-f
$BUILDROOT
/etc/cron.daily/
$PRODUCTCUR
subst
's|.*/etc/cron.daily/.*||'
$SPEC
fi
# 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
# 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
repack.d/chromium-gost-stable.sh
View file @
c31393d5
...
...
@@ -4,46 +4,34 @@ BUILDROOT="$1"
SPEC
=
"
$2
"
PRODUCT
=
chromium-gost
PRODUCTCUR
=
chromium-gost-stable
PRODUCTDIR
=
/opt/
$PRODUCT
# can be in the repo
subst
'1iConflicts:chromium-gost'
$SPEC
# needed alternatives
subst
'1iProvides:webclient'
$SPEC
.
$(
dirname
$0
)
/common-chromium-browser.sh
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
# can be in the repo
subst
'1iConflicts:chromium-gost'
$SPEC
s
ubst
's|%files|%files\n/usr/share/icons/hicolor/*x*/apps/*.png|'
$SPEC
s
et_alt_alternatives 62
# Make relative symlink
rm
-f
$BUILDROOT
/usr/bin/chromium-gost-stable
ln
-s
../../opt/chromium-gost/chromium-gost
$BUILDROOT
/usr/bin/chromium-gost-stable
ln
-s
chromium-gost-stable
$BUILDROOT
/usr/bin/chromium-gost
copy_icons_to_share
for
i
in
16 24 32 48 64 128 256
;
do
mkdir
-p
$BUILDROOT
/usr/share/icons/hicolor/
${
i
}
x
${
i
}
/apps/
cp
$BUILDROOT
/opt/chromium-gost/product_logo_
$i
.png
$BUILDROOT
/usr/share/icons/hicolor/
${
i
}
x
${
i
}
/apps/chromium-gost.png
done
cleanup
rm
-f
$BUILDROOT
/etc/cron.daily/chromium-gost
subst
's|.*/etc/cron.daily/chromium-gost.*||'
$SPEC
add_bin_commands
# unsupported format
rm
-f
$BUILDROOT
/usr/share/menu/
$PRODUCT
.menu
subst
"s|.*/usr/share/menu/
$PRODUCT
.menu.*||"
$SPEC
use_system_xdg
install_deps
subst
's|exec -a "$0" "$HERE/chrome" "$@"||'
$BUILDROOT
/opt/chromium-gost/chromium-gost
cat
<<
EOF
>>
$BUILDROOT
/opt/chromium-gost/chromium-gost
# use standalone config dir
subst
's|exec -a "$0" "$HERE/chrome" "$@"||'
$BUILDROOT
/
$PRODUCTDIR
/
$PRODUCT
cat
<<
EOF
>>
$BUILDROOT
/
$PRODUCTDIR
/
$PRODUCT
if ! [[ "\
$*
" =~ \-user\-data\-dir= ]]; then
exec -a "\
$0
" "\
$HERE
/chrome" "-user-data-dir=\
$HOME
/.config/chromium-gost" "\
$@
"
else
exec -a "\
$0
" "\
$HERE
/chrome" "\
$@
"
fi
EOF
repack.d/common-chromium-browser.sh
0 → 100755
View file @
c31393d5
#!/bin/sh
# common functions for repack chromium based browsers
# used BUILDROOT, SPEC, PRODUCT, PRODUCTCUR and PRODUCTDIR variables
# example
# PRODUCT=mybrowser
# PRODUCTCUR=mybrowser-nightly
# PRODUCTDIR=/opt/my/browser
set_alt_alternatives
()
{
local
priority
=
"
$1
"
# 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
$priority
/usr/bin/x-www-browser /usr/bin/
$PRODUCT
$priority
EOF
}
copy_icons_to_share
()
{
local
iconname
=
$PRODUCT
# try get icon name from desktopfile
local
desktopfile
=
$BUILDROOT
/usr/share/applications/
$PRODUCT
.desktop
[
-r
$desktopfile
]
||
desktopfile
=
$BUILDROOT
/usr/share/applications/
$PRODUCTCUR
.desktop
if
[
-r
$desktopfile
]
;
then
iconname
=
"
$(
cat
$desktopfile
|
grep
"^Icon"
|
head
-n1
|
sed
-e
's|Icon=||'
)
"
fi
for
i
in
16 24 32 48 64 128 256
;
do
[
-r
$BUILDROOT
/
$PRODUCTDIR
/product_logo_
$i
*
.png
]
||
continue
mkdir
-p
$BUILDROOT
/usr/share/icons/hicolor/
${
i
}
x
${
i
}
/apps/
cp
$BUILDROOT
/
$PRODUCTDIR
/product_logo_
$i
*
.png
$BUILDROOT
/usr/share/icons/hicolor/
${
i
}
x
${
i
}
/apps/
$iconname
.png
done
subst
"s|%files|%files
\n
/usr/share/icons/hicolor/*x*/apps/
$iconname
.png|"
$SPEC
}
cleanup
()
{
subst
'1iAutoProv:no'
$SPEC
# remove cron update
if
[
-r
$BUILDROOT
/etc/cron.daily/
$PRODUCTCUR
]
;
then
rm
-f
$BUILDROOT
/etc/cron.daily/
$PRODUCTCUR
subst
's|.*/etc/cron.daily/.*||'
$SPEC
fi
if
[
-r
$BUILDROOT
/etc/cron.daily/
$PRODUCT
]
;
then
rm
-f
$BUILDROOT
/etc/cron.daily/
$PRODUCT
subst
's|.*/etc/cron.daily/.*||'
$SPEC
fi
# remove unsupported file
if
[
-r
$BUILDROOT
/usr/share/menu/
*
.menu
]
;
then
rm
-f
$BUILDROOT
/usr/share/menu/
*
.menu
subst
"s|.*/usr/share/menu/.*.menu.*||"
$SPEC
fi
}
use_system_xdg
()
{
# replace embedded xdg tools
for
i
in
$PRODUCTDIR
/
{
xdg-mime,xdg-settings
}
;
do
[
-s
$BUILDROOT$i
]
||
continue
rm
-v
$BUILDROOT$i
ln
-s
/usr/bin/
$(
basename
$i
)
$BUILDROOT$i
done
}
install_deps
()
{
# 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
}
add_bin_commands
()
{
if
[
-L
$BUILDROOT
/usr/bin/
$PRODUCTCUR
]
;
then
rm
-fv
$BUILDROOT
/usr/bin/
$PRODUCTCUR
else
subst
"s|%files|%files
\n
/usr/bin/
$PRODUCTCUR
|"
$SPEC
fi
if
[
-r
$BUILDROOT$PRODUCTDIR
/
$PRODUCTCUR
]
;
then
ln
-rs
$BUILDROOT$PRODUCTDIR
/
$PRODUCTCUR
$BUILDROOT
/usr/bin/
$PRODUCTCUR
else
ln
-rs
$BUILDROOT$PRODUCTDIR
/
$PRODUCT
$BUILDROOT
/usr/bin/
$PRODUCTCUR
fi
# fix links
if
[
!
-r
$BUILDROOT
$(
readlink
$BUILDROOT$PRODUCTDIR
/
$PRODUCT
)
]
;
then
rm
-fv
$BUILDROOT$PRODUCTDIR
/
$PRODUCT
ln
-s
$PRODUCTCUR
$BUILDROOT$PRODUCTDIR
/
$PRODUCT
fi
# short command for run
if
[
!
-r
$BUILDROOT
/usr/bin/
$PRODUCT
]
;
then
ln
-s
$PRODUCTCUR
$BUILDROOT
/usr/bin/
$PRODUCT
subst
"s|%files|%files
\n
/usr/bin/
$PRODUCT
|"
$SPEC
fi
}
repack.d/google-chrome-stable.sh
View file @
c31393d5
...
...
@@ -4,46 +4,21 @@ BUILDROOT="$1"
SPEC
=
"
$2
"
PRODUCT
=
google-chrome
PRODUCTCUR
=
google-chrome-stable
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
.
$(
dirname
$0
)
/common-chromium-browser.sh
set_alt_alternatives 65
subst
's|%files|%files\n/usr/share/icons/hicolor/*x*/apps/*.png|'
$SPEC
copy_icons_to_share
# Make relative symlink
rm
-f
$BUILDROOT
/usr/bin/google-chrome-stable
ln
-s
../../opt/google/chrome/google-chrome
$BUILDROOT
/usr/bin/google-chrome-stable
cleanup
# short command for run
ln
-s
google-chrome-stable
$BUILDROOT
/usr/bin/
$PRODUCT
subst
's|%files|%files\n/usr/bin/$PRODUCT|'
$SPEC
add_bin_commands
for
i
in
16 24 32 48 64 128 256
;
do
mkdir
-p
$BUILDROOT
/usr/share/icons/hicolor/
${
i
}
x
${
i
}
/apps/
cp
$BUILDROOT
/opt/google/chrome/product_logo_
$i
.png
$BUILDROOT
/usr/share/icons/hicolor/
${
i
}
x
${
i
}
/apps/google-chrome.png
done
use_system_xdg
rm
-f
$BUILDROOT
/etc/cron.daily/google-chrome
subst
's|.*/etc/cron.daily/google-chrome.*||'
$SPEC
install_deps
# unsupported format
rm
-f
$BUILDROOT
/usr/share/menu/
$PRODUCT
.menu
subst
"s|.*/usr/share/menu/
$PRODUCT
.menu.*||"
$SPEC
# google-chrome by default?
#subst 's|exec -a "$0" "$HERE/chrome" "$@"||' $BUILDROOT/opt/google/chrome/google-chrome
#cat <<EOF >>$BUILDROOT/opt/google/chrome/google-chrome
#if ! [[ "\$*" =~ \-user\-data\-dir= ]]; then
# exec -a "\$0" "\$HERE/chrome" "-user-data-dir=\$HOME/.config/google-chrome" "\$@"
#else
# exec -a "\$0" "\$HERE/chrome" "\$@"
#fi
#EOF
repack.d/microsoft-edge-dev.sh
View file @
c31393d5
...
...
@@ -3,41 +3,32 @@
BUILDROOT
=
"
$1
"
SPEC
=
"
$2
"
PRODUCT
=
microsoft-edge-dev
PRODUCT
=
microsoft-edge
PRODUCTCUR
=
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
.
$(
dirname
$0
)
/common-chromium-browser.sh
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
set_alt_alternatives 65
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
done
copy_icons_to_share
cleanup
rm
-f
$BUILDROOT
/etc/cron.daily/
$PRODUCT
subst
"s|.*/etc/cron.daily/
$PRODUCT
.*||"
$SPEC
add_bin_commands
# unsupported format
rm
-f
$BUILDROOT
/usr/share/menu/microsoft-edge-dev.menu
subst
"s|.*/usr/share/menu/microsoft-edge-dev.menu.*||"
$SPEC
use_system_xdg
[
-e
$BUILDROOT
/usr/bin/microsoft-edge
]
||
ln
-s
$PRODUCT
$BUILDROOT
/usr/bin/microsoft-edge
install_deps
if
!
grep
-q
'^"/usr/bin/microsoft-edge"'
$SPEC
;
then
subst
's|\(.*/usr/bin/microsoft-edge-dev.*\)|"/usr/bin/microsoft-edge"\n\1|'
$SPEC
fi
#
if ! grep -q '^"/usr/bin/microsoft-edge"' $SPEC ; then
#
subst 's|\(.*/usr/bin/microsoft-edge-dev.*\)|"/usr/bin/microsoft-edge"\n\1|' $SPEC
#
fi
# fix wrong interpreter
epm assure patchelf
||
exit
for
i
in
$BUILDROOT
/opt/microsoft/msedge-dev/libmip_
*
.so
;
do
[
"
$(
a
=
patchelf
--print-interpreter
$i
)
"
=
"/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2"
]
&&
a
=
patchelf
--set-interpreter
/lib64/ld-linux-x86-64.so.2
$i
done
repack.d/sputnik-browser-stable.sh
View file @
c31393d5
...
...
@@ -4,42 +4,23 @@ BUILDROOT="$1"
SPEC
=
"
$2
"
PRODUCT
=
sputnik-browser
PRODUCT
=
sputnik-browser-stable
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
.
$(
dirname
$0
)
/common-chromium-browser.sh
s
ubst
's|%files|%files\n/usr/share/icons/hicolor/*x*/apps/*.png|'
$SPEC
s
et_alt_alternatives 65
# Make relative symlink
mkdir
-p
$BUILDROOT
/usr/bin
ln
-s
../../opt/
$PRODUCT
/
$PRODUCT
$BUILDROOT
/usr/bin/
$PRODUCT
-stable
copy_icons_to_share
ln
-s
$PRODUCT
-stable
$BUILDROOT
/usr/bin/
$PRODUCT
subst
"s|%files|%files
\n
/usr/bin/
$PRODUCT
|"
$SPEC
cleanup
for
i
in
16 24 32 48 64 128 256
;
do
mkdir
-p
$BUILDROOT
/usr/share/icons/hicolor/
${
i
}
x
${
i
}
/apps/
cp
$BUILDROOT
/opt/
$PRODUCT
/product_logo_
$i
.png
$BUILDROOT
/usr/share/icons/hicolor/
${
i
}
x
${
i
}
/apps/
$PRODUCT
.png
done
add_bin_commands
# 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
use_system_xdg
install_deps
# 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
repack.d/vivaldi-stable.sh
View file @
c31393d5
...
...
@@ -4,32 +4,29 @@ BUILDROOT="$1"
SPEC
=
"
$2
"
PRODUCT
=
vivaldi
PRODUCTCUR
=
vivaldi-stable
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
.
$(
dirname
$0
)
/common-chromium-browser.sh
s
ubst
's|%files|%files\n/usr/share/icons/hicolor/*x*/apps/*.png|'
$SPEC
s
et_alt_alternatives 65
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
}
.png
$BUILDROOT
/usr/share/icons/hicolor/
${
i
}
x
${
i
}
/apps/
$PRODUCT
.png
done
copy_icons_to_share
rm
-f
$BUILDROOT
/etc/cron.daily/
$PRODUCT
subst
"s|.*/etc/cron.daily/
$PRODUCT
.*||"
$SPEC
cleanup
subst
"1i%filter_from_requires /.opt.google.chrome.WidevineCdm/d"
$SPEC
add_bin_commands
use_system_xdg
#install_deps
# unsupported format
rm
-f
$BUILDROOT
/usr/share/menu/
$PRODUCT
.menu
subst
"s|.*/usr/share/menu/
$PRODUCT
.menu.*||"
$SPEC
# 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
subst
"1i%filter_from_requires /.opt.google.chrome.WidevineCdm/d"
$SPEC
echo
"You also can install chrome via epm play chrome to use WidevineCdm"
repack.d/yandex-browser-beta.sh
View file @
c31393d5
...
...
@@ -4,47 +4,26 @@
BUILDROOT
=
"
$1
"
SPEC
=
"
$2
"
PRODUCT
=
yandex-browser-beta
PRODUCT
=
yandex-browser
PRODUCTCUR
=
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
.
$(
dirname
$0
)
/common-chromium-browser.sh
s
ubst
's|%files|%files\n/usr/share/icons/hicolor/*x*/apps/*.png|'
$SPEC
s
et_alt_alternatives 65
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
}
.png
$BUILDROOT
/usr/share/icons/hicolor/
${
i
}
x
${
i
}
/apps/
$PRODUCT
.png
done
copy_icons_to_share
rm
-f
$BUILDROOT
/etc/cron.daily/
$PRODUCT
subst
"s|.*/etc/cron.daily/
$PRODUCT
.*||"
$SPEC
cleanup
# unsupported format
rm
-f
$BUILDROOT
/usr/share/menu/
$PRODUCT
.menu
subst
"s|.*/usr/share/menu/
$PRODUCT
.menu.*||"
$SPEC
add_bin_commands
if
!
grep
-q
'^"/usr/bin/yandex-browser"'
$SPEC
;
then
subst
's|\(.*/usr/bin/yandex-browser.*\)|"/usr/bin/yandex-browser"\n\1|'
$SPEC
fi
use_system_xdg
# missed in rpm package (ALT bug #39564)
[
-x
$BUILDROOT
/usr/bin/yandex-browser
]
||
ln
-sv
yandex-browser-beta
$BUILDROOT
/usr/bin/yandex-browser
install_deps
# 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
#
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
#
if ! grep -q '^"/usr/bin/yandex-browser"' $SPEC ; then
# subst 's|\(.*/usr/bin/yandex-browser.*\)|"/usr/bin/yandex-browser"\n\1|' $SPEC
#fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment