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