wok-current annotate dropbear/receipt @ rev 18477
easytag, xarchiver: fix warnings during update .desktop system database
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Wed Oct 07 13:34:45 2015 +0300 (2015-10-07) |
parents | 0c0338cd4567 |
children | 64618945fe80 |
rev | line source |
---|---|
pankso@126 | 1 # SliTaz package receipt. |
pankso@126 | 2 |
pankso@126 | 3 PACKAGE="dropbear" |
pascal@18294 | 4 VERSION="2015.68" |
pankso@209 | 5 CATEGORY="security" |
al@17992 | 6 SHORT_DESC="Lightweight SSH2 server and client" |
pankso@126 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@14657 | 8 LICENSE="MIT" |
pankso@12689 | 9 TARBALL="$PACKAGE-$VERSION.tar.bz2" |
pankso@126 | 10 WEB_SITE="http://matt.ucc.asn.au/dropbear/dropbear.html" |
pankso@126 | 11 WGET_URL="http://matt.ucc.asn.au/dropbear/releases/$TARBALL" |
pascal@17046 | 12 CONFIG_FILES="/etc/dropbear /etc/inetd.conf" |
pankso@12839 | 13 SUGGESTED="sftp-server" |
pascal@4904 | 14 PROVIDE="ssh" |
jozee@4934 | 15 TAGS="ssh" |
pankso@12839 | 16 HOST_ARCH="i486 arm" |
pankso@126 | 17 |
pankso@12689 | 18 DEPENDS="zlib" |
pankso@12689 | 19 BUILD_DEPENDS="zlib-dev pam pam-dev" |
pankso@12689 | 20 |
pankso@12839 | 21 # Handle multiarch compilation. |
pankso@12834 | 22 case "$ARCH" in |
pankso@12839 | 23 arm) |
pankso@12839 | 24 BUILD_DEPENDS="" |
pankso@12839 | 25 CROSS_ARGS="--disable-zlib" |
pankso@12839 | 26 CROSS_BUGS="Fails to find zlib: -lz... no" ;; |
pankso@12834 | 27 esac |
pankso@12834 | 28 |
pankso@126 | 29 # Rules to configure and make the package. |
pankso@126 | 30 compile_rules() |
pankso@126 | 31 { |
pankso@126 | 32 local i |
pankso@126 | 33 local DROPBEARS |
pankso@126 | 34 DROPBEARS="dropbearkey dropbearconvert dbclient scp" |
pankso@126 | 35 cd $src |
pascal@9432 | 36 sed -i -e 's|/usr/.*/xauth|/usr/bin/xauth|' \ |
pascal@9432 | 37 -e 's|/usr/.*/sftp-server|/usr/sbin/sftp-server|' \ |
pascal@11595 | 38 -e 's|ENABLE_SVR_PAM_AUTH|ENABLE_SVR_PASSWORD_AUTH|' \ |
pascal@3628 | 39 options.h |
pankso@12839 | 40 ./configure --prefix=/usr --without-pam $CONFIGURE_ARGS $CROSS_ARGS && |
pankso@12834 | 41 make PROGRAMS="dropbear $DROPBEARS" MULTI=1 SCPPROGRESS=1 && |
slaxemulator@11100 | 42 install -d -m 755 $DESTDIR/usr/sbin && |
slaxemulator@11100 | 43 install -m 755 dropbearmulti $DESTDIR/usr/sbin/dropbear && |
pankso@12834 | 44 chown 0.0 $DESTDIR/usr/sbin/dropbear || exit 1 |
pankso@12834 | 45 |
pankso@12834 | 46 # No pam support in ARM |
pankso@12834 | 47 case "$ARCH" in |
pankso@12834 | 48 arm) echo "Skipping Dropbear PAM..." ;; |
pankso@12839 | 49 i?86) |
pankso@12834 | 50 sed -i 's|ENABLE_SVR_PASSWORD_AUTH|ENABLE_SVR_PAM_AUTH|' \ |
pankso@12834 | 51 options.h |
pankso@12834 | 52 ./configure --prefix=/usr --enable-pam $CONFIGURE_ARGS && |
pankso@12834 | 53 make PROGRAMS="dropbear $DROPBEARS" MULTI=1 SCPPROGRESS=1 && |
pankso@12834 | 54 install -m 755 dropbearmulti $DESTDIR/usr/sbin/dropbear-pam && |
pankso@12834 | 55 chown 0.0 $DESTDIR/usr/sbin/dropbear-pam || exit 1 ;; |
pankso@12834 | 56 esac |
pankso@12834 | 57 |
slaxemulator@11100 | 58 install -d -m 755 $DESTDIR/usr/bin && |
pascal@1440 | 59 for i in $DROPBEARS ssh; do |
pankso@12834 | 60 ln -s ../sbin/dropbear $DESTDIR/usr/bin/$i || exit 1 |
pankso@126 | 61 done |
pankso@126 | 62 } |
pankso@126 | 63 |
pankso@126 | 64 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@126 | 65 genpkg_rules() |
pankso@126 | 66 { |
pankso@126 | 67 mkdir -p $fs/usr |
pankso@12689 | 68 cp -a $install/usr/bin $fs/usr |
pankso@12689 | 69 cp -a $install/usr/sbin $fs/usr |
pascal@11595 | 70 rm -f $fs/usr/sbin/dropbear-pam |
pankso@126 | 71 # Config file and init script. |
pankso@126 | 72 mkdir -p $fs/etc |
slaxemulator@11100 | 73 cp -a $stuff/dropbear $fs/etc |
slaxemulator@11100 | 74 cp -a $stuff/init.d $fs/etc |
pascal@17524 | 75 ln -s daemon $fs/etc/init.d/ssh |
slaxemulator@11100 | 76 cp -a $stuff/sshx $fs/usr/bin |
pascal@14027 | 77 ln -s sshx $fs/usr/bin/pppssh |
pascal@18330 | 78 ln -s sshx $fs/usr/bin/sshfbvnc |
pankso@12834 | 79 touch $fs/etc/dropbear/dropbear_dss_host_key \ |
erjo@1410 | 80 $fs/etc/dropbear/dropbear_rsa_host_key |
pankso@12689 | 81 |
erjo@1074 | 82 # Fix dropbear initscript perms |
pankso@1091 | 83 chown -R root.root $fs |
pankso@126 | 84 } |
pankso@126 | 85 |
pankso@126 | 86 # Post message when installing. |
pankso@126 | 87 post_install() |
pankso@126 | 88 { |
pascal@15972 | 89 [ "$1" ] || while read dropbear openssh ; do |
pascal@7304 | 90 [ -s $openssh ] || continue |
pankso@12834 | 91 dropbearconvert openssh dropbear ${root}$openssh ${root}$dropbear |
pankso@12834 | 92 dropbearkey -y -f ${root}$dropbear | grep Fingerprint |
pascal@7304 | 93 done <<EOT |
pascal@7304 | 94 /etc/dropbear/dropbear_rsa_host_key /etc/ssh/ssh_host_rsa_key |
pascal@7305 | 95 /etc/dropbear/dropbear_dss_host_key /etc/ssh/ssh_host_dsa_key |
pascal@7304 | 96 EOT |
pascal@17046 | 97 grep -q ssh $1/etc/inetd.conf || cat >> $1/etc/inetd.conf <<EOT |
pascal@17046 | 98 #ssh stream tcp nowait root dropbear dropbear -i -b /etc/dropbear/banner |
pascal@17046 | 99 EOT |
pankso@126 | 100 echo -e "\nTo starts $PACKAGE server you can run :\n" |
pankso@126 | 101 echo "/etc/init.d/$PACKAGE start" |
pankso@126 | 102 echo -e "Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf\n" |
pankso@126 | 103 } |
pascal@17046 | 104 |
pascal@17046 | 105 post_remove() |
pascal@17046 | 106 { |
pascal@17046 | 107 grep -q dropbear $1/etc/inetd.conf && sed -i '/dropbear/d' $1/etc/inetd.conf |
pascal@17046 | 108 } |