wok-tiny view rsh/receipt @ rev 172

Add x86test & tfttest
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat May 08 17:23:19 2021 +0000 (2021-05-08)
parents f791de00e1a2
children 1e55ea7da8de
line source
1 # SliTaz package receipt.
3 PACKAGE="rsh"
4 VERSION="0.17"
5 CATEGORY="network"
6 SHORT_DESC="Remote connection tools"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="BSD"
9 [ -n "$TARGET" ] || TARGET="i486"
10 TARBALL="netkit-$PACKAGE-$VERSION.tar.gz"
11 WEB_SITE="http://ftp.linux.org.uk/pub/linux/Networking/netkit/"
12 WGET_URL="http://ibiblio.org/pub/linux/system/network/netkit/$TARBALL"
14 DEPENDS="libcrypt libutil busybox-net"
15 BUILD_DEPENDS="ncurses-dev"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 sed -i 's|/man|/share&|' configure
21 mkdir -p $DESTDIR/usr/bin $DESTDIR/usr/sbin \
22 $DESTDIR/usr/share/man/man1 $DESTDIR/usr/share/man/man8
23 sed -i 's|ARG_MAX|131072|' rexecd/rexecd.c rshd/rshd.c
24 sed -i 's|.*param.h.*|#include <linux/limits.h>\n&|' \
25 rexecd/rexecd.c rshd/rshd.c
26 sed -i 's|.*rlogind.*|#include <stdio.h>\n&|' rlogind/rlogind.h
27 ./configure --prefix=/usr --without-pam --installroot=$DESTDIR &&
28 make && make install
29 }
31 # Rules to gen a SliTaz package suitable for Tazpkg.
32 genpkg_rules()
33 {
34 mkdir -p $fs/usr $fs/root
35 cp -a $install/usr/bin $fs/usr
36 cp -a $install/usr/sbin $fs/usr
37 touch $fs/root/.rhosts
38 chmod 600 $fs/root/.rhosts
39 }
41 # Pre and post install commands for Tazpkg.
42 post_install()
43 {
44 echo "$RSH_HOSTS" > $1/root/.rhosts
45 if [ "$STARTRSH" = "ON" ]; then
46 grep -q inetd $1/etc/rcS.conf ||
47 sed -i 's/^RUN_DAEMONS="/&inetd /' $1/etc/rcS.conf
48 grep -qs rlogind $1/etc/inetd.conf || cat >> $1/etc/inetd.conf <<EOT
49 exec stream tcp nowait root /usr/sbin/in.execd execd
50 login stream tcp nowait root /usr/sbin/in.rlogind rlogind -hl
51 shell stream tcp nowait root /usr/sbin/in.rshd rshd -hl
52 EOT
53 fi
54 }
56 config_form()
57 {
58 cat <<EOT
59 <input type="checkbox" name="STARTRSH" value="ON" ${STARTRSH:+checked="checked" }/>
60 Start server during boot<br>
61 <table>
62 <tr>
63 <td>Trusted hosts</td>
64 <td><textarea name="RSH_HOSTS" cols="60" rows="12" wrap="off">
65 $RSH_HOSTS
66 </textarea></td>
67 </tr>
68 </table>
69 EOT
70 }