Commit 2d47662e authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm repack: cleanup scripts

parent 42d19603
...@@ -51,3 +51,5 @@ epm assure patchelf || exit ...@@ -51,3 +51,5 @@ epm assure patchelf || exit
for i in $BUILDROOT/$PRODUCTDIR/lib/{libssl.so,libssl.so.1.*} ; do for i in $BUILDROOT/$PRODUCTDIR/lib/{libssl.so,libssl.so.1.*} ; do
a= patchelf --set-rpath '$ORIGIN/' $i a= patchelf --set-rpath '$ORIGIN/' $i
done done
epm install --skip-installed coreutils fontconfig glib2 libalsa libcom_err libcups libdrm libexpat libfreetype libGL libkeyutils libkrb5 libnspr libnss libX11 libxcb libXrandr zlib
...@@ -24,7 +24,7 @@ epm install --skip-installed fontconfig glib2 libatk libcairo libfreetype libgdk ...@@ -24,7 +24,7 @@ epm install --skip-installed fontconfig glib2 libatk libcairo libfreetype libgdk
subst '1iAutoProv:no' $SPEC subst '1iAutoProv:no' $SPEC
remove_file usr/share/anydesk/files/init/anydesk remove_file /usr/share/anydesk/files/init/anydesk
# put service file to the normal place # put service file to the normal place
mkdir -p $BUILDROOT/etc/systemd/system/ mkdir -p $BUILDROOT/etc/systemd/system/
......
...@@ -37,7 +37,8 @@ subst "s|.*$EMBDIR/..*\"||" $SPEC ...@@ -37,7 +37,8 @@ subst "s|.*$EMBDIR/..*\"||" $SPEC
# replace embedded node and npm # replace embedded node and npm
for EMBDIR in /usr/share/atom-beta/resources/app/apm/bin/{node,npm} /usr/share/atom-beta/resources/app/apm/node_modules/.bin/{npm,npx} /usr/share/atom-beta/resources/app/apm/node_modules/open/xdg-open ; do for EMBDIR in /usr/share/atom-beta/resources/app/apm/bin/{node,npm} /usr/share/atom-beta/resources/app/apm/node_modules/.bin/{npm,npx} /usr/share/atom-beta/resources/app/apm/node_modules/open/xdg-open ; do
rm -v $BUILDROOT$EMBDIR echo "Removing $BUILDROOT$EMBDIR ..."
rm $BUILDROOT$EMBDIR
ln -s /usr/bin/$(basename $EMBDIR) $BUILDROOT$EMBDIR ln -s /usr/bin/$(basename $EMBDIR) $BUILDROOT$EMBDIR
done done
......
...@@ -2,11 +2,14 @@ ...@@ -2,11 +2,14 @@
# It will run with two args: buildroot spec # It will run with two args: buildroot spec
BUILDROOT="$1" BUILDROOT="$1"
SPEC="$2" SPEC="$2"
PKGNAME=chrome-remote-desktop PRODUCT=chrome-remote-desktop
rm -f $BUILDROOT/etc/cron.daily/$PKGNAME . $(dirname $0)/common-chromium-browser.sh
subst "s|.*/etc/cron.daily/$PKGNAME.*||" $SPEC
cleanup
subst '1iBuildRequires:rpm-build-python3' $SPEC
# install all requires packages before packing ($ rpmreqs chrome-remote-desktop | xargs echo) # install all requires packages before packing ($ rpmreqs chrome-remote-desktop | xargs echo)
epm install --skip-installed coreutils glib2 libcairo libdbus libdrm libexpat libgbm libgio libgtk+3 libnspr libnss libpango libX11 libxcb libXdamage libXext libXfixes libXrandr libXtst python3-base python3-module-psutil sudo python3 epm install --skip-installed coreutils glib2 libcairo libdbus libdrm libexpat libgbm libgio libgtk+3 libnspr libnss libpango libX11 libxcb libXdamage libXext libXfixes libXrandr libXtst python3-base python3-module-psutil python3 rpm-build-python3 libutempter
...@@ -73,8 +73,9 @@ use_system_xdg() ...@@ -73,8 +73,9 @@ use_system_xdg()
install_deps() install_deps()
{ {
# install all requires packages before packing (the list have got with rpmreqs package | xargs echo) # install all requires packages before packing (the list have got with rpmreqs package | xargs echo)
epm install --skip-installed at-spi2-atk file GConf glib2 grep libatk libat-spi2-core libcairo libcups libdbus libdrm libexpat libgbm libgdk-pixbuf libgio libgtk+3 libnspr libnss libpango \ epm install --skip-installed at-spi2-atk file GConf glib2 grep libatk libat-spi2-core libalsa 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 which xdg-utils xprop libX11 libxcb libXcomposite libXcursor libXdamage libXext libXfixes libXi libXrandr libXrender libXtst sed which xdg-utils xprop \
libsecret
} }
......
...@@ -71,3 +71,11 @@ fix_chrome_sandbox() ...@@ -71,3 +71,11 @@ fix_chrome_sandbox()
[ -e "$BUILDROOT$sandbox" ] || return [ -e "$BUILDROOT$sandbox" ] || return
chmod 4711 $BUILDROOT$sandbox chmod 4711 $BUILDROOT$sandbox
} }
# ignore embedded libs
drop_embedded_reqs()
{
subst '1i%filter_from_requires /^libGLESv2.so().*/d' $SPEC
subst '1i%filter_from_requires /^libEGL.so().*/d' $SPEC
subst '1i%filter_from_requires /^libffmpeg.so().*/d' $SPEC
}
...@@ -5,18 +5,21 @@ BUILDROOT="$1" ...@@ -5,18 +5,21 @@ BUILDROOT="$1"
SPEC="$2" SPEC="$2"
PRODUCT=discord PRODUCT=discord
LIBDIR=/opt
PRODUCTDIR=/opt/$PRODUCT PRODUCTDIR=/opt/$PRODUCT
mkdir -p $BUILDROOT$LIBDIR/ . $(dirname $0)/common-chromium-browser.sh
mv $BUILDROOT/usr/share/$PRODUCT/ $BUILDROOT$PRODUCTDIR/
subst "s|/usr/share/$PRODUCT|$PRODUCTDIR|g" $SPEC move_to_opt
fix_chrome_sandbox
install_deps
subst '1iAutoProv:no' $SPEC subst '1iAutoProv:no' $SPEC
# usual command skype
mkdir -p $BUILDROOT/usr/bin/ mkdir -p $BUILDROOT/usr/bin/
ln -sf $PRODUCTDIR/Discord $BUILDROOT/usr/bin/$PRODUCT ln -sf $PRODUCTDIR/Discord $BUILDROOT/usr/bin/$PRODUCT
subst "s|/usr/share/discord/Discord|/usr/bin/$PRODUCT|g" $BUILDROOT/$PRODUCTDIR/discord.desktop subst "s|/usr/share/discord/Discord|/usr/bin/$PRODUCT|g" $BUILDROOT/$PRODUCTDIR/discord.desktop
ln -sf $PRODUCTDIR/discord.desktop $BUILDROOT/usr/share/applications/discord.desktop ln -sf $PRODUCTDIR/discord.desktop $BUILDROOT/usr/share/applications/discord.desktop
ln -sf $PRODUCTDIR/discord.png $BUILDROOT/usr/share/pixmaps/discord.png ln -sf $PRODUCTDIR/discord.png $BUILDROOT/usr/share/pixmaps/discord.png
...@@ -6,3 +6,14 @@ SPEC="$2" ...@@ -6,3 +6,14 @@ SPEC="$2"
REQUIRES="mono-full,libgtk-sharp2" REQUIRES="mono-full,libgtk-sharp2"
subst "s|^\(Name: .*\)$|# Converted from original package requires\nRequires:$REQUIRES\n\1|g" $SPEC subst "s|^\(Name: .*\)$|# Converted from original package requires\nRequires:$REQUIRES\n\1|g" $SPEC
subst '1iBuildRequires: rpm-build-python3' $SPEC
subst '1i%add_python3_path /usr/lib/duplicati' $SPEC
subst '1iAutoProv: no' $SPEC
subst '1iAutoReq: yes,nomonolib,nomono' $SPEC
subst 's|env python.*|env python3|' $BUILDROOT/usr/lib/duplicati/utility-scripts/DuplicatiVerify.py
subst 's|/usr/bin/bash|/bin/bash|' $BUILDROOT/usr/lib/duplicati/{lvm-scripts/*.sh,run-script-example.sh} $BUILDROOT/usr/bin/{duplicati-server,duplicati-cli,duplicati}
epm install --skip-installed rpm-build-python3 mono-full libgtk-sharp2
...@@ -26,8 +26,13 @@ pack_file /usr/share/applications/$DESKTOPFILE ...@@ -26,8 +26,13 @@ pack_file /usr/share/applications/$DESKTOPFILE
mkdir -p $BUILDROOT/usr/share/pixmaps/ mkdir -p $BUILDROOT/usr/share/pixmaps/
cp $ICONFILE $BUILDROOT/usr/share/pixmaps/ cp $ICONFILE $BUILDROOT/usr/share/pixmaps/
pack_file /usr/share/pixmaps/kontur-talk.png pack_file /usr/share/pixmaps/$ICONFILE
cd - >/dev/null cd - >/dev/null
add_bin_exec_command $PRODUCT $PRODUCTDIR/AppRun add_bin_exec_command $PRODUCT $PRODUCTDIR/AppRun
subst '1iAutoProv:no' $SPEC
# ignore embedded libs
drop_embedded_reqs
...@@ -21,4 +21,5 @@ cleanup ...@@ -21,4 +21,5 @@ cleanup
fix_chrome_sandbox fix_chrome_sandbox
install_deps
epm install --skip-installed python3 rpm-build-python3 epm install --skip-installed python3 rpm-build-python3
...@@ -22,9 +22,7 @@ subst "s|^SKYPE_PATH=.*|SKYPE_PATH=$PRODUCTDIR/skypeforlinux|" $BUILDROOT/usr/bi ...@@ -22,9 +22,7 @@ subst "s|^SKYPE_PATH=.*|SKYPE_PATH=$PRODUCTDIR/skypeforlinux|" $BUILDROOT/usr/bi
subst '1iAutoProv:no' $SPEC subst '1iAutoProv:no' $SPEC
# ignore embedded libs # ignore embedded libs
subst '1i%filter_from_requires /^libGLESv2.so().*/d' $SPEC drop_embedded_reqs
subst '1i%filter_from_requires /^libEGL.so().*/d' $SPEC
subst '1i%filter_from_requires /^libffmpeg.so().*/d' $SPEC
# usual command skype # usual command skype
mkdir -p $BUILDROOT/usr/bin/ mkdir -p $BUILDROOT/usr/bin/
......
...@@ -26,8 +26,6 @@ subst "s|/usr/share/teams|$LIBDIR/$PRODUCT|" $SPEC ...@@ -26,8 +26,6 @@ subst "s|/usr/share/teams|$LIBDIR/$PRODUCT|" $SPEC
subst '1iAutoProv:no' $SPEC subst '1iAutoProv:no' $SPEC
# ignore embedded libs # ignore embedded libs
subst '1i%filter_from_requires /^libGLESv2.so().*/d' $SPEC drop_embedded_reqs
subst '1i%filter_from_requires /^libEGL.so().*/d' $SPEC
subst '1i%filter_from_requires /^libffmpeg.so().*/d' $SPEC
fix_chrome_sandbox fix_chrome_sandbox
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