wok view dropbear-pam/receipt @ rev 9747

Up: mpfre-dev to 3.0.1.
author Christopher Rogers <slaxemulator@gmail.com>
date Tue May 10 11:42:55 2011 +0000 (2011-05-10)
parents 129bb5b11a7e
children 24e34542a1ef
line source
1 # SliTaz package receipt.
3 PACKAGE="dropbear-pam"
4 VERSION="0.53"
5 CATEGORY="security"
6 SHORT_DESC="Light SSH client and server using PAM."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 SOURCE="dropbear"
9 TARBALL="$SOURCE-$VERSION.tar.gz"
10 DEPENDS="zlib pam"
11 BUILD_DEPENDS="zlib zlib-dev pam pam-dev"
12 SUGGESTED="sftp-server"
13 WEB_SITE="http://matt.ucc.asn.au/dropbear/dropbear.html"
14 WGET_URL="http://matt.ucc.asn.au/dropbear/releases/$TARBALL"
15 CONFIG_FILES="/etc/dropbear"
16 PROVIDE="dropbear:pam ssh:pam"
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 rm -rf _pkg
26 sed -i -e 's|/usr/X11R6/bin/xauth|/usr/bin/xauth|' \
27 -e 's|/usr/libexec/sftp-server|/usr/sbin/sftp-server|' \
28 -e 's|ENABLE_SVR_PASSWORD_AUTH|ENABLE_SVR_PAM_AUTH|' \
29 options.h
30 ./configure --prefix=/usr --enable-pam $CONFIGURE_ARGS &&
31 make PROGRAMS="dropbear $DROPBEARS" MULTI=1 &&
32 install -d -m 755 $PWD/_pkg/usr/sbin &&
33 install -m 755 dropbearmulti $PWD/_pkg/usr/sbin/dropbear &&
34 chown root $PWD/_pkg/usr/sbin/dropbear &&
35 chgrp 0 $PWD/_pkg/usr/sbin/dropbear &&
36 install -d -m 755 $PWD/_pkg/usr/bin &&
37 for i in $DROPBEARS ssh; do
38 ln -s ../sbin/dropbear $PWD/_pkg/usr/bin/$i
39 done
40 }
42 # Rules to gen a SliTaz package suitable for Tazpkg.
43 genpkg_rules()
44 {
45 mkdir -p $fs/usr
46 cp -a $_pkg/usr/bin $fs/usr
47 cp -a $_pkg/usr/sbin $fs/usr
48 # Config file and init script.
49 mkdir -p $fs/etc
50 cp -a ../$SOURCE/stuff/dropbear $fs/etc
51 cp -a ../$SOURCE/stuff/init.d $fs/etc
52 cp -a stuff/pam.d $fs/etc
53 touch $fs/etc/dropbear/dropbear_dss_host_key \
54 $fs/etc/dropbear/dropbear_rsa_host_key
56 # Fix dropbear initscript perms
57 chown -R root.root $fs
58 }
60 # Post message when installing.
61 post_install()
62 {
63 while read dropbear openssh ; do
64 [ -s $openssh ] || continue
65 dropbearconvert openssh dropbear $1$openssh $1$dropbear
66 dropbearkey -y -f $1$dropbear | grep Fingerprint
67 done <<EOT
68 /etc/dropbear/dropbear_rsa_host_key /etc/ssh/ssh_host_rsa_key
69 /etc/dropbear/dropbear_dss_host_key /etc/ssh/ssh_host_dsa_key
70 EOT
71 echo -e "\nTo starts $SOURCE server you can run :\n"
72 echo "/etc/init.d/$SOURCE start"
73 echo -e "Or add $SOURCE to RUN_DAEMONS in /etc/rcS.conf\n"
74 }
76 pre_remove()
77 {
78 tazpkg get-install ${PACKAGE%-pam}
79 }