wok-next view dropbear/receipt @ rev 21495

updated arping (2.19 -> 2.21)
author Hans-G?nter Theisgen
date Thu Jun 18 21:25:23 2020 +0100 (2020-06-18)
parents 68405ac5fe8a
children 211f5ebfccdb
line source
1 # SliTaz package receipt v2.
3 PACKAGE="dropbear"
4 VERSION="2018.76"
5 CATEGORY="security"
6 SHORT_DESC="Lightweight SSH2 server and client"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="MIT"
9 WEB_SITE="http://matt.ucc.asn.au/dropbear/dropbear.html"
11 TARBALL="$PACKAGE-$VERSION.tar.bz2"
12 WGET_URL="http://matt.ucc.asn.au/dropbear/releases/$TARBALL"
14 BUILD_DEPENDS="zlib-dev pam-dev"
15 SPLIT="$PACKAGE-pam"
17 compile_rules() {
18 local i DROPBEARS="dropbearkey dropbearconvert dbclient scp"
19 sed -iold -e 's|/usr/.*/xauth|/usr/bin/xauth|' \
20 -e 's|ENABLE_SVR_PAM_AUTH|ENABLE_SVR_PASSWORD_AUTH|' \
21 options.h
23 ./configure \
24 --prefix=/usr \
25 --without-pam \
26 $CONFIGURE_ARGS &&
27 make PROGRAMS="dropbear $DROPBEARS" MULTI=1 SCPPROGRESS=1 &&
28 install -Dm755 dropbearmulti $install/usr/sbin/dropbear || return 1
30 sed -i 's|ENABLE_SVR_PASSWORD_AUTH|ENABLE_SVR_PAM_AUTH|' options.h
31 ./configure \
32 --enable-pam \
33 $CONFIGURE_ARGS &&
34 make PROGRAMS="dropbear $DROPBEARS" MULTI=1 SCPPROGRESS=1 &&
35 install -Dm755 dropbearmulti $install/usr/sbin/dropbear-pam || return 1
37 install -dm755 $install/usr/bin &&
38 for i in $DROPBEARS ssh; do
39 ln -s ../sbin/dropbear $install/usr/bin/$i || return 1
40 done
42 cook_pick_manpages $src/*.1 $src/*.8
43 cook_pick_docs CHANGES INSTALL LICENSE MULTI README SMALL
45 # Config file and init script.
46 mkdir -p $install/etc
47 cp -a $stuff/dropbear $install/etc
48 cp -a $stuff/init.d $install/etc
49 cp -a $stuff/sshx $install/usr/bin
50 ln -s sshx $install/usr/bin/pppssh
51 ln -s sshx $install/usr/bin/sshfbvnc
52 touch $install/etc/dropbear/dropbear_dss_host_key \
53 $install/etc/dropbear/dropbear_rsa_host_key \
54 $install/etc/dropbear/dropbear_ecdsa_host_key
56 # PAM
57 cp -a $stuff/pam.d $install/etc
59 # Fix dropbear initscript perms
60 chown -R root:root $install
62 ln -s daemon $install/etc/init.d/sshd
63 }
65 genpkg_rules() {
66 case $PACKAGE in
67 dropbear)
68 copy @std
69 rm -f $fs/usr/sbin/dropbear-pam
70 rm -r $fs/etc/pam.d/
71 DEPENDS="zlib"
72 CONFIG_FILES="/etc/dropbear"
73 PROVIDE="ssh"
74 TAGS="ssh"
75 ;;
76 dropbear-pam)
77 copy dropbear-pam pam.d/
78 mv $fs/usr/sbin/dropbear-pam $fs/usr/sbin/dropbear
79 DEPENDS="dropbear pam"
80 CAT="security|with PAM support"
81 PROVIDE="dropbear:pam ssh:pam"
82 TAGS="ssh"
83 ;;
84 esac
85 }
87 # Post message when installing.
88 post_install_dropbear() {
89 while read dropbear openssh; do
90 [ -s "$1/$openssh" ] || continue
91 chroot "$1/" dropbearconvert openssh dropbear $openssh $dropbear
92 chroot "$1/" dropbearkey -y -f $dropbear | grep Fingerprint
93 done <<EOT
94 /etc/dropbear/dropbear_rsa_host_key /etc/ssh/ssh_host_rsa_key
95 /etc/dropbear/dropbear_dss_host_key /etc/ssh/ssh_host_dsa_key
96 /etc/dropbear/dropbear_ecdsa_host_key /etc/ssh/ssh_host_ecdsa_key
97 EOT
98 grep -q ssh "$1/etc/inetd.conf" || cat >> "$1/etc/inetd.conf" <<EOT
99 #ssh stream tcp nowait root dropbear dropbear -i -b /etc/dropbear/banner
100 EOT
101 [ -n "$quiet" ] || cat <<EOT
103 .-------------------------------------------------.
104 | To start dropbear server you can run: |
105 | /etc/init.d/dropbear start |
106 | |
107 | or add dropbear to RUN_DAEMONS in /etc/rcS.conf |
108 '-------------------------------------------------'
109 EOT
110 }
112 post_remove_dropbear() {
113 grep -q dropbear "$1/etc/inetd.conf" &&
114 sed -i '/dropbear/d' "$1/etc/inetd.conf"
115 }
117 post_remove_dropbear_pam() {
118 tazpkg -gi dropbear --forced
119 }