wok-current view dropbear/receipt @ rev 23518
updated python-ofxparse (0.14 -> 0.20)
author | Hans-G?nter Theisgen |
---|---|
date | Mon Apr 06 13:29:12 2020 +0100 (2020-04-06) |
parents | adbdcada3730 |
children | eb5518b1b094 |
line source
1 # SliTaz package receipt.
3 PACKAGE="dropbear"
4 VERSION="2019.78"
5 CATEGORY="security"
6 SHORT_DESC="Lightweight SSH2 server and client"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="MIT"
9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
10 WEB_SITE="http://matt.ucc.asn.au/dropbear/dropbear.html"
11 WGET_URL="http://matt.ucc.asn.au/dropbear/releases/$TARBALL"
12 CONFIG_FILES="/etc/dropbear"
13 SUGGESTED="sftp-server"
14 PROVIDE="ssh"
15 TAGS="ssh"
16 HOST_ARCH="i486 arm"
18 DEPENDS="zlib"
19 BUILD_DEPENDS="zlib-dev pam pam-dev"
21 # Handle multiarch compilation.
22 case "$ARCH" in
23 arm)
24 BUILD_DEPENDS=""
25 CROSS_ARGS="--disable-zlib"
26 CROSS_BUGS="Fails to find zlib: -lz... no" ;;
27 esac
29 current_version()
30 {
31 wget -O - $WEB_SITE 2>/dev/null | \
32 sed "/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|;q"
33 }
35 # Rules to configure and make the package.
36 compile_rules()
37 {
38 local i
39 local DROPBEARS
40 DROPBEARS="dropbearkey dropbearconvert dbclient scp"
41 cat > localoptions.h <<EOT
42 #define SFTPSERVER_PATH "/usr/sbin/sftp-server"
43 EOT
44 sed -i 's|shell arch|shell uname -m|' libtommath/makefile_include.mk
45 ./configure --prefix=/usr --without-pam $CONFIGURE_ARGS $CROSS_ARGS &&
46 make PROGRAMS="dropbear $DROPBEARS" MULTI=1 SCPPROGRESS=1 &&
47 install -d -m 755 $DESTDIR/usr/sbin &&
48 install -m 755 dropbearmulti $DESTDIR/usr/sbin/dropbear &&
49 chown 0.0 $DESTDIR/usr/sbin/dropbear || exit 1
51 # No pam support in ARM
52 case "$ARCH" in
53 arm) echo "Skipping Dropbear PAM..." ;;
54 i?86)
55 cat >> localoptions.h <<EOT
56 #define DROPBEAR_SVR_PASSWORD_AUTH 0
57 #define DROPBEAR_SVR_PAM_AUTH 1
58 EOT
59 ./configure --prefix=/usr --enable-pam $CONFIGURE_ARGS &&
60 make PROGRAMS="dropbear $DROPBEARS" MULTI=1 SCPPROGRESS=1 &&
61 install -m 755 dropbearmulti $DESTDIR/usr/sbin/dropbear-pam &&
62 chown 0.0 $DESTDIR/usr/sbin/dropbear-pam || exit 1 ;;
63 esac
65 install -d -m 755 $DESTDIR/usr/bin &&
66 for i in $DROPBEARS ssh; do
67 ln -s ../sbin/dropbear $DESTDIR/usr/bin/$i || exit 1
68 done
69 install -d -m 755 $DESTDIR/usr/share/man/man1 &&
70 install -m 644 $src/*.1 $DESTDIR/usr/share/man/man1 &&
71 install -d -m 755 $DESTDIR/usr/share/man/man8 &&
72 install -m 644 $src/*.8 $DESTDIR/usr/share/man/man8 &&
73 install -d -m 755 $DESTDIR/usr/share/doc &&
74 install -m 644 $src/[A-Z][A-Z]* $DESTDIR/usr/share/doc
75 }
77 # Rules to gen a SliTaz package suitable for Tazpkg.
78 genpkg_rules()
79 {
80 mkdir -p $fs/usr
81 cp -a $install/usr/bin $fs/usr
82 cp -a $install/usr/sbin $fs/usr
83 rm -f $fs/usr/sbin/dropbear-pam
84 # Config file and init script.
85 mkdir -p $fs/etc
86 cp -a $stuff/dropbear $fs/etc
87 cp -a $stuff/init.d $fs/etc
88 ln -s daemon $fs/etc/init.d/sshd
89 cp -a $stuff/sshx $fs/usr/bin
90 ln -s sshx $fs/usr/bin/pppssh
91 ln -s sshx $fs/usr/bin/sshfbvnc
92 touch $fs/etc/dropbear/dropbear_dss_host_key \
93 $fs/etc/dropbear/dropbear_rsa_host_key \
94 $fs/etc/dropbear/dropbear_ecdsa_host_key
96 # Fix dropbear initscript perms
97 chown -R root.root $fs
98 }
100 # Post message when installing.
101 post_install()
102 {
103 while read dropbear openssh ; do
104 [ -s "$1/$openssh" ] || continue
105 chroot "$1/" dropbearconvert openssh dropbear $openssh $dropbear
106 chroot "$1/" dropbearkey -y -f $dropbear | grep Fingerprint
107 done <<EOT
108 /etc/dropbear/dropbear_rsa_host_key /etc/ssh/ssh_host_rsa_key
109 /etc/dropbear/dropbear_dss_host_key /etc/ssh/ssh_host_dsa_key
110 /etc/dropbear/dropbear_ecdsa_host_key /etc/ssh/ssh_host_ecdsa_key
111 EOT
112 grep -q ssh "$1/etc/inetd.conf" || cat >> "$1/etc/inetd.conf" <<EOT
113 #ssh stream tcp nowait root dropbear dropbear -i -b /etc/dropbear/banner
114 EOT
115 [ -n "$quiet" ] && return
116 echo -e "\nTo starts $PACKAGE server you can run :\n"
117 echo "/etc/init.d/$PACKAGE start"
118 echo -e "Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf\n"
119 }
121 post_remove()
122 {
123 grep -q dropbear "$1/etc/inetd.conf" && sed -i '/dropbear/d' "$1/etc/inetd.conf"
124 }