wok-current view tinyssh/receipt @ rev 25520

created recipes for libluv and libluv-dev 1.44.2.1
author Hans-G?nter Theisgen
date Fri Feb 24 15:44:32 2023 +0100 (21 months ago)
parents f08fe4855be4
children
line source
1 # SliTaz package receipt.
3 PACKAGE="tinyssh"
4 VERSION="20220311"
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/"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="https://github.com/janmojzis/tinyssh/archive/$VERSION.tar.gz"
14 SUGGESTED="tinyssh-keyconvert"
16 SECRET_FILES="/etc/tinyssh/sshkeydir"
18 current_version()
19 {
20 wget -O - ${WGET_URL%/arch*}/releases 2>/dev/null | \
21 sed '/archive.*tar/!d;s|.*/\(.*\).tar.*|\1|;q'
22 }
24 # Rules to configure and make the package.
25 compile_rules()
26 {
27 make &&
28 make install DESTDIR=$DESTDIR
29 }
31 # Rules to gen a SliTaz package suitable for Tazpkg.
32 genpkg_rules()
33 {
34 mkdir -p $fs/etc/tinyssh
35 mkdir -p $fs/usr
37 cp -a $install/usr/sbin $fs/usr
38 for i in $fs/usr/sbin/tinysshd-*
39 do
40 #cmp $fs/usr/sbin/tinysshd $i &&
41 ln -f $fs/usr/sbin/tinysshd $i
42 done
43 }
45 post_install()
46 {
47 [ -d $1/etc/tinyssh/sshkeydir ] ||
48 chroot $1/ tinysshd-makekey /etc/tinyssh/sshkeydir
49 grep -q ^ssh $1/etc/inetd.conf ||
50 cat >> $1/etc/inetd.conf <<EOT
51 ssh stream tcp nowait root /usr/sbin/tinysshd tinysshd -s -o -l -v /etc/tinyssh/sshkeydir -x sftp=/usr/sbin/sftp-server
52 EOT
53 }
55 pre_remove()
56 {
57 sed -i '/tinysshd/d' $1/etc/inetd.conf
58 }