wok view mosh/receipt @ rev 21706
updated prosody (0.9.4 -> 0.11.2)
author | Hans-G?nter Theisgen |
---|---|
date | Thu Jun 06 17:46:50 2019 +0100 (2019-06-06) |
parents | adf9182b6536 |
children | 8710e9c81dd7 |
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 # Add dropbear support
23 patch -p0 <<EOT || return 1
24 --- scripts/mosh.pl
25 +++ scripts/mosh.pl
26 @@ -397,2 +397,10 @@
27 my \$quoted_proxy_command = shell_quote( \$0, "--family=\$family" );
28 + my \$ssh = join ' ', @ssh;
29 + if (\`\$ssh -V 2>&1\` =~ m{Dropbear}) {
30 + my \$host = \$userhost; \$host = \$1 if (\$userhost =~ m{@(.*)});
31 + my \$port = 22; \$port = \$1 if (\$ssh =~ m{-p *(\d+)});
32 + exec "\$ssh " . shell_quote( '-J',
33 + "\$quoted_proxy_command --fake-proxy -- \$host \$port",
34 + '-t', \$userhost, "\$server " . shell_quote( @server ) );
35 + }
36 push @sshopts, ( '-S', 'none', '-o', "ProxyCommand=\$quoted_proxy_command --fake-proxy -- %h %p" );
37 EOT
38 ./autogen.sh
39 ./configure \
40 --prefix=/usr \
41 --sysconfdir=/etc \
42 --enable-compile-warnings=error &&
43 make -j 1 &&
44 make DESTDIR=$DESTDIR install
45 }
47 # Rules to gen a SliTaz package suitable for Tazpkg.
48 genpkg_rules()
49 {
50 mkdir -p $fs/usr
51 cp -a $install/usr/bin $fs/usr
52 }
54 post_install()
55 {
56 [ -d "$1/usr/lib/locale/$LC_ALL" ] ||
57 chroot "$1/" localedef -i ${LC_ALL%.*} -c -f UTF-8 /usr/lib/locale/$LC_ALL
58 if ! grep ^DROPBEAR_OPTIONS "$1/etc/daemons.conf" | grep -q -- -a; then
59 cat <<EOT
60 The mosh server needs dropbear to allow connections to forwarded ports
61 from any host. Nothing to do if you are using OpenSSH or you plan
62 to use the mosh client only.
63 EOT
64 echo -n "Add -a for DROPBEAR_OPTIONS in /etc/daemons.conf now ?"
65 read -t 30 answer
66 [ "$answer" = "y" ] &&
67 sed -i 's/^DROPBEAR_OPTIONS="/&-a /' "$1/etc/daemons.conf" &&
68 [ -z "$1" ] && /etc/init.d/dropbear restart
69 fi
70 true
71 }