wok-tiny diff 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 diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/rsh/receipt Mon Sep 02 12:49:50 2019 +0200 1.3 @@ -0,0 +1,69 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="rsh" 1.7 +VERSION="0.17" 1.8 +CATEGORY="network" 1.9 +SHORT_DESC="Remote connection tools" 1.10 +MAINTAINER="pascal.bellard@slitaz.org" 1.11 +LICENSE="BSD" 1.12 +[ -n "$TARGET" ] || TARGET="i486" 1.13 +TARBALL="netkit-$PACKAGE-$VERSION.tar.gz" 1.14 +WEB_SITE="http://ftp.linux.org.uk/pub/linux/Networking/netkit/" 1.15 +WGET_URL="http://ibiblio.org/pub/linux/system/network/netkit/$TARBALL" 1.16 + 1.17 +DEPENDS="libcrypt libutil" 1.18 +BUILD_DEPENDS="ncurses-dev" 1.19 + 1.20 +# Rules to configure and make the package. 1.21 +compile_rules() 1.22 +{ 1.23 + sed -i 's|/man|/share&|' configure 1.24 + mkdir -p $DESTDIR/usr/bin $DESTDIR/usr/sbin \ 1.25 + $DESTDIR/usr/share/man/man1 $DESTDIR/usr/share/man/man8 1.26 + sed -i 's|ARG_MAX|131072|' rexecd/rexecd.c rshd/rshd.c 1.27 + sed -i 's|.*param.h.*|#include <linux/limits.h>\n&|' \ 1.28 + rexecd/rexecd.c rshd/rshd.c 1.29 + sed -i 's|.*rlogind.*|#include <stdio.h>\n&|' rlogind/rlogind.h 1.30 + ./configure --prefix=/usr --without-pam --installroot=$DESTDIR && 1.31 + make && make install 1.32 +} 1.33 + 1.34 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.35 +genpkg_rules() 1.36 +{ 1.37 + mkdir -p $fs/usr $fs/root 1.38 + cp -a $install/usr/bin $fs/usr 1.39 + cp -a $install/usr/sbin $fs/usr 1.40 + touch $fs/root/.rhosts 1.41 + chmod 600 $fs/root/.rhosts 1.42 +} 1.43 + 1.44 +# Pre and post install commands for Tazpkg. 1.45 +post_install() 1.46 +{ 1.47 + if [ "$STARTRSH" = "ON" ]; then 1.48 + grep -q inetd $1/etc/rcS.conf || 1.49 + sed -i 's/^RUN_DAEMONS="/&inetd /' $1/etc/rcS.conf 1.50 + grep -qs rlogind $1/etc/inetd.conf || cat >> $1/etc/inetd.conf <<EOT 1.51 +exec stream tcp nowait root /usr/sbin/in.execd execd 1.52 +login stream tcp nowait root /usr/sbin/in.rlogind rlogind -hl 1.53 +shell stream tcp nowait root /usr/sbin/in.rshd rshd -hl 1.54 +EOT 1.55 + fi 1.56 +} 1.57 + 1.58 +config_form() 1.59 +{ 1.60 + cat <<EOT 1.61 +<input type="checkbox" name="STARTRSH" value="ON" ${STARTRSH:+checked="checked" }/> 1.62 +Start server during boot<br> 1.63 +<table> 1.64 +<tr> 1.65 +<td>Trusted hosts</td> 1.66 +<td><textarea name="RSH_HOSTS" cols="60" rows="12" wrap="off"> 1.67 +$RSH_HOSTS 1.68 +</textarea></td> 1.69 +</tr> 1.70 +</table> 1.71 +EOT 1.72 +}