wok annotate mosh/receipt @ rev 21754

Up firefox-official (67.0.3), tinyproxy (1.10.0)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Jun 19 17:26:14 2019 +0200 (2019-06-19)
parents adf9182b6536
children 8710e9c81dd7
rev   line source
pascal@15179 1 # SliTaz package receipt.
pascal@15179 2
pascal@15179 3 PACKAGE="mosh"
Hans-G?nter@21470 4 VERSION="1.3.2"
pascal@15179 5 CATEGORY="security"
Hans-G?nter@21470 6 TAGS="ssh"
Hans-G?nter@21470 7 SHORT_DESC="An Openbsd Secure Shell replacement."
pascal@15179 8 MAINTAINER="pascal.bellard@slitaz.org"
pascal@15179 9 LICENSE="GPL3"
Hans-G?nter@21470 10 WEB_SITE="https://mosh.org/"
Hans-G?nter@21470 11
pascal@15179 12 TARBALL="$PACKAGE-$VERSION.tar.gz"
pascal@20031 13 WGET_URL="${WEB_SITE}$TARBALL"
pascal@15179 14
Hans-G?nter@21470 15 DEPENDS="gcc-lib-base libcrypto libssl ncursesw perl protobuf ssh zlib"
pascal@21473 16 BUILD_DEPENDS="libcrypto-dev ncursesw-dev openssl-dev pkg-config protobuf-dev \
pascal@21473 17 zlib-dev automake"
pascal@15179 18
pascal@15179 19 # Rules to configure and make the package.
pascal@15179 20 compile_rules()
pascal@15179 21 {
pascal@21519 22 # Add dropbear support
pascal@21519 23 patch -p0 <<EOT || return 1
pascal@21519 24 --- scripts/mosh.pl
pascal@21519 25 +++ scripts/mosh.pl
pascal@21519 26 @@ -397,2 +397,10 @@
pascal@21519 27 my \$quoted_proxy_command = shell_quote( \$0, "--family=\$family" );
pascal@21519 28 + my \$ssh = join ' ', @ssh;
pascal@21519 29 + if (\`\$ssh -V 2>&1\` =~ m{Dropbear}) {
pascal@21519 30 + my \$host = \$userhost; \$host = \$1 if (\$userhost =~ m{@(.*)});
pascal@21519 31 + my \$port = 22; \$port = \$1 if (\$ssh =~ m{-p *(\d+)});
pascal@21519 32 + exec "\$ssh " . shell_quote( '-J',
pascal@21519 33 + "\$quoted_proxy_command --fake-proxy -- \$host \$port",
pascal@21519 34 + '-t', \$userhost, "\$server " . shell_quote( @server ) );
pascal@21519 35 + }
pascal@21519 36 push @sshopts, ( '-S', 'none', '-o', "ProxyCommand=\$quoted_proxy_command --fake-proxy -- %h %p" );
pascal@21519 37 EOT
pascal@21473 38 ./autogen.sh
Hans-G?nter@21470 39 ./configure \
Hans-G?nter@21470 40 --prefix=/usr \
Hans-G?nter@21470 41 --sysconfdir=/etc \
pascal@15179 42 --enable-compile-warnings=error &&
Hans-G?nter@21470 43 make -j 1 &&
pascal@15179 44 make DESTDIR=$DESTDIR install
pascal@15179 45 }
pascal@15179 46
pascal@15179 47 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@15179 48 genpkg_rules()
pascal@15179 49 {
pascal@15179 50 mkdir -p $fs/usr
pascal@15179 51 cp -a $install/usr/bin $fs/usr
pascal@15179 52 }
pascal@18178 53
pascal@18178 54 post_install()
pascal@18178 55 {
pascal@19982 56 [ -d "$1/usr/lib/locale/$LC_ALL" ] ||
pascal@19982 57 chroot "$1/" localedef -i ${LC_ALL%.*} -c -f UTF-8 /usr/lib/locale/$LC_ALL
pascal@18730 58 if ! grep ^DROPBEAR_OPTIONS "$1/etc/daemons.conf" | grep -q -- -a; then
pascal@18178 59 cat <<EOT
pascal@18178 60 The mosh server needs dropbear to allow connections to forwarded ports
pascal@18178 61 from any host. Nothing to do if you are using OpenSSH or you plan
pascal@18178 62 to use the mosh client only.
pascal@18178 63 EOT
pascal@18178 64 echo -n "Add -a for DROPBEAR_OPTIONS in /etc/daemons.conf now ?"
pascal@18178 65 read -t 30 answer
pascal@20892 66 [ "$answer" = "y" ] &&
pascal@18730 67 sed -i 's/^DROPBEAR_OPTIONS="/&-a /' "$1/etc/daemons.conf" &&
pascal@18178 68 [ -z "$1" ] && /etc/init.d/dropbear restart
pascal@18178 69 fi
pascal@18469 70 true
pascal@18178 71 }