wok-current view tinyssh/receipt @ rev 25672
patch tazpkg, upgrade core pkgs first
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Sun Mar 03 17:58:42 2024 +0000 (5 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 }