wok-next view dropbear/receipt @ rev 12474

libcanberra: try a fix
author Christophe Lincoln <pankso@slitaz.org>
date Mon Apr 23 13:29:57 2012 +0200 (2012-04-23)
parents 3cfda88ee539
children fa1321eb3c4e
line source
1 # SliTaz package receipt.
3 PACKAGE="dropbear"
4 VERSION="2011.54"
5 CATEGORY="security"
6 SHORT_DESC="Light SSH client and server."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tar.gz"
9 DEPENDS="zlib"
10 BUILD_DEPENDS="zlib zlib-dev pam pam-dev"
11 SUGGESTED="sftp-server"
12 WEB_SITE="http://matt.ucc.asn.au/dropbear/dropbear.html"
13 WGET_URL="http://matt.ucc.asn.au/dropbear/releases/$TARBALL"
14 CONFIG_FILES="/etc/dropbear"
15 PROVIDE="ssh"
16 TAGS="ssh"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 local i
22 local DROPBEARS
23 DROPBEARS="dropbearkey dropbearconvert dbclient scp"
24 cd $src
25 sed -i -e 's|/usr/.*/xauth|/usr/bin/xauth|' \
26 -e 's|/usr/.*/sftp-server|/usr/sbin/sftp-server|' \
27 -e 's|ENABLE_SVR_PAM_AUTH|ENABLE_SVR_PASSWORD_AUTH|' \
28 options.h
29 ./configure --prefix=/usr --without-pam $CONFIGURE_ARGS &&
30 make PROGRAMS="dropbear $DROPBEARS" MULTI=1 &&
31 install -d -m 755 $DESTDIR/usr/sbin &&
32 install -m 755 dropbearmulti $DESTDIR/usr/sbin/dropbear &&
33 chown root $DESTDIR/usr/sbin/dropbear &&
34 chgrp 0 $DESTDIR/usr/sbin/dropbear &&
35 sed -i 's|ENABLE_SVR_PASSWORD_AUTH|ENABLE_SVR_PAM_AUTH|' \
36 options.h
37 ./configure --prefix=/usr --enable-pam $CONFIGURE_ARGS &&
38 make PROGRAMS="dropbear $DROPBEARS" MULTI=1 &&
39 install -m 755 dropbearmulti $DESTDIR/usr/sbin/dropbear-pam &&
40 chown root $DESTDIR/usr/sbin/dropbear-pam &&
41 chgrp 0 $DESTDIR/usr/sbin/dropbear-pam &&
42 install -d -m 755 $DESTDIR/usr/bin &&
43 for i in $DROPBEARS ssh; do
44 ln -s ../sbin/dropbear $DESTDIR/usr/bin/$i
45 done
46 }
48 # Rules to gen a SliTaz package suitable for Tazpkg.
49 genpkg_rules()
50 {
51 mkdir -p $fs/usr
52 cp -a $_pkg/usr/bin $fs/usr
53 cp -a $_pkg/usr/sbin $fs/usr
54 rm -f $fs/usr/sbin/dropbear-pam
55 # Config file and init script.
56 mkdir -p $fs/etc
57 cp -a $stuff/dropbear $fs/etc
58 cp -a $stuff/init.d $fs/etc
59 cp -a $stuff/sshx $fs/usr/bin
60 touch $fs/etc/dropbear/dropbear_dss_host_key \
61 $fs/etc/dropbear/dropbear_rsa_host_key
63 # Fix dropbear initscript perms
64 chown -R root.root $fs
65 }
67 # Post message when installing.
68 post_install()
69 {
70 while read dropbear openssh ; do
71 [ -s $openssh ] || continue
72 dropbearconvert openssh dropbear $1$openssh $1$dropbear
73 dropbearkey -y -f $1$dropbear | grep Fingerprint
74 done <<EOT
75 /etc/dropbear/dropbear_rsa_host_key /etc/ssh/ssh_host_rsa_key
76 /etc/dropbear/dropbear_dss_host_key /etc/ssh/ssh_host_dsa_key
77 EOT
78 echo -e "\nTo starts $PACKAGE server you can run :\n"
79 echo "/etc/init.d/$PACKAGE start"
80 echo -e "Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf\n"
81 }