SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "sshrc"

# SliTaz package receipt.

PACKAGE="sshrc"
VERSION="0.6.2"
CATEGORY="network"
TAGS="ssh"
SHORT_DESC="bring your .bashrc, .vimrc, etc. with you when you ssh"
MAINTAINER="pascal.bellard@slitaz.org"
LICENSE="MIT"
WEB_SITE="https://github.com/cdown/sshrc"

TARBALL="$PACKAGE-$VERSION.tar.gz"
WGET_URL="https://github.com/cdown/sshrc/archive/refs/tags/$VERSION.tar.gz"

DEPENDS="bash openssl"
SUGGESTED="mosh"

# What is the latest version available today?
current_version()
{
    wget -O - https://github.com/cdown/sshrc/tags 2>/dev/null | \
    sed '/archive.*tar/!d;s|.*/v*\(.*\).tar.*|\1|;q'
}

# Rules to gen a SliTaz package suitable for Tazpkg.   
genpkg_rules()                                      
{
    mkdir -p $fs/usr/bin $install/usr/share/doc
    cp $src/README.md $install/usr/share/doc
    cp -a $src/*shrc $fs/usr/bin

    # dropbear compatibility
    sed -i 's/-b | -c/& | -B | -K | -J/' $fs/usr/bin/sshrc

    # remove xxd dependancy
    sed -i -e 's|command -v xxd|command -v openssl|' \
     -e 's|sshrc requires xxd|moshrc requires openssl|' \
     -e "s/| xxd -p -r/| tr -s ' ' \$'\\\\n' | openssl enc -base64 -d/" \
     -e 's|xxd -p|openssl enc -base64|' \
     -e "s|\\\$'\\\$(|\$'\"\$(|" -e "s|)'|)\"'|" $fs/usr/bin/moshrc
}
6025 packages and 203154 files in current database (Thu Apr 25 06:17:47 2024)