wok-next annotate rsh-redone/receipt @ rev 21175

rsh-redone: fix function names
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Apr 14 16:29:51 2019 +0200 (2019-04-14)
parents 459b81bc8ce6
children e752d7f70061
rev   line source
pascal@21172 1 # SliTaz package receipt v2.
pascal@21172 2
pascal@21172 3 PACKAGE="rsh-redone"
pascal@21172 4 VERSION="85"
pascal@21172 5 CATEGORY="network"
pascal@21172 6 SHORT_DESC="Reimplementation of rsh and rlogin"
pascal@21172 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@21172 8 LICENSE="GPL"
pascal@21172 9 WEB_SITE="https://packages.debian.org/source/sid/rsh-redone"
pascal@21172 10
pascal@21172 11 TARBALL="${PACKAGE}_$VERSION.orig.tar.gz"
pascal@21172 12 WGET_URL="http://ftp.de.debian.org/debian/pool/main/${PACKAGE:0:1}/$PACKAGE/$TARBALL"
pascal@21172 13
pascal@21172 14 BUILD_DEPENDS="pam-dev"
pascal@21174 15 SPLIT="rshd-redone"
pascal@21172 16
pascal@21172 17 compile_rules() {
pascal@21175 18 sed -i 's|\(-l.* \)\(-o.*\)$|\2 \1|' Makefile
pascal@21172 19 make &&
pascal@21172 20 make DESTDIR=$install install
pascal@21172 21 }
pascal@21172 22
pascal@21172 23 genpkg_rules() {
pascal@21172 24 case $PACKAGE in
pascal@21174 25 rsh-redone)
pascal@21172 26 mkdir -p $fs/usr
pascal@21172 27 cp -a $install/usr/bin $fs/usr
pascal@21174 28 PROVIDE="rsh rlogin"
pascal@21172 29 ;;
pascal@21174 30 rshd-redone)
pascal@21172 31 mkdir -p $fs/usr $fs/etc/skel
pascal@21172 32 cp -a $install/usr/sbin $fs/usr
pascal@21172 33 cp -a $install/usr/etc $fs
pascal@21172 34 touch $fs/etc/skel/.rhosts
pascal@21172 35 chmod 600 $fs/etc/skel/.rhosts
pascal@21172 36 CAT="network|rshd and rlogind"
pascal@21172 37 DEPENDS="pam"
pascal@21172 38 PROVIDE="rshd:pam rshd-pam"
pascal@21172 39 ;;
pascal@21172 40 esac
pascal@21172 41 }
pascal@21172 42
pascal@21172 43 # Pre and post install commands for Tazpkg.
pascal@21175 44 post_install_rshd_redone()
pascal@21172 45 {
pascal@21172 46 if ! grep -qs rlogind $1/etc/inetd.conf; then
pascal@21172 47 cat >> $1/etc/inetd.conf <<EOT
pascal@21172 48 login stream tcp nowait root /usr/sbin/in.rlogind rlogind
pascal@21172 49 shell stream tcp nowait root /usr/sbin/in.rshd rshd
pascal@21172 50 EOT
pascal@21172 51 [ -n "$1" ] || killall -HUP inetd
pascal@21172 52 fi
pascal@21172 53 }
pascal@21172 54
pascal@21172 55 # Pre and post install commands for Tazpkg.
pascal@21175 56 pre_remove_rshd_redone()
pascal@21172 57 {
pascal@21172 58 sed -i '/rlogind/d;/rshd/d' $1/etc/inetd.conf
pascal@21172 59 [ -n "$1" ] || killall -HUP inetd
pascal@21172 60 }