wok view mosh/receipt @ rev 20047

Turbine: typo
author Leonardo Laporte <hackdorte@yandex.com>
date Thu Aug 31 05:53:46 2017 -0300 (2017-08-31)
parents 8f4649ae101b
children 02c70d036ea0
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 [ -d "$1/usr/lib/locale/$LC_ALL" ] ||
43 chroot "$1/" localedef -i ${LC_ALL%.*} -c -f UTF-8 /usr/lib/locale/$LC_ALL
44 if ! grep ^DROPBEAR_OPTIONS "$1/etc/daemons.conf" | grep -q -- -a; then
45 cat <<EOT
46 The mosh server needs dropbear to allow connections to forwarded ports
47 from any host. Nothing to do if you are using OpenSSH or you plan
48 to use the mosh client only.
49 EOT
50 echo -n "Add -a for DROPBEAR_OPTIONS in /etc/daemons.conf now ?"
51 read -t 30 answer
52 [ "$answer" == "y" ] &&
53 sed -i 's/^DROPBEAR_OPTIONS="/&-a /' "$1/etc/daemons.conf" &&
54 [ -z "$1" ] && /etc/init.d/dropbear restart
55 fi
56 true
57 }