wok-current view dropbear-pam/receipt @ rev 9366

Up: cairo to 1.10.2.
author Christopher Rogers <slaxemulator@gmail.com>
date Tue Mar 22 18:01:23 2011 +0000 (2011-03-22)
parents 790b429e8020
children 02bbaa9d12ba
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 strip -s $fs/usr/bin/*
49 strip -s $fs/usr/sbin/*
50 # Config file and init script.
51 mkdir -p $fs/etc
52 cp -a ../$SOURCE/stuff/dropbear $fs/etc
53 cp -a ../$SOURCE/stuff/init.d $fs/etc
54 cp -a stuff/pam.d $fs/etc
55 touch $fs/etc/dropbear/dropbear_dss_host_key \
56 $fs/etc/dropbear/dropbear_rsa_host_key
58 # Fix dropbear initscript perms
59 chown -R root.root $fs
60 }
62 # Post message when installing.
63 post_install()
64 {
65 while read dropbear openssh ; do
66 [ -s $openssh ] || continue
67 dropbearconvert openssh dropbear $1$openssh $1$dropbear
68 dropbearkey -y -f $1$dropbear | grep Fingerprint
69 done <<EOT
70 /etc/dropbear/dropbear_rsa_host_key /etc/ssh/ssh_host_rsa_key
71 /etc/dropbear/dropbear_dss_host_key /etc/ssh/ssh_host_dsa_key
72 EOT
73 echo -e "\nTo starts $SOURCE server you can run :\n"
74 echo "/etc/init.d/$SOURCE start"
75 echo -e "Or add $SOURCE to RUN_DAEMONS in /etc/rcS.conf\n"
76 }
78 pre_remove()
79 {
80 tazpkg get-install ${PACKAGE%-pam}
81 }