wok-next view dropbear/receipt @ rev 12716
cross-arm-gcc: improve receipt, --enable-threads for final build
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sat May 05 04:34:07 2012 +0200 (2012-05-05) |
parents | 890a8d86a257 |
children | b2cca7c91b35 |
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"
16 DEPENDS="zlib"
17 BUILD_DEPENDS="zlib-dev pam pam-dev"
19 # Rules to configure and make the package.
20 compile_rules()
21 {
22 local i
23 local DROPBEARS
24 DROPBEARS="dropbearkey dropbearconvert dbclient scp"
25 cd $src
26 sed -i -e 's|/usr/.*/xauth|/usr/bin/xauth|' \
27 -e 's|/usr/.*/sftp-server|/usr/sbin/sftp-server|' \
28 -e 's|ENABLE_SVR_PAM_AUTH|ENABLE_SVR_PASSWORD_AUTH|' \
29 options.h
30 ./configure --prefix=/usr --without-pam $CONFIGURE_ARGS &&
31 make PROGRAMS="dropbear $DROPBEARS" MULTI=1 &&
32 install -d -m 755 $DESTDIR/usr/sbin &&
33 install -m 755 dropbearmulti $DESTDIR/usr/sbin/dropbear &&
34 chown root $DESTDIR/usr/sbin/dropbear &&
35 chgrp 0 $DESTDIR/usr/sbin/dropbear &&
36 sed -i 's|ENABLE_SVR_PASSWORD_AUTH|ENABLE_SVR_PAM_AUTH|' \
37 options.h
38 ./configure --prefix=/usr --enable-pam $CONFIGURE_ARGS &&
39 make PROGRAMS="dropbear $DROPBEARS" MULTI=1 &&
40 install -m 755 dropbearmulti $DESTDIR/usr/sbin/dropbear-pam &&
41 chown root $DESTDIR/usr/sbin/dropbear-pam &&
42 chgrp 0 $DESTDIR/usr/sbin/dropbear-pam &&
43 install -d -m 755 $DESTDIR/usr/bin &&
44 for i in $DROPBEARS ssh; do
45 ln -s ../sbin/dropbear $DESTDIR/usr/bin/$i
46 done
47 }
49 # Rules to gen a SliTaz package suitable for Tazpkg.
50 genpkg_rules()
51 {
52 mkdir -p $fs/usr
53 cp -a $install/usr/bin $fs/usr
54 cp -a $install/usr/sbin $fs/usr
55 rm -f $fs/usr/sbin/dropbear-pam
56 # Config file and init script.
57 mkdir -p $fs/etc
58 cp -a $stuff/dropbear $fs/etc
59 cp -a $stuff/init.d $fs/etc
60 cp -a $stuff/sshx $fs/usr/bin
61 touch $fs/etc/dropbear/dropbear_dss_host_key \
62 $fs/etc/dropbear/dropbear_rsa_host_key
64 # Fix dropbear initscript perms
65 chown -R root.root $fs
66 }
68 # Post message when installing.
69 post_install()
70 {
71 while read dropbear openssh ; do
72 [ -s $openssh ] || continue
73 dropbearconvert openssh dropbear $1$openssh $1$dropbear
74 dropbearkey -y -f $1$dropbear | grep Fingerprint
75 done <<EOT
76 /etc/dropbear/dropbear_rsa_host_key /etc/ssh/ssh_host_rsa_key
77 /etc/dropbear/dropbear_dss_host_key /etc/ssh/ssh_host_dsa_key
78 EOT
79 echo -e "\nTo starts $PACKAGE server you can run :\n"
80 echo "/etc/init.d/$PACKAGE start"
81 echo -e "Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf\n"
82 }