wok-next view mosh/receipt @ rev 18351
Rebuild packages that depends on giflib & nettle (ldd fail)
author | Xander Ziiryanoff <psychomaniak@xakep.ru> |
---|---|
date | Sat Sep 12 15:52:07 2015 +0200 (2015-09-12) |
parents | 7355f9472def |
children | a5a576b1aaac |
line source
1 # SliTaz package receipt.
3 PACKAGE="mosh"
4 VERSION="1.2.4"
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 sed -i '/.*quoted_self = shell_quote.*/r/dev/stdin' scripts/mosh <<EOT
21 if (\`\$ssh -V 2>&1\` =~ m{Dropbear}) {
22 my \$host = \$userhost; \$host = \$1 if (\$userhost =~ m{@(.*)});
23 my \$port = 22; \$port = \$1 if (\$ssh =~ m{-p *(\d+)});
24 exec "\$ssh " . shell_quote( '-J', "\$quoted_self --fake-proxy -- \$host \$port", '-t', \$userhost, "\$server " . shell_quote( @server ) );
25 }
26 EOT
27 ./configure --prefix=/usr --sysconfdir=/etc \
28 --enable-compile-warnings=error &&
29 make &&
30 make DESTDIR=$DESTDIR install
31 }
33 # Rules to gen a SliTaz package suitable for Tazpkg.
34 genpkg_rules()
35 {
36 mkdir -p $fs/usr
37 cp -a $install/usr/bin $fs/usr
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
54 fi
55 }