wok-current annotate tinyssh/receipt @ rev 20260

Add tinyssh
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Mar 15 11:02:45 2018 +0100 (2018-03-15)
parents
children f4bdb6f2ca87
rev   line source
pascal@20260 1 # SliTaz package receipt.
pascal@20260 2
pascal@20260 3 PACKAGE="tinyssh"
pascal@20260 4 VERSION="20180201"
pascal@20260 5 CATEGORY="network"
pascal@20260 6 SHORT_DESC="a small SSH server"
pascal@20260 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@20260 8 LICENSE="PublicDomain"
pascal@20260 9 TARBALL="$PACKAGE-$VERSION.tar.gz"
pascal@20260 10 WEB_SITE="https://tinyssh.org/"
pascal@20260 11 WGET_URL="https://github.com/janmojzis/tinyssh/archive/$VERSION.tar.gz"
pascal@20260 12 CONFIG_FILES="/etc/tinyssh"
pascal@20260 13
pascal@20260 14 # Rules to configure and make the package.
pascal@20260 15 compile_rules()
pascal@20260 16 {
pascal@20260 17 make &&
pascal@20260 18 make DESTDIR=$DESTDIR install
pascal@20260 19 }
pascal@20260 20
pascal@20260 21 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@20260 22 genpkg_rules()
pascal@20260 23 {
pascal@20260 24 mkdir -p $fs/usr
pascal@20260 25 cp -a $install/usr/sbin $fs/usr
pascal@20260 26 mkdir -p $fs/etc/tinyssh/sshkeydir
pascal@20260 27 }
pascal@20260 28
pascal@20260 29 post_install()
pascal@20260 30 {
pascal@20260 31 # openssh: sh-keygen -t ed25519 or ssh-keygen -t ecdsa -b 256 => ~/.ssh/authorized_keys
pascal@20260 32 chroot $1/ tinysshd-makekey /etc/tinyssh/sshkeydir
pascal@20260 33 grep -q ^ssh $1/etc/inetd.conf || cat >> $1/etc/inetd.conf <<EOT
pascal@20260 34 ssh stream tcp nowait root /usr/sbin/tinysshd tinysshd -l -v /etc/tinyssh/sshkeydir
pascal@20260 35 EOT
pascal@20260 36 }
pascal@20260 37
pascal@20260 38 pre_remove()
pascal@20260 39 {
pascal@20260 40 sed -i '/tinysshd/d' $1/etc/inetd.conf
pascal@20260 41 }