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
...
@@ -7,50 +7,18 @@ PRODUCT=brave-browser
PRODUCTCUR
=
brave-browser-nightly
PRODUCTCUR
=
brave-browser-nightly
PRODUCTDIR
=
/opt/brave.com/brave-nightly
PRODUCTDIR
=
/opt/brave.com/brave-nightly
# needed alternatives
subst
'1iProvides:webclient'
$SPEC
subst
"s|%files|%files
\n
/etc/alternatives/packages.d/
$PRODUCT
|"
$SPEC
.
$(
dirname
$0
)
/common-chromium-browser.sh
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 80
# short command for run
copy_icons_to_share
ln
-s
$PRODUCTCUR
$BUILDROOT
/usr/bin/
$PRODUCT
#subst "s|%files|%files\n/usr/bin/$PRODUCT|" $SPEC
# fix main link
cleanup
rm
-v
$BUILDROOT
/usr/bin/
$PRODUCTCUR
ln
-s
$PRODUCTDIR
/
$PRODUCTCUR
$BUILDROOT
/usr/bin/
$PRODUCTCUR
rm
-v
$BUILDROOT$PRODUCTDIR
/
$PRODUCT
add_bin_commands
ln
-s
$PRODUCTCUR
$BUILDROOT$PRODUCTDIR
/
$PRODUCT
use_system_xdg
for
i
in
16 24 32 48 64 128 256
;
do
install_deps
[
-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
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"
...
@@ -4,46 +4,34 @@ BUILDROOT="$1"
SPEC
=
"
$2
"
SPEC
=
"
$2
"
PRODUCT
=
chromium-gost
PRODUCT
=
chromium-gost
PRODUCTCUR
=
chromium-gost-stable
PRODUCTDIR
=
/opt/
$PRODUCT
PRODUCTDIR
=
/opt/
$PRODUCT
# can be in the repo
subst
'1iConflicts:chromium-gost'
$SPEC
# needed alternatives
.
$(
dirname
$0
)
/common-chromium-browser.sh
subst
'1iProvides:webclient'
$SPEC
subst
"s|%files|%files
\n
/etc/alternatives/packages.d/
$PRODUCT
|"
$SPEC
# can be in the repo
mkdir
-p
$BUILDROOT
/etc/alternatives/packages.d/
subst
'1iConflicts:chromium-gost'
$SPEC
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
s
ubst
's|%files|%files\n/usr/share/icons/hicolor/*x*/apps/*.png|'
$SPEC
s
et_alt_alternatives 62
# Make relative symlink
copy_icons_to_share
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
for
i
in
16 24 32 48 64 128 256
;
do
cleanup
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
rm
-f
$BUILDROOT
/etc/cron.daily/chromium-gost
add_bin_commands
subst
's|.*/etc/cron.daily/chromium-gost.*||'
$SPEC
# unsupported format
use_system_xdg
rm
-f
$BUILDROOT
/usr/share/menu/
$PRODUCT
.menu
subst
"s|.*/usr/share/menu/
$PRODUCT
.menu.*||"
$SPEC
install_deps
subst
's|exec -a "$0" "$HERE/chrome" "$@"||'
$BUILDROOT
/opt/chromium-gost/chromium-gost
# use standalone config dir
cat
<<
EOF
>>
$BUILDROOT
/opt/chromium-gost/chromium-gost
subst
's|exec -a "$0" "$HERE/chrome" "$@"||'
$BUILDROOT
/
$PRODUCTDIR
/
$PRODUCT
cat
<<
EOF
>>
$BUILDROOT
/
$PRODUCTDIR
/
$PRODUCT
if ! [[ "\
$*
" =~ \-user\-data\-dir= ]]; then
if ! [[ "\
$*
" =~ \-user\-data\-dir= ]]; then
exec -a "\
$0
" "\
$HERE
/chrome" "-user-data-dir=\
$HOME
/.config/chromium-gost" "\
$@
"
exec -a "\
$0
" "\
$HERE
/chrome" "-user-data-dir=\
$HOME
/.config/chromium-gost" "\
$@
"
else
else
exec -a "\
$0
" "\
$HERE
/chrome" "\
$@
"
exec -a "\
$0
" "\
$HERE
/chrome" "\
$@
"
fi
fi
EOF
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"
...
@@ -4,46 +4,21 @@ BUILDROOT="$1"
SPEC
=
"
$2
"
SPEC
=
"
$2
"
PRODUCT
=
google-chrome
PRODUCT
=
google-chrome
PRODUCTCUR
=
google-chrome-stable
PRODUCTDIR
=
/opt/google/chrome
PRODUCTDIR
=
/opt/google/chrome
subst
'1iProvides:webclient'
$SPEC
subst
"s|%files|%files
\n
/etc/alternatives/packages.d/
$PRODUCT
|"
$SPEC
.
$(
dirname
$0
)
/common-chromium-browser.sh
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
set_alt_alternatives 65
subst
's|%files|%files\n/usr/share/icons/hicolor/*x*/apps/*.png|'
$SPEC
copy_icons_to_share
# Make relative symlink
cleanup
rm
-f
$BUILDROOT
/usr/bin/google-chrome-stable
ln
-s
../../opt/google/chrome/google-chrome
$BUILDROOT
/usr/bin/google-chrome-stable
# short command for run
add_bin_commands
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
use_system_xdg
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
rm
-f
$BUILDROOT
/etc/cron.daily/google-chrome
install_deps
subst
's|.*/etc/cron.daily/google-chrome.*||'
$SPEC
# 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 @@
...
@@ -3,41 +3,32 @@
BUILDROOT
=
"
$1
"
BUILDROOT
=
"
$1
"
SPEC
=
"
$2
"
SPEC
=
"
$2
"
PRODUCT
=
microsoft-edge-dev
PRODUCT
=
microsoft-edge
PRODUCTCUR
=
microsoft-edge-dev
PRODUCTDIR
=
/opt/microsoft/msedge-dev
PRODUCTDIR
=
/opt/microsoft/msedge-dev
subst
's|%files|%files\n/usr/share/icons/hicolor/*x*/apps/*.png|'
$SPEC
# needed alternatives
.
$(
dirname
$0
)
/common-chromium-browser.sh
subst
'1iProvides:webclient'
$SPEC
subst
"s|%files|%files
\n
/etc/alternatives/packages.d/
$PRODUCT
|"
$SPEC
set_alt_alternatives 65
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
copy_icons_to_share
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
cleanup
done
rm
-f
$BUILDROOT
/etc/cron.daily/
$PRODUCT
add_bin_commands
subst
"s|.*/etc/cron.daily/
$PRODUCT
.*||"
$SPEC
# unsupported format
use_system_xdg
rm
-f
$BUILDROOT
/usr/share/menu/microsoft-edge-dev.menu
subst
"s|.*/usr/share/menu/microsoft-edge-dev.menu.*||"
$SPEC
[
-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
#
if ! grep -q '^"/usr/bin/microsoft-edge"' $SPEC ; then
subst
's|\(.*/usr/bin/microsoft-edge-dev.*\)|"/usr/bin/microsoft-edge"\n\1|'
$SPEC
#
subst 's|\(.*/usr/bin/microsoft-edge-dev.*\)|"/usr/bin/microsoft-edge"\n\1|' $SPEC
fi
#
fi
# fix wrong interpreter
# fix wrong interpreter
epm assure patchelf
||
exit
epm assure patchelf
||
exit
for
i
in
$BUILDROOT
/opt/microsoft/msedge-dev/libmip_
*
.so
;
do
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
[
"
$(
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
done
repack.d/sputnik-browser-stable.sh
View file @
c31393d5
...
@@ -4,42 +4,23 @@ BUILDROOT="$1"
...
@@ -4,42 +4,23 @@ BUILDROOT="$1"
SPEC
=
"
$2
"
SPEC
=
"
$2
"
PRODUCT
=
sputnik-browser
PRODUCT
=
sputnik-browser
PRODUCT
=
sputnik-browser-stable
PRODUCTDIR
=
/opt/
$PRODUCT
PRODUCTDIR
=
/opt/
$PRODUCT
# needed alternatives
subst
'1iProvides:webclient'
$SPEC
subst
"s|%files|%files
\n
/etc/alternatives/packages.d/
$PRODUCT
|"
$SPEC
.
$(
dirname
$0
)
/common-chromium-browser.sh
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
s
ubst
's|%files|%files\n/usr/share/icons/hicolor/*x*/apps/*.png|'
$SPEC
s
et_alt_alternatives 65
# Make relative symlink
copy_icons_to_share
mkdir
-p
$BUILDROOT
/usr/bin
ln
-s
../../opt/
$PRODUCT
/
$PRODUCT
$BUILDROOT
/usr/bin/
$PRODUCT
-stable
ln
-s
$PRODUCT
-stable
$BUILDROOT
/usr/bin/
$PRODUCT
cleanup
subst
"s|%files|%files
\n
/usr/bin/
$PRODUCT
|"
$SPEC
for
i
in
16 24 32 48 64 128 256
;
do
add_bin_commands
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
# replace embedded xdg tools
use_system_xdg
for
EMBDIR
in
$PRODUCTDIR
/
{
xdg-mime,xdg-settings
}
;
do
[
-s
$BUILDROOT$EMBDIR
]
||
continue
install_deps
rm
-v
$BUILDROOT$EMBDIR
ln
-s
/usr/bin/
$(
basename
$EMBDIR
)
$BUILDROOT$EMBDIR
done
# fix permission
# fix permission
chmod
o-w
-v
$BUILDROOT$PRODUCTDIR
/
*
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"
...
@@ -4,32 +4,29 @@ BUILDROOT="$1"
SPEC
=
"
$2
"
SPEC
=
"
$2
"
PRODUCT
=
vivaldi
PRODUCT
=
vivaldi
PRODUCTCUR
=
vivaldi-stable
PRODUCTDIR
=
/opt/vivaldi
PRODUCTDIR
=
/opt/vivaldi
# needed alternatives
subst
'1iProvides:webclient'
$SPEC
subst
"s|%files|%files
\n
/etc/alternatives/packages.d/
$PRODUCT
|"
$SPEC
.
$(
dirname
$0
)
/common-chromium-browser.sh
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
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
copy_icons_to_share
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
rm
-f
$BUILDROOT
/etc/cron.daily/
$PRODUCT
cleanup
subst
"s|.*/etc/cron.daily/
$PRODUCT
.*||"
$SPEC
subst
"1i%filter_from_requires /.opt.google.chrome.WidevineCdm/d"
$SPEC
add_bin_commands
use_system_xdg
#install_deps
# unsupported format
# install all requires packages before packing (the list have got with rpmreqs package | xargs echo)
rm
-f
$BUILDROOT
/usr/share/menu/
$PRODUCT
.menu
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
\
subst
"s|.*/usr/share/menu/
$PRODUCT
.menu.*||"
$SPEC
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"
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 @@
...
@@ -4,47 +4,26 @@
BUILDROOT
=
"
$1
"
BUILDROOT
=
"
$1
"
SPEC
=
"
$2
"
SPEC
=
"
$2
"
PRODUCT
=
yandex-browser-beta
PRODUCT
=
yandex-browser
PRODUCTCUR
=
yandex-browser-beta
PRODUCTDIR
=
/opt/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
.
$(
dirname
$0
)
/common-chromium-browser.sh
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
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
copy_icons_to_share
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
rm
-f
$BUILDROOT
/etc/cron.daily/
$PRODUCT
cleanup
subst
"s|.*/etc/cron.daily/
$PRODUCT
.*||"
$SPEC
# unsupported format
add_bin_commands
rm
-f
$BUILDROOT
/usr/share/menu/
$PRODUCT
.menu
subst
"s|.*/usr/share/menu/
$PRODUCT
.menu.*||"
$SPEC
if
!
grep
-q
'^"/usr/bin/yandex-browser"'
$SPEC
;
then
use_system_xdg
subst
's|\(.*/usr/bin/yandex-browser.*\)|"/usr/bin/yandex-browser"\n\1|'
$SPEC
fi
# missed in rpm package (ALT bug #39564)
install_deps
[
-x
$BUILDROOT
/usr/bin/yandex-browser
]
||
ln
-sv
yandex-browser-beta
$BUILDROOT
/usr/bin/yandex-browser
# 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)
#
if ! grep -q '^"/usr/bin/yandex-browser"' $SPEC ; then
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
\
# subst 's|\(.*/usr/bin/yandex-browser.*\)|"/usr/bin/yandex-browser"\n\1|' $SPEC
libX11 libxcb libXcomposite libXcursor libXdamage libXext libXfixes libXi libXrandr libXrender libXtst
sed tar
which xdg-utils xprop
#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