wok view mosh/receipt @ rev 18521
Add wxWidgets28 for oldstable version of wxWidgets. Move old packages to use it.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Mon Oct 26 02:54:52 2015 +0200 (2015-10-26) |
parents | f8d63e811309 |
children | 9e01bc6321ea |
line source
1 # SliTaz package receipt.
3 PACKAGE="mosh"
4 VERSION="1.2.5"
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="${WEB_SITE}$TARBALL"
12 TAGS="ssh"
14 DEPENDS="gcc-lib-base perl protobuf libssl libcrypto zlib ncursesw ssh"
15 BUILD_DEPENDS="pkg-config protobuf-dev openssl-dev libcrypto-dev zlib-dev ncursesw-dev"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 ./configure --prefix=/usr --sysconfdir=/etc \
21 --enable-compile-warnings=error &&
22 make &&
23 make DESTDIR=$DESTDIR install
24 }
26 # Rules to gen a SliTaz package suitable for Tazpkg.
27 genpkg_rules()
28 {
29 mkdir -p $fs/usr
30 cp -a $install/usr/bin $fs/usr
31 sed -i '/.*quoted_self = shell_quote.*/r/dev/stdin' $fs/usr/bin/mosh <<EOT
32 if (\`\$ssh -V 2>&1\` =~ m{Dropbear}) {
33 my \$host = \$userhost; \$host = \$1 if (\$userhost =~ m{@(.*)});
34 my \$port = 22; \$port = \$1 if (\$ssh =~ m{-p *(\d+)});
35 exec "\$ssh " . shell_quote( '-J', "\$quoted_self --fake-proxy -- \$host \$port", '-t', \$userhost, "\$server " . shell_quote( @server ) );
36 }
37 EOT
38 }
40 post_install()
41 {
42 if ! grep ^DROPBEAR_OPTIONS $1/etc/daemons.conf | grep -q -- -a; then
43 cat <<EOT
44 The mosh server needs dropbear to allow connections to forwarded ports
45 from any host. Nothing to do if you are using OpenSSH or you plan
46 to use the mosh client only.
47 EOT
48 echo -n "Add -a for DROPBEAR_OPTIONS in /etc/daemons.conf now ?"
49 read -t 30 answer
50 [ "$answer" == "y" ] &&
51 sed -i 's/^DROPBEAR_OPTIONS="/&-a /' $1/etc/daemons.conf &&
52 [ -z "$1" ] && /etc/init.d/dropbear restart
53 fi
54 true
55 }