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