wok view dropbear-pam/receipt @ rev 8680

up stoq/stoqlib 0.9.12 & add some fix
author Antoine Bodin <gokhlayeh@slitaz.org>
date Thu Feb 17 01:45:49 2011 +0100 (2011-02-17)
parents a3501d98b7a1
children 790b429e8020
line source
1 # SliTaz package receipt.
3 PACKAGE="dropbear-pam"
4 VERSION="0.52"
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"
17 SRC_WANTED="$SOURCE"
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 rm -rf _pkg
27 sed -i -e 's|/usr/X11R6/bin/xauth|/usr/bin/xauth|' \
28 -e 's|/usr/libexec/sftp-server|/usr/sbin/sftp-server|' \
29 -e 's|ENABLE_SVR_PASSWORD_AUTH|ENABLE_SVR_PAM_AUTH|' \
30 options.h
31 ./configure --prefix=/usr --enable-pam $CONFIGURE_ARGS &&
32 make PROGRAMS="dropbear $DROPBEARS" MULTI=1 &&
33 install -d -m 755 $PWD/_pkg/usr/sbin &&
34 install -m 755 dropbearmulti $PWD/_pkg/usr/sbin/dropbear &&
35 chown root $PWD/_pkg/usr/sbin/dropbear &&
36 chgrp 0 $PWD/_pkg/usr/sbin/dropbear &&
37 install -d -m 755 $PWD/_pkg/usr/bin &&
38 for i in $DROPBEARS ssh; do
39 ln -s ../sbin/dropbear $PWD/_pkg/usr/bin/$i
40 done
41 }
43 # Rules to gen a SliTaz package suitable for Tazpkg.
44 genpkg_rules()
45 {
46 mkdir -p $fs/usr
47 cp -a $_pkg/usr/bin $fs/usr
48 cp -a $_pkg/usr/sbin $fs/usr
49 strip -s $fs/usr/bin/*
50 strip -s $fs/usr/sbin/*
51 # Config file and init script.
52 mkdir -p $fs/etc
53 cp -a ../$SOURCE/stuff/dropbear $fs/etc
54 cp -a ../$SOURCE/stuff/init.d $fs/etc
55 cp -a stuff/pam.d $fs/etc
56 touch $fs/etc/dropbear/dropbear_dss_host_key \
57 $fs/etc/dropbear/dropbear_rsa_host_key
59 # Fix dropbear initscript perms
60 chown -R root.root $fs
61 }
63 # Post message when installing.
64 post_install()
65 {
66 while read dropbear openssh ; do
67 [ -s $openssh ] || continue
68 dropbearconvert openssh dropbear $1$openssh $1$dropbear
69 dropbearkey -y -f $1$dropbear | grep Fingerprint
70 done <<EOT
71 /etc/dropbear/dropbear_rsa_host_key /etc/ssh/ssh_host_rsa_key
72 /etc/dropbear/dropbear_dss_host_key /etc/ssh/ssh_host_dsa_key
73 EOT
74 echo -e "\nTo starts $SOURCE server you can run :\n"
75 echo "/etc/init.d/$SOURCE start"
76 echo -e "Or add $SOURCE to RUN_DAEMONS in /etc/rcS.conf\n"
77 }
79 pre_remove()
80 {
81 tazpkg get-install ${PACKAGE%-pam}
82 }