Commit 661e4f09 authored by Vitaly Lipatov's avatar Vitaly Lipatov

add epm play sferum

parent ee18f2cb
#!/bin/sh -x
# TODO: common place
fatal()
{
echo "FATAL: $*" >&2
exit 1
}
PKGNAME=sferum
if [ "$1" = "--remove" ] ; then
epm remove $PKGNAME
exit
fi
[ "$1" != "--run" ] && exit #echo "Install Sferium for Linux from the official site" && exit
arch=$($DISTRVENDOR --distro-arch)
case $arch in
x86_64|amd64)
arch=$arch ;;
i686|i386)
arch=$arch ;;
i586)
arch=i686 ;;
*)
fatal "Unsupported arch $arch for $($DISTRVENDOR -d)"
esac
repack=''
[ "$($DISTRVENDOR -d)" = "ALTLinux" ] && repack='--repack'
#https://st.mycdn.me/static/sferum/latest/sferum-i386.deb
#https://st.mycdn.me/static/sferum/latest/sferum-amd64.deb
#https://st.mycdn.me/static/sferum/latest/sferum-i686.rpm
#https://st.mycdn.me/static/sferum/latest/sferum-x86_64.rpm
# don't use constructname due - before arch
#epm install "https://st.mycdn.me/static/sferum/latest/$(epm print constructname $PKGNAME '' $arch '' '-')"
epm $repack install "https://st.mycdn.me/static/sferum/latest/$PKGNAME-$arch.$($DISTRVENDOR -p)"
#!/bin/sh -x
# It will run with two args: buildroot spec
BUILDROOT="$1"
SPEC="$2"
mkdir -p $BUILDROOT/usr/bin/
# Link to the binary
ln -s /opt/Sferum/sferum $BUILDROOT/usr/bin/sferum
# Set SUID for chrome-sandbox if userns_clone is not supported
userns_path='/proc/sys/kernel/unprivileged_userns_clone'
userns_val="$(cat $userns_path 2>/dev/null)"
[ "$userns_val" = '1' ] || chmod 4755 $BUILDROOT/opt/Sferum/chrome-sandbox
subst 's|%files|%files\n/usr/bin/sferum|' $SPEC
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