wok-tiny annotate rsh/receipt @ rev 183

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