wok-6.x annotate rsh/receipt @ rev 24548

created recipe for firefox-official-pl
author Hans-G?nter Theisgen
date Fri Feb 25 07:47:13 2022 +0100 (2022-02-25)
parents 9849335f0b73
children
rev   line source
pascal@21251 1 # SliTaz package receipt.
pascal@21251 2
pascal@21251 3 PACKAGE="rsh"
pascal@21251 4 VERSION="0.17"
pascal@21251 5 CATEGORY="network"
pascal@21284 6 SHORT_DESC="Remote connection tools"
pascal@21251 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@21251 8 LICENSE="BSD"
pascal@21253 9 TARBALL="netkit-$PACKAGE-$VERSION.tar.gz"
pascal@24091 10 WEB_SITE="https://web.archive.org/web/20201216144539/http://ftp.linux.org.uk/pub/linux/Networking/netkit/"
pascal@21251 11 WGET_URL="http://ibiblio.org/pub/linux/system/network/netkit/$TARBALL"
pascal@21251 12 PROVIDE="rshd netkit-rsh"
pascal@21251 13
pascal@21251 14 DEPENDS=""
pascal@21251 15 BUILD_DEPENDS="ncurses-dev"
pascal@21251 16
pascal@24465 17 # What is the latest version available today?
pascal@24465 18 current_version()
pascal@24465 19 {
pascal@24465 20 wget -O - ${WGET_URL%/*}/ 2>/dev/null | \
pascal@24465 21 sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*|\\1|" | sort -Vr | sed q
pascal@24465 22 }
pascal@24465 23
pascal@21251 24 # Rules to configure and make the package.
pascal@21251 25 compile_rules()
pascal@21251 26 {
pascal@21251 27 sed -i 's|/man|/share&|' configure
pascal@21251 28 mkdir -p $DESTDIR/usr/bin $DESTDIR/usr/sbin \
pascal@21251 29 $DESTDIR/usr/share/man/man1 $DESTDIR/usr/share/man/man8
pascal@21251 30 sed -i 's|.*param.h.*|#include <linux/limits.h>\n&|' \
pascal@21251 31 rexecd/rexecd.c rshd/rshd.c
pascal@21251 32 sed -i 's|.*rlogind.*|#include <stdio.h>\n&|' rlogind/rlogind.h
pascal@21251 33 ./configure --prefix=/usr --without-pam --installroot=$DESTDIR &&
pascal@21251 34 make && make install
pascal@21251 35 }
pascal@21251 36
pascal@21251 37 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@21251 38 genpkg_rules()
pascal@21251 39 {
pascal@21251 40 mkdir -p $fs/usr $fs/etc/skel
pascal@21251 41 cp -a $install/usr/bin $fs/usr
pascal@21251 42 cp -a $install/usr/sbin $fs/usr
pascal@21251 43 touch $fs/etc/skel/.rhosts
pascal@21251 44 chmod 600 $fs/etc/skel/.rhosts
pascal@21251 45 }
pascal@21251 46
pascal@21251 47 # Pre and post install commands for Tazpkg.
pascal@21251 48 post_install()
pascal@21251 49 {
pascal@21251 50 if ! grep -qs rlogind $1/etc/inetd.conf; then
pascal@21251 51 cat >> $1/etc/inetd.conf <<EOT
pascal@21251 52 exec stream tcp nowait root /usr/sbin/in.execd execd
pascal@21251 53 login stream tcp nowait root /usr/sbin/in.rlogind rlogind -hl
pascal@21251 54 shell stream tcp nowait root /usr/sbin/in.rshd rshd -hl
pascal@21251 55 EOT
pascal@21251 56 [ -n "$1" ] || killall -HUP inetd
pascal@21251 57 fi
pascal@21251 58 }
pascal@21251 59
pascal@21251 60 # Pre and post install commands for Tazpkg.
pascal@21251 61 pre_remove()
pascal@21251 62 {
pascal@21251 63 sed -i '/rlogind/d;/rshd/d;/rexec/d' $1/etc/inetd.conf
pascal@21251 64 [ -n "$1" ] || killall -HUP inetd
pascal@21251 65 }