# SliTaz package receipt. PACKED_SIZE="124.0K" UNPACKED_SIZE="336.0K" PACKAGE="ppp" VERSION="2.4.5" CATEGORY="tiny-slitaz" SHORT_DESC="Point to Point Protocol (Internet with RTC modems)" MAINTAINER="pascal.bellard@slitaz.org" TARBALL="$PACKAGE-$VERSION.tar.gz" WEB_SITE="http://ppp.samba.org/" WGET_URL="ftp://ftp.samba.org/pub/ppp/$TARBALL" [ -n "$TARGET" ] || TARGET="i486" BUILD_DEPENDS="uclibc-cross-compiler-$TARGET" DEPENDS="libdl libgcc_s" CONFIG_FILES="/etc/ppp/" # Rules to configure and make the package. compile_rules() { cd $src ./configure --prefix=/usr --mandir=/usr/share/man \ $CONFIGURE_ARGS && make CC=uclibc-$TARGET-cc && make DESTDIR=$PWD/_pkg/usr install } # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { mkdir -p $fs/etc/ppp/peers $fs/etc/ppp/scripts $fs/usr/sbin cp -a $_pkg/usr/sbin/pppd $fs/usr/sbin cp -a $src/scripts/ip-up.local.add $fs/etc/ppp/ip-up cp -a $src/scripts/ip-down.local.add $fs/etc/ppp/ip-down cp -a stuff/* $fs cp -a $src/scripts/ppp-on $fs/etc/ppp/scripts cp -a $src/scripts/ppp-on-dialer $fs/etc/ppp/scripts cp -a $src/scripts/ppp-off $fs/etc/ppp/scripts cp -a $src/scripts/callback $fs/etc/ppp/scripts cp -a $src/scripts/redialer $fs/etc/ppp/scripts cp -a $src/etc.ppp/* $fs/etc/ppp chmod +x $fs/etc/ppp/ip* # insert #!/bin/sh on top line in ip* scripts sed -i '1i\#!/bin/sh' $fs/etc/ppp/ip* # add empty peers dir sed -i 's:ppp/ppp-on-dialer:ppp/scripts/ppp-on-dialer:' \ $fs/etc/ppp/scripts/ppp-on #sed: taz/ppp-2.4.5/fs/etc/ppp/scripts/ppp-on: Not a directory } config_form() { [ -n "$OPTIONS" ] || OPTIONS="lock" [ -n "$LOCAL_IP" ] || LOCAL_IP="0.0.0.0" [ -n "$REMOTE_IP" ] || REMOTE_IP="0.0.0.0" [ -n "$NETMASK" ] || NETMASK="255.255.255.0" cat < $(cat $1/etc/ppp/README.scripts)
Telephone number
Account name
Account password
callback password
Options
$(cat $1/etc/ppp/chap-secrets)
chap-secrets
$(cat $1/etc/ppp/pap-secrets)
pap-secrets
Connection script
local ip
remote ip
netmask
EOT } post_install() { rm -f $1/etc/ppp/README.scripts cat > $1/etc/ppp/options <> $1/etc/ppp/pap-secrets <> $1/etc/ppp/chap-secrets <