wok view mosh/receipt @ rev 21471

updated motion (3.2.12 -> 4.2.2)
author Hans-G?nter Theisgen
date Tue Apr 30 17:55:19 2019 +0100 (2019-04-30)
parents 02c70d036ea0
children 2d7b87d501a3
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 zlib-dev"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 ./configure \
22 --prefix=/usr \
23 --sysconfdir=/etc \
24 --enable-compile-warnings=error &&
25 make -j 1 &&
26 make DESTDIR=$DESTDIR install
27 }
29 # Rules to gen a SliTaz package suitable for Tazpkg.
30 genpkg_rules()
31 {
32 mkdir -p $fs/usr
33 cp -a $install/usr/bin $fs/usr
35 sed -i '/.*quoted_self = shell_quote.*/r/dev/stdin' $fs/usr/bin/mosh <<EOT
36 if (\`\$ssh -V 2>&1\` =~ m{Dropbear}) {
37 my \$host = \$userhost; \$host = \$1 if (\$userhost =~ m{@(.*)});
38 my \$port = 22; \$port = \$1 if (\$ssh =~ m{-p *(\d+)});
39 exec "\$ssh " . shell_quote( '-J', "\$quoted_self --fake-proxy -- \$host \$port", '-t', \$userhost, "\$server " . shell_quote( @server ) );
40 }
41 EOT
42 }
44 post_install()
45 {
46 [ -d "$1/usr/lib/locale/$LC_ALL" ] ||
47 chroot "$1/" localedef -i ${LC_ALL%.*} -c -f UTF-8 /usr/lib/locale/$LC_ALL
48 if ! grep ^DROPBEAR_OPTIONS "$1/etc/daemons.conf" | grep -q -- -a; then
49 cat <<EOT
50 The mosh server needs dropbear to allow connections to forwarded ports
51 from any host. Nothing to do if you are using OpenSSH or you plan
52 to use the mosh client only.
53 EOT
54 echo -n "Add -a for DROPBEAR_OPTIONS in /etc/daemons.conf now ?"
55 read -t 30 answer
56 [ "$answer" = "y" ] &&
57 sed -i 's/^DROPBEAR_OPTIONS="/&-a /' "$1/etc/daemons.conf" &&
58 [ -z "$1" ] && /etc/init.d/dropbear restart
59 fi
60 true
61 }