wok view tinyssh/receipt @ rev 20261

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