Commit 60b438c3 authored by Иван Мажукин's avatar Иван Мажукин Committed by Vitaly Lipatov

epm pack: add postman

parent f6a97acd
#!/bin/sh
set -x
TAR="$1"
RETURNTARNAME="$2"
. $(dirname $0)/common.sh
# postman-linux-x64.tar.gz
BASENAME=$(basename $TAR .tar.gz)
ln -s $TAR $BASENAME.tar.gz
erc unpack $BASENAME.tar.gz || fatal
mkdir -p opt
mkdir -p usr/share/pixmaps
mv Postman/app opt/postman
VERSION=$(cat "opt/postman/resources/app/package.json" | epm --inscript tool json -b | grep version | awk 'gsub(/"/, "", $2) {print $2}')
[ -n "$VERSION" ] || fatal "Can't get package version"
cp opt/postman/resources/app/assets/icon.png usr/share/pixmaps/postman.png
# create desktop file
mkdir -p usr/share/applications/
cat <<EOF > usr/share/applications/$PRODUCT.desktop
[Desktop Entry]
Version=1.0
Type=Application
Name=Postman
Comment=Postman API platform
Exec=$PRODUCT %U
Icon=$PRODUCT
Terminal=false
StartupNotify=true
Categories=Development;IDE;
StartupWMClass=postman
MimeType=x-scheme-handler/postman
EOF
PKGNAME=$PRODUCT-$VERSION
erc pack $PKGNAME.tar opt usr || fatal
return_tar $PKGNAME.tar
#!/bin/sh
PKGNAME=postman
SUPPORTEDARCHES="x86_64 aarch64"
DESCRIPTION='Postman is an API platform for building and using APIs'
URL="https://www.postman.com"
. $(dirname $0)/common.sh
case "$(epm print info -a)" in
x86_64)
arch="64" ;;
aarch64)
arch="arm64" ;;
esac
PKGURL="https://dl.pstmn.io/download/latest/linux_$arch"
[ -n "$PKGURL" ] || fatal "Can't get package URL"
epm pack --install $PKGNAME "$PKGURL"
\ No newline at end of file
#!/bin/sh -x
# It will be run with two args: buildroot spec
BUILDROOT="$1"
SPEC="$2"
. $(dirname $0)/common.sh
add_libs_requires
add_bin_link_command $PRODUCT $PRODUCTDIR/$PRODUCT
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