Commit 5ddef69a authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm generic-default: improve link creation, desktop fixing, chrome-sandbox detection

parent 3df55322
#!/bin/sh -x
# Default repack script (used if a special script for target product is mieed)
# Default repack script (used if a special script for target product is missed)
# It will run with two args: buildroot spec
BUILDROOT="$1"
......@@ -13,12 +13,26 @@ PKG="$4"
# detect requires by libs
add_libs_requires
if [ -f "$BUILDROOT/$PRODUCTDIR/$PRODUCT" ] ; then
# FIXME: hack for nonstandart name
pd="$(echo $BUILDROOT/opt/*)"
[ -d "$pd" ] && PRODUCTDIR="/opt/$(basename "$pd")"
if [ -f "$BUILDROOT$PRODUCTDIR/$PRODUCT" ] ; then
add_bin_exec_command
fi
if [ -f $BUILDROOT/usr/share/applications/*.desktop ] ; then
EXEC="$(cat $BUILDROOT/usr/share/applications/*.desktop | grep "^Exec=" | head -n1 | sed -e 's|Exec=||' -e 's| .*||')"
if [ "/usr/bin/$(basename "$EXEC")" = "/usr/bin/$PRODUCT" ] || [ "$EXEC" = "$PRODUCTDIR/$PRODUCT" ] ; then
if [ -x $BUILDROOT/usr/bin/$PRODUCT ] ; then
fix_desktop_file "$EXEC"
fi
fi
fi
# TODO: add product dir detection
if [ -f $PRODUCTDIR/v8_context_snapshot.bin ] ; then
if [ -f "$BUILDROOT$PRODUCTDIR/v8_context_snapshot.bin" ] ; then
echo "electron based application detected, adding requires for it ..."
add_electron_deps
fix_chrome_sandbox
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