Commit 61e9e79c authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm play 64Gram: move packing to pack.d

parent 016d9e80
#!/bin/sh
TAR="$1"
#VERSION="$2"
RETURNTARNAME="$2"
PRODUCT="$(basename $0 .sh)"
FPRODUCT="Telegram"
. $(dirname $0)/common.sh
CURDIR="$(pwd)"
PKGDIR="$(mktemp -d)"
trap "rm -fr $PKGDIR" EXIT
cd $PKGDIR || fatal
erc $TAR || fatal
# use version from tarball
# (TODO: get basename via erc
PKGNAME="$(basename $TAR .zip | sed -e "s|_linux||" )"
f=$FPRODUCT
[ -f "$(echo */$FPRODUCT)" ] && f="$(echo */$FPRODUCT)"
mkdir -p opt/$PRODUCT || fatal
cp $f opt/$PRODUCT/$PRODUCT || fatal
erc pack $CURDIR/$PKGNAME.tar opt/$PRODUCT
return_tar $PKGNAME.tar
......@@ -15,4 +15,4 @@ VERSION=".*$BRANCH"
PKGURL=$(epm tool eget --list --latest https://github.com/TDesktop-x64/tdesktop/releases "${PKGNAME}_${VERSION}_linux.zip") #"
[ -n "$PKGURL" ] || fatal "Can't get package URL"
epm install --repack "$PKGURL"
epm --install pack $PKGNAME "$PKGURL"
......@@ -17,21 +17,6 @@ subst "s|^License: unknown$|License: GPLv2|" $SPEC
subst "s|^URL:.*|URL: https://github.com/TDesktop-x64/tdesktop|" $SPEC
subst "s|^Summary:.*|Summary: 64Gram (unofficial Telegram Desktop)|" $SPEC
# move package to /opt
ROOTDIR=$(basename $(find $BUILDROOT -mindepth 1 -maxdepth 1 -type d) 2>/dev/null)
if [ -n "$ROOTDIR" ] ; then
mkdir -p $BUILDROOT/opt/
mv $BUILDROOT/$ROOTDIR $BUILDROOT$PRODUCTDIR
subst "s|\"/$ROOTDIR/|\"$PRODUCTDIR/|" $SPEC
else
mkdir -p $BUILDROOT$PRODUCTDIR/
mv $BUILDROOT/* $BUILDROOT$PRODUCTDIR/
subst "s|^\"/|\"$PRODUCTDIR/|" $SPEC
fi
pack_dir $PRODUCTDIR
move_file $PRODUCTDIR/Telegram $PRODUCTDIR/$PRODUCT
add_bin_link_command
add_bin_link_command $PRODUCTCUR $PRODUCT
......@@ -53,8 +38,9 @@ subst 's|/etc/tdesktop/externalupdater|/etc/t64gramp/externalupdater|' $BUILDROO
mkdir -p "$BUILDROOT/etc/t64gramp"
# telegram checks with real path to the binary
echo "$PRODUCTDIR/$PRODUCT" >"$BUILDROOT/etc/t64gramp/externalupdater"
pack_dir /etc/t64gramp
pack_file /etc/t64gramp/externalupdater
remove_file $PRODUCTDIR/Updater
#remove_file $PRODUCTDIR/Updater
# fixed above
# Hack against https://bugzilla.altlinux.org/42402
......
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