wok-6.x view dropbear/receipt @ rev 14244
linux-source: fix version
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Mar 23 14:31:05 2013 +0100 (2013-03-23) |
parents | 849bede23853 |
children | 2c8329f6a9b4 |
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 WEB_SITE="http://matt.ucc.asn.au/dropbear/dropbear.html"
10 WGET_URL="http://matt.ucc.asn.au/dropbear/releases/$TARBALL"
11 CONFIG_FILES="/etc/dropbear"
12 SUGGESTED="sftp-server"
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)
23 BUILD_DEPENDS=""
24 CROSS_ARGS="--disable-zlib"
25 CROSS_BUGS="Fails to find zlib: -lz... no" ;;
26 esac
28 # Rules to configure and make the package.
29 compile_rules()
30 {
31 local i
32 local DROPBEARS
33 DROPBEARS="dropbearkey dropbearconvert dbclient scp"
34 cd $src
35 sed -i -e 's|/usr/.*/xauth|/usr/bin/xauth|' \
36 -e 's|/usr/.*/sftp-server|/usr/sbin/sftp-server|' \
37 -e 's|ENABLE_SVR_PAM_AUTH|ENABLE_SVR_PASSWORD_AUTH|' \
38 options.h
39 ./configure --prefix=/usr --without-pam $CONFIGURE_ARGS $CROSS_ARGS &&
40 make PROGRAMS="dropbear $DROPBEARS" MULTI=1 SCPPROGRESS=1 &&
41 install -d -m 755 $DESTDIR/usr/sbin &&
42 install -m 755 dropbearmulti $DESTDIR/usr/sbin/dropbear &&
43 chown 0.0 $DESTDIR/usr/sbin/dropbear || exit 1
45 # No pam support in ARM
46 case "$ARCH" in
47 arm) echo "Skipping Dropbear PAM..." ;;
48 i?86)
49 sed -i 's|ENABLE_SVR_PASSWORD_AUTH|ENABLE_SVR_PAM_AUTH|' \
50 options.h
51 ./configure --prefix=/usr --enable-pam $CONFIGURE_ARGS &&
52 make PROGRAMS="dropbear $DROPBEARS" MULTI=1 SCPPROGRESS=1 &&
53 install -m 755 dropbearmulti $DESTDIR/usr/sbin/dropbear-pam &&
54 chown 0.0 $DESTDIR/usr/sbin/dropbear-pam || exit 1 ;;
55 esac
57 install -d -m 755 $DESTDIR/usr/bin &&
58 for i in $DROPBEARS ssh; do
59 ln -s ../sbin/dropbear $DESTDIR/usr/bin/$i || exit 1
60 done
61 }
63 # Rules to gen a SliTaz package suitable for Tazpkg.
64 genpkg_rules()
65 {
66 mkdir -p $fs/usr
67 cp -a $install/usr/bin $fs/usr
68 cp -a $install/usr/sbin $fs/usr
69 rm -f $fs/usr/sbin/dropbear-pam
70 # Config file and init script.
71 mkdir -p $fs/etc
72 cp -a $stuff/dropbear $fs/etc
73 cp -a $stuff/init.d $fs/etc
74 cp -a $stuff/sshx $fs/usr/bin
75 ln -s sshx $fs/usr/bin/pppssh
76 touch $fs/etc/dropbear/dropbear_dss_host_key \
77 $fs/etc/dropbear/dropbear_rsa_host_key
79 # Fix dropbear initscript perms
80 chown -R root.root $fs
81 }
83 # Post message when installing.
84 post_install()
85 {
86 while read dropbear openssh ; do
87 [ -s $openssh ] || continue
88 dropbearconvert openssh dropbear ${root}$openssh ${root}$dropbear
89 dropbearkey -y -f ${root}$dropbear | grep Fingerprint
90 done <<EOT
91 /etc/dropbear/dropbear_rsa_host_key /etc/ssh/ssh_host_rsa_key
92 /etc/dropbear/dropbear_dss_host_key /etc/ssh/ssh_host_dsa_key
93 EOT
94 echo -e "\nTo starts $PACKAGE server you can run :\n"
95 echo "/etc/init.d/$PACKAGE start"
96 echo -e "Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf\n"
97 }