wok view mosh/receipt @ rev 19994

get-opera-blink: latest i386 release is 45.0.2552.898
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat Jul 22 10:30:29 2017 +0300 (2017-07-22)
parents 9e01bc6321ea
children 8f4649ae101b
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 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"
19 # Rules to configure and make the package.
20 compile_rules()
21 {
22 ./configure --prefix=/usr --sysconfdir=/etc \
23 --enable-compile-warnings=error &&
24 make &&
25 make DESTDIR=$DESTDIR install
26 }
28 # Rules to gen a SliTaz package suitable for Tazpkg.
29 genpkg_rules()
30 {
31 mkdir -p $fs/usr
32 cp -a $install/usr/bin $fs/usr
33 sed -i '/.*quoted_self = shell_quote.*/r/dev/stdin' $fs/usr/bin/mosh <<EOT
34 if (\`\$ssh -V 2>&1\` =~ m{Dropbear}) {
35 my \$host = \$userhost; \$host = \$1 if (\$userhost =~ m{@(.*)});
36 my \$port = 22; \$port = \$1 if (\$ssh =~ m{-p *(\d+)});
37 exec "\$ssh " . shell_quote( '-J', "\$quoted_self --fake-proxy -- \$host \$port", '-t', \$userhost, "\$server " . shell_quote( @server ) );
38 }
39 EOT
40 }
42 post_install()
43 {
44 [ -d "$1/usr/lib/locale/$LC_ALL" ] ||
45 chroot "$1/" localedef -i ${LC_ALL%.*} -c -f UTF-8 /usr/lib/locale/$LC_ALL
46 if ! grep ^DROPBEAR_OPTIONS "$1/etc/daemons.conf" | grep -q -- -a; then
47 cat <<EOT
48 The mosh server needs dropbear to allow connections to forwarded ports
49 from any host. Nothing to do if you are using OpenSSH or you plan
50 to use the mosh client only.
51 EOT
52 echo -n "Add -a for DROPBEAR_OPTIONS in /etc/daemons.conf now ?"
53 read -t 30 answer
54 [ "$answer" == "y" ] &&
55 sed -i 's/^DROPBEAR_OPTIONS="/&-a /' "$1/etc/daemons.conf" &&
56 [ -z "$1" ] && /etc/init.d/dropbear restart
57 fi
58 true
59 }