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