wok annotate dropbear/receipt @ rev 12834

dropbear: prepa for ARM and SCPPROGRESS=1
author Christophe Lincoln <pankso@slitaz.org>
date Tue May 22 17:21:11 2012 +0200 (2012-05-22)
parents fa1321eb3c4e
children 849bede23853
rev   line source
pankso@126 1 # SliTaz package receipt.
pankso@126 2
pankso@126 3 PACKAGE="dropbear"
pankso@12689 4 VERSION="2012.55"
pankso@209 5 CATEGORY="security"
pankso@126 6 SHORT_DESC="Light SSH client and server."
pankso@126 7 MAINTAINER="pascal.bellard@slitaz.org"
pankso@12689 8 TARBALL="$PACKAGE-$VERSION.tar.bz2"
pascal@3628 9 SUGGESTED="sftp-server"
pankso@126 10 WEB_SITE="http://matt.ucc.asn.au/dropbear/dropbear.html"
pankso@126 11 WGET_URL="http://matt.ucc.asn.au/dropbear/releases/$TARBALL"
pascal@1273 12 CONFIG_FILES="/etc/dropbear"
pascal@4904 13 PROVIDE="ssh"
jozee@4934 14 TAGS="ssh"
pankso@12834 15 #HOST_ARCH="i486 arm"
pankso@126 16
pankso@12689 17 DEPENDS="zlib"
pankso@12689 18 BUILD_DEPENDS="zlib-dev pam pam-dev"
pankso@12689 19
pankso@12834 20 # Handle multiarch compilation
pankso@12834 21 case "$ARCH" in
pankso@12834 22 arm) BUILD_DEPENDS="zlib-dev" ;;
pankso@12834 23 esac
pankso@12834 24
pankso@126 25 # Rules to configure and make the package.
pankso@126 26 compile_rules()
pankso@126 27 {
pankso@126 28 local i
pankso@126 29 local DROPBEARS
pankso@126 30 DROPBEARS="dropbearkey dropbearconvert dbclient scp"
pankso@126 31 cd $src
pascal@9432 32 sed -i -e 's|/usr/.*/xauth|/usr/bin/xauth|' \
pascal@9432 33 -e 's|/usr/.*/sftp-server|/usr/sbin/sftp-server|' \
pascal@11595 34 -e 's|ENABLE_SVR_PAM_AUTH|ENABLE_SVR_PASSWORD_AUTH|' \
pascal@3628 35 options.h
pascal@2186 36 ./configure --prefix=/usr --without-pam $CONFIGURE_ARGS &&
pankso@12834 37 make PROGRAMS="dropbear $DROPBEARS" MULTI=1 SCPPROGRESS=1 &&
slaxemulator@11100 38 install -d -m 755 $DESTDIR/usr/sbin &&
slaxemulator@11100 39 install -m 755 dropbearmulti $DESTDIR/usr/sbin/dropbear &&
pankso@12834 40 chown 0.0 $DESTDIR/usr/sbin/dropbear || exit 1
pankso@12834 41
pankso@12834 42 # No pam support in ARM
pankso@12834 43 case "$ARCH" in
pankso@12834 44 arm) echo "Skipping Dropbear PAM..." ;;
pankso@12834 45 *)
pankso@12834 46 sed -i 's|ENABLE_SVR_PASSWORD_AUTH|ENABLE_SVR_PAM_AUTH|' \
pankso@12834 47 options.h
pankso@12834 48 ./configure --prefix=/usr --enable-pam $CONFIGURE_ARGS &&
pankso@12834 49 make PROGRAMS="dropbear $DROPBEARS" MULTI=1 SCPPROGRESS=1 &&
pankso@12834 50 install -m 755 dropbearmulti $DESTDIR/usr/sbin/dropbear-pam &&
pankso@12834 51 chown 0.0 $DESTDIR/usr/sbin/dropbear-pam || exit 1 ;;
pankso@12834 52 esac
pankso@12834 53
slaxemulator@11100 54 install -d -m 755 $DESTDIR/usr/bin &&
pascal@1440 55 for i in $DROPBEARS ssh; do
pankso@12834 56 ln -s ../sbin/dropbear $DESTDIR/usr/bin/$i || exit 1
pankso@126 57 done
pankso@126 58 }
pankso@126 59
pankso@126 60 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@126 61 genpkg_rules()
pankso@126 62 {
pankso@126 63 mkdir -p $fs/usr
pankso@12689 64 cp -a $install/usr/bin $fs/usr
pankso@12689 65 cp -a $install/usr/sbin $fs/usr
pascal@11595 66 rm -f $fs/usr/sbin/dropbear-pam
pankso@126 67 # Config file and init script.
pankso@126 68 mkdir -p $fs/etc
slaxemulator@11100 69 cp -a $stuff/dropbear $fs/etc
slaxemulator@11100 70 cp -a $stuff/init.d $fs/etc
slaxemulator@11100 71 cp -a $stuff/sshx $fs/usr/bin
pankso@12834 72 touch $fs/etc/dropbear/dropbear_dss_host_key \
erjo@1410 73 $fs/etc/dropbear/dropbear_rsa_host_key
pankso@12689 74
erjo@1074 75 # Fix dropbear initscript perms
pankso@1091 76 chown -R root.root $fs
pankso@126 77 }
pankso@126 78
pankso@126 79 # Post message when installing.
pankso@126 80 post_install()
pankso@126 81 {
pascal@7304 82 while read dropbear openssh ; do
pascal@7304 83 [ -s $openssh ] || continue
pankso@12834 84 dropbearconvert openssh dropbear ${root}$openssh ${root}$dropbear
pankso@12834 85 dropbearkey -y -f ${root}$dropbear | grep Fingerprint
pascal@7304 86 done <<EOT
pascal@7304 87 /etc/dropbear/dropbear_rsa_host_key /etc/ssh/ssh_host_rsa_key
pascal@7305 88 /etc/dropbear/dropbear_dss_host_key /etc/ssh/ssh_host_dsa_key
pascal@7304 89 EOT
pankso@126 90 echo -e "\nTo starts $PACKAGE server you can run :\n"
pankso@126 91 echo "/etc/init.d/$PACKAGE start"
pankso@126 92 echo -e "Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf\n"
pankso@126 93 }