wok view mosh/receipt @ rev 20029

Up mosh (1.3.2)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Aug 20 09:44:00 2017 +0200 (2017-08-20)
parents 2c96382fb33e
children cbea337525dd
line source
1 # SliTaz package receipt.
3 PACKAGE="mosh"
4 VERSION="1.3.2"
5 CATEGORY="security"
6 SHORT_DESC="A Openbsd Secure Shell remplacement."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL3"
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="http://mosh.mit.edu/"
11 WGET_URL="https://github.com/mobile-shell/mosh/archive/mosh-$VERSION.tar.gz"
12 TAGS="ssh"
14 DEPENDS="gcc-lib-base glibc-base perl protobuf libssl libcrypto libtinfo \
15 zlib ncursesw ssh"
16 BUILD_DEPENDS="pkg-config protobuf-dev openssl-dev libcrypto-dev zlib-dev \
17 ncursesw-dev autoconf automake libtool"
19 # Rules to configure and make the package.
20 compile_rules()
21 {
22 ./autogen.sh
23 ./configure --prefix=/usr --sysconfdir=/etc \
24 --enable-compile-warnings=error &&
25 make &&
26 make DESTDIR=$DESTDIR install
27 }
29 # Rules to gen a SliTaz package suitable for Tazpkg.
30 genpkg_rules()
31 {
32 mkdir -p $fs/usr
33 cp -a $install/usr/bin $fs/usr
34 sed -i '/.*quoted_self = shell_quote.*/r/dev/stdin' $fs/usr/bin/mosh <<EOT
35 if (\`\$ssh -V 2>&1\` =~ m{Dropbear}) {
36 my \$host = \$userhost; \$host = \$1 if (\$userhost =~ m{@(.*)});
37 my \$port = 22; \$port = \$1 if (\$ssh =~ m{-p *(\d+)});
38 exec "\$ssh " . shell_quote( '-J', "\$quoted_self --fake-proxy -- \$host \$port", '-t', \$userhost, "\$server " . shell_quote( @server ) );
39 }
40 EOT
41 }
43 post_install()
44 {
45 [ -d "$1/usr/lib/locale/$LC_ALL" ] ||
46 chroot "$1/" localedef -i ${LC_ALL%.*} -c -f UTF-8 /usr/lib/locale/$LC_ALL
47 if ! grep ^DROPBEAR_OPTIONS "$1/etc/daemons.conf" | grep -q -- -a; then
48 cat <<EOT
49 The mosh server needs dropbear to allow connections to forwarded ports
50 from any host. Nothing to do if you are using OpenSSH or you plan
51 to use the mosh client only.
52 EOT
53 echo -n "Add -a for DROPBEAR_OPTIONS in /etc/daemons.conf now ?"
54 read -t 30 answer
55 [ "$answer" == "y" ] &&
56 sed -i 's/^DROPBEAR_OPTIONS="/&-a /' "$1/etc/daemons.conf" &&
57 [ -z "$1" ] && /etc/init.d/dropbear restart
58 fi
59 true
60 }