wok-tiny annotate rsh/receipt @ rev 146

Add rsh
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Sep 02 12:49:50 2019 +0200 (2019-09-02)
parents
children f791de00e1a2
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@146 14 DEPENDS="libcrypt libutil"
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@146 44 if [ "$STARTRSH" = "ON" ]; then
pascal@146 45 grep -q inetd $1/etc/rcS.conf ||
pascal@146 46 sed -i 's/^RUN_DAEMONS="/&inetd /' $1/etc/rcS.conf
pascal@146 47 grep -qs rlogind $1/etc/inetd.conf || cat >> $1/etc/inetd.conf <<EOT
pascal@146 48 exec stream tcp nowait root /usr/sbin/in.execd execd
pascal@146 49 login stream tcp nowait root /usr/sbin/in.rlogind rlogind -hl
pascal@146 50 shell stream tcp nowait root /usr/sbin/in.rshd rshd -hl
pascal@146 51 EOT
pascal@146 52 fi
pascal@146 53 }
pascal@146 54
pascal@146 55 config_form()
pascal@146 56 {
pascal@146 57 cat <<EOT
pascal@146 58 <input type="checkbox" name="STARTRSH" value="ON" ${STARTRSH:+checked="checked" }/>
pascal@146 59 Start server during boot<br>
pascal@146 60 <table>
pascal@146 61 <tr>
pascal@146 62 <td>Trusted hosts</td>
pascal@146 63 <td><textarea name="RSH_HOSTS" cols="60" rows="12" wrap="off">
pascal@146 64 $RSH_HOSTS
pascal@146 65 </textarea></td>
pascal@146 66 </tr>
pascal@146 67 </table>
pascal@146 68 EOT
pascal@146 69 }