wok-stable annotate dropbear-pam/receipt @ rev 8872
Fixed slitaz-i18n. It need to look for install folder instead of _pkg folder with the new tazwok.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Sat Feb 26 08:00:27 2011 +0000 (2011-02-26) |
parents | a3501d98b7a1 |
children | 790b429e8020 |
rev | line source |
---|---|
pascal@2186 | 1 # SliTaz package receipt. |
pascal@2186 | 2 |
pascal@2186 | 3 PACKAGE="dropbear-pam" |
pascal@2198 | 4 VERSION="0.52" |
pascal@2186 | 5 CATEGORY="security" |
pascal@2186 | 6 SHORT_DESC="Light SSH client and server using PAM." |
pascal@2186 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@2186 | 8 SOURCE="dropbear" |
pascal@2186 | 9 TARBALL="$SOURCE-$VERSION.tar.gz" |
pascal@2186 | 10 DEPENDS="zlib pam" |
pascal@2186 | 11 BUILD_DEPENDS="zlib zlib-dev pam pam-dev" |
pascal@3628 | 12 SUGGESTED="sftp-server" |
pascal@2186 | 13 WEB_SITE="http://matt.ucc.asn.au/dropbear/dropbear.html" |
pascal@2186 | 14 WGET_URL="http://matt.ucc.asn.au/dropbear/releases/$TARBALL" |
pascal@2186 | 15 CONFIG_FILES="/etc/dropbear" |
pascal@4904 | 16 PROVIDE="dropbear:pam ssh:pam" |
slaxemulator@8442 | 17 SRC_WANTED="$SOURCE" |
pascal@2186 | 18 |
pascal@2186 | 19 # Rules to configure and make the package. |
pascal@2186 | 20 compile_rules() |
pascal@2186 | 21 { |
pascal@2186 | 22 local i |
pascal@2186 | 23 local DROPBEARS |
pascal@2186 | 24 DROPBEARS="dropbearkey dropbearconvert dbclient scp" |
pascal@2186 | 25 cd $src |
pascal@2236 | 26 rm -rf _pkg |
pascal@2236 | 27 sed -i -e 's|/usr/X11R6/bin/xauth|/usr/bin/xauth|' \ |
pascal@3628 | 28 -e 's|/usr/libexec/sftp-server|/usr/sbin/sftp-server|' \ |
pascal@2236 | 29 -e 's|ENABLE_SVR_PASSWORD_AUTH|ENABLE_SVR_PAM_AUTH|' \ |
pascal@2236 | 30 options.h |
pascal@2186 | 31 ./configure --prefix=/usr --enable-pam $CONFIGURE_ARGS && |
pascal@2186 | 32 make PROGRAMS="dropbear $DROPBEARS" MULTI=1 && |
pascal@2186 | 33 install -d -m 755 $PWD/_pkg/usr/sbin && |
pascal@2186 | 34 install -m 755 dropbearmulti $PWD/_pkg/usr/sbin/dropbear && |
pascal@2186 | 35 chown root $PWD/_pkg/usr/sbin/dropbear && |
pascal@2186 | 36 chgrp 0 $PWD/_pkg/usr/sbin/dropbear && |
pascal@2186 | 37 install -d -m 755 $PWD/_pkg/usr/bin && |
pascal@2186 | 38 for i in $DROPBEARS ssh; do |
pascal@2186 | 39 ln -s ../sbin/dropbear $PWD/_pkg/usr/bin/$i |
pascal@2186 | 40 done |
pascal@2186 | 41 } |
pascal@2186 | 42 |
pascal@2186 | 43 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@2186 | 44 genpkg_rules() |
pascal@2186 | 45 { |
pascal@2186 | 46 mkdir -p $fs/usr |
pascal@2186 | 47 cp -a $_pkg/usr/bin $fs/usr |
pascal@2186 | 48 cp -a $_pkg/usr/sbin $fs/usr |
pascal@2186 | 49 strip -s $fs/usr/bin/* |
pascal@2186 | 50 strip -s $fs/usr/sbin/* |
pascal@2186 | 51 # Config file and init script. |
pascal@2186 | 52 mkdir -p $fs/etc |
pascal@2287 | 53 cp -a ../$SOURCE/stuff/dropbear $fs/etc |
pascal@2287 | 54 cp -a ../$SOURCE/stuff/init.d $fs/etc |
pascal@2236 | 55 cp -a stuff/pam.d $fs/etc |
pascal@2186 | 56 touch $fs/etc/dropbear/dropbear_dss_host_key \ |
pascal@2186 | 57 $fs/etc/dropbear/dropbear_rsa_host_key |
pascal@2186 | 58 |
pascal@2186 | 59 # Fix dropbear initscript perms |
pascal@2186 | 60 chown -R root.root $fs |
pascal@2186 | 61 } |
pascal@2186 | 62 |
pascal@2186 | 63 # Post message when installing. |
pascal@2186 | 64 post_install() |
pascal@2186 | 65 { |
pascal@7304 | 66 while read dropbear openssh ; do |
pascal@7304 | 67 [ -s $openssh ] || continue |
pascal@7304 | 68 dropbearconvert openssh dropbear $1$openssh $1$dropbear |
pascal@7304 | 69 dropbearkey -y -f $1$dropbear | grep Fingerprint |
pascal@7304 | 70 done <<EOT |
pascal@7304 | 71 /etc/dropbear/dropbear_rsa_host_key /etc/ssh/ssh_host_rsa_key |
pascal@7305 | 72 /etc/dropbear/dropbear_dss_host_key /etc/ssh/ssh_host_dsa_key |
pascal@7304 | 73 EOT |
pascal@3761 | 74 echo -e "\nTo starts $SOURCE server you can run :\n" |
pascal@3761 | 75 echo "/etc/init.d/$SOURCE start" |
pascal@3761 | 76 echo -e "Or add $SOURCE to RUN_DAEMONS in /etc/rcS.conf\n" |
pascal@2186 | 77 } |
pascal@7632 | 78 |
pascal@7632 | 79 pre_remove() |
pascal@7632 | 80 { |
pascal@7632 | 81 tazpkg get-install ${PACKAGE%-pam} |
pascal@7632 | 82 } |