# SliTaz package receipt. PACKAGE="mosh" VERSION="1.3.2" CATEGORY="security" TAGS="ssh" SHORT_DESC="An Openbsd Secure Shell replacement." MAINTAINER="pascal.bellard@slitaz.org" LICENSE="GPL3" WEB_SITE="https://mosh.org/" TARBALL="$PACKAGE-$VERSION.tar.gz" WGET_URL="${WEB_SITE}$TARBALL" DEPENDS="gcc-lib-base libcrypto libssl ncursesw perl protobuf ssh zlib \ gcc83-lib-base" BUILD_DEPENDS="libcrypto-dev ncursesw-dev openssl-dev pkg-config protobuf-dev \ zlib-dev automake gcc83" # What is the latest version available today? current_version() { wget -O - ${WGET_URL%/*} 2>/dev/null | \ sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q } # Rules to configure and make the package. compile_rules() { # Add dropbear support patch -p0 <&1\` =~ m{Dropbear}) { + my \$host = \$userhost; \$host = \$1 if (\$userhost =~ m{@(.*)}); + my \$port = 22; \$port = \$1 if (\$ssh =~ m{-p *(\d+)}); + exec "\$ssh " . shell_quote( '-J', + "\$quoted_proxy_command --fake-proxy -- \$host \$port", + '-t', \$userhost, "\$server " . shell_quote( @server ) ); + } push @sshopts, ( '-S', 'none', '-o', "ProxyCommand=\$quoted_proxy_command --fake-proxy -- %h %p" ); EOT ./autogen.sh ./configure \ CC=gcc-83 \ CXX=g++-83 \ --prefix=/usr \ --sysconfdir=/etc \ --enable-compile-warnings=error && make -j 1 && make DESTDIR=$DESTDIR install } # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { mkdir -p $fs/usr cp -a $install/usr/bin $fs/usr } post_install() { [ -d "$1/usr/lib/locale/$LC_ALL" ] || chroot "$1/" localedef -i ${LC_ALL%.*} -c -f UTF-8 /usr/lib/locale/$LC_ALL if ! grep ^DROPBEAR_OPTIONS "$1/etc/daemons.conf" | grep -q -- -a; then cat <