wok-tiny view 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
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"
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 if [ "$STARTRSH" = "ON" ]; then
45 grep -q inetd $1/etc/rcS.conf ||
46 sed -i 's/^RUN_DAEMONS="/&inetd /' $1/etc/rcS.conf
47 grep -qs rlogind $1/etc/inetd.conf || cat >> $1/etc/inetd.conf <<EOT
48 exec stream tcp nowait root /usr/sbin/in.execd execd
49 login stream tcp nowait root /usr/sbin/in.rlogind rlogind -hl
50 shell stream tcp nowait root /usr/sbin/in.rshd rshd -hl
51 EOT
52 fi
53 }
55 config_form()
56 {
57 cat <<EOT
58 <input type="checkbox" name="STARTRSH" value="ON" ${STARTRSH:+checked="checked" }/>
59 Start server during boot<br>
60 <table>
61 <tr>
62 <td>Trusted hosts</td>
63 <td><textarea name="RSH_HOSTS" cols="60" rows="12" wrap="off">
64 $RSH_HOSTS
65 </textarea></td>
66 </tr>
67 </table>
68 EOT
69 }