wok-current view tinyssh/receipt @ rev 23902

Add SECRET_FILES variable
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Aug 01 16:19:51 2020 +0000 (2020-08-01)
parents efbf8f769900
children 5ea0ce1cecc0
line source
1 # SliTaz package receipt.
3 PACKAGE="tinyssh"
4 VERSION="20190101"
5 CATEGORY="network"
6 SHORT_DESC="A small SSH server."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="PublicDomain"
9 WEB_SITE="https://tinyssh.org/"
10 SUGGESTED="tinyssh-keyconvert"
12 TARBALL="$PACKAGE-$VERSION.tar.gz"
13 WGET_URL="https://github.com/janmojzis/tinyssh/archive/$VERSION.tar.gz"
15 SECRET_FILES="/etc/tinyssh/sshkeydir"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 make &&
21 make DESTDIR=$DESTDIR install
22 }
24 # Rules to gen a SliTaz package suitable for Tazpkg.
25 genpkg_rules()
26 {
27 mkdir -p $fs/etc/tinyssh
28 mkdir -p $fs/usr
30 cp -a $install/usr/sbin $fs/usr
31 for i in $fs/usr/sbin/tinysshd-*; do
32 #cmp $fs/usr/sbin/tinysshd $i &&
33 ln -f $fs/usr/sbin/tinysshd $i
34 done
35 }
37 post_install()
38 {
39 [ -d $1/etc/tinyssh/sshkeydir ] ||
40 chroot $1/ tinysshd-makekey /etc/tinyssh/sshkeydir
41 grep -q ^ssh $1/etc/inetd.conf || cat >> $1/etc/inetd.conf <<EOT
42 ssh stream tcp nowait root /usr/sbin/tinysshd tinysshd -s -o -l -v /etc/tinyssh/sshkeydir -x sftp=/usr/sbin/sftp-server
43 EOT
44 }
46 pre_remove()
47 {
48 sed -i '/tinysshd/d' $1/etc/inetd.conf
49 }