wok-current rev 20260
Add tinyssh
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Mar 15 11:02:45 2018 +0100 (2018-03-15) |
parents | 1858d9c73b8c |
children | 708b5293dd29 |
files | tinyssh/receipt |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/tinyssh/receipt Thu Mar 15 11:02:45 2018 +0100 1.3 @@ -0,0 +1,41 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="tinyssh" 1.7 +VERSION="20180201" 1.8 +CATEGORY="network" 1.9 +SHORT_DESC="a small SSH server" 1.10 +MAINTAINER="pascal.bellard@slitaz.org" 1.11 +LICENSE="PublicDomain" 1.12 +TARBALL="$PACKAGE-$VERSION.tar.gz" 1.13 +WEB_SITE="https://tinyssh.org/" 1.14 +WGET_URL="https://github.com/janmojzis/tinyssh/archive/$VERSION.tar.gz" 1.15 +CONFIG_FILES="/etc/tinyssh" 1.16 + 1.17 +# Rules to configure and make the package. 1.18 +compile_rules() 1.19 +{ 1.20 + make && 1.21 + make DESTDIR=$DESTDIR install 1.22 +} 1.23 + 1.24 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.25 +genpkg_rules() 1.26 +{ 1.27 + mkdir -p $fs/usr 1.28 + cp -a $install/usr/sbin $fs/usr 1.29 + mkdir -p $fs/etc/tinyssh/sshkeydir 1.30 +} 1.31 + 1.32 +post_install() 1.33 +{ 1.34 + # openssh: sh-keygen -t ed25519 or ssh-keygen -t ecdsa -b 256 => ~/.ssh/authorized_keys 1.35 + chroot $1/ tinysshd-makekey /etc/tinyssh/sshkeydir 1.36 + grep -q ^ssh $1/etc/inetd.conf || cat >> $1/etc/inetd.conf <<EOT 1.37 +ssh stream tcp nowait root /usr/sbin/tinysshd tinysshd -l -v /etc/tinyssh/sshkeydir 1.38 +EOT 1.39 +} 1.40 + 1.41 +pre_remove() 1.42 +{ 1.43 + sed -i '/tinysshd/d' $1/etc/inetd.conf 1.44 +}