wok-next annotate ppp/receipt @ rev 21276

try to build gens-gs again
author Hans-G?nter Theisgen
date Sat Dec 07 15:51:18 2019 +0100 (2019-12-07)
parents a3c581bf52b8
children
rev   line source
pascal@20286 1 # SliTaz package receipt v2.
pankso@6 2
pankso@6 3 PACKAGE="ppp"
pascal@18019 4 VERSION="2.4.7"
pankso@203 5 CATEGORY="network"
pascal@20286 6 SHORT_DESC="Implements the Point-to-Point Protocol (PPP)"
al@21020 7 MAINTAINER="devel@slitaz.org"
pascal@14698 8 LICENSE="BSD GPL"
al@20906 9 WEB_SITE="https://ppp.samba.org/"
pankso@6 10
al@19663 11 TARBALL="$PACKAGE-$VERSION.tar.gz"
al@19663 12 WGET_URL="$GITHUB/paulusmack/ppp/tarball/ppp-$VERSION"
al@20443 13
pascal@20286 14 BUILD_DEPENDS="pam-dev"
al@21020 15 SPLIT="$PACKAGE-pam $PACKAGE-dev"
pascal@18017 16
al@20443 17 compile_rules() {
pascal@20286 18 cp -a $src $src-pam
al@19663 19 ./configure $CONFIGURE_ARGS &&
pascal@1634 20 make &&
al@21020 21 make DESTDIR=$install/usr install || return 1
pascal@20286 22
pascal@20286 23 cd $src-pam
pascal@20286 24 sed -i 's/#USE_PAM/USE_PAM/' pppd/Makefile.linux
pascal@20286 25 ./configure $CONFIGURE_ARGS &&
pascal@20286 26 make &&
al@21020 27 make DESTDIR=$install-pam/usr install
pankso@6 28 }
pankso@6 29
al@20443 30 genpkg_rules() {
pascal@20286 31 case $PACKAGE in
al@20443 32 ppp|ppp-pam)
al@20443 33 if [ $PACKAGE == 'ppp-pam' ]; then
al@20443 34 DEPENDS="pam"
al@20443 35 PROVIDE="ppp:pam"
al@20443 36 CAT="network|with PAM support"
al@20443 37 install=$install-pam
al@20443 38 fi
al@20443 39 SUGGESTED="tazpanel"
al@20443 40 CONFIG_FILES="/etc/ppp/options /etc/ppp/*secrets"
al@20443 41 mkdir -p $fs/usr $fs/var/www/tazpanel/menu.d/network/VPN
al@20443 42 cp -a $install/usr/sbin $fs/usr
pascal@20667 43 chgrp dialout $fs/usr/sbin/pppd
pascal@20667 44 chmod 4750 $fs/usr/sbin/pppd
al@20443 45 [ -d "$install/usr/lib" ] && cp -a $install/usr/lib $fs/usr
al@20443 46 cp -a $stuff/ppp.cgi $fs/var/www/tazpanel
al@20443 47 ln -s ../../ppp.cgi $fs/var/www/tazpanel/menu.d/network/ppp
al@20443 48 ln -s ../../../ppp.cgi $fs/var/www/tazpanel/menu.d/network/VPN/ppp
al@19663 49
al@20443 50 # Config files.
al@20443 51 mkdir -p $fs/etc/ppp/scripts $fs/etc/ppp/ip-up.d $fs/etc/ppp/ip-down.d
al@20443 52 cp $stuff/README.scripts $fs/etc/ppp
al@20443 53 cp -a $src/etc.ppp/* $fs/etc/ppp
domcox@12173 54
al@20443 55 # PPP scripts.
al@20443 56 cp -a $src/scripts/ppp-on $fs/etc/ppp/scripts
al@20443 57 cp -a $src/scripts/ppp-on-dialer $fs/etc/ppp/scripts
al@20443 58 sed -i 's:ppp/ppp-on-dialer:ppp/scripts/ppp-on-dialer:' \
al@20443 59 $fs/etc/ppp/scripts/ppp-on
al@19663 60
al@20443 61 cp -a $src/scripts/ppp-off $fs/etc/ppp/scripts
al@20443 62 cp -a $src/scripts/callback $fs/etc/ppp/scripts
al@20443 63 cp -a $src/scripts/redialer $fs/etc/ppp/scripts
al@20443 64 cat >> $fs/etc/ppp/ip-up <<EOT
pascal@15886 65 #!/bin/sh
pascal@15886 66
pascal@15885 67 if [ -x /etc/ppp/ip-up.d/\$6 ]; then
pascal@15885 68 . /etc/ppp/ip-up.d/\$6 "\$@"
pascal@15885 69 elif [ -n "\$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
trixar_za@12286 70 rm -f /etc/ppp/resolv.prev
trixar_za@12286 71 if [ -f /etc/resolv.conf ]; then
trixar_za@12286 72 cp /etc/resolv.conf /etc/ppp/resolv.prev
trixar_za@12286 73 grep domain /etc/ppp/resolv.prev > /etc/resolv.conf
trixar_za@12286 74 grep search /etc/ppp/resolv.prev >> /etc/resolv.conf
trixar_za@12286 75 cat /etc/ppp/resolv.conf >> /etc/resolv.conf
trixar_za@12286 76 chmod 644 /etc/resolv.conf
trixar_za@12286 77 else
trixar_za@12286 78 cp /etc/ppp/resolv.conf /etc
trixar_za@12286 79 chmod 644 /etc/resolv.conf
trixar_za@12286 80 fi
trixar_za@12286 81 fi
trixar_za@12286 82 EOT
al@20443 83 cat >> $fs/etc/ppp/ip-down <<EOT
pascal@15886 84 #!/bin/sh
pascal@15886 85
pascal@15885 86 if [ -x /etc/ppp/ip-down.d/\$6 ]; then
pascal@15885 87 . /etc/ppp/ip-down.d/\$6 "\$@"
pascal@15885 88 elif [ -n "\$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
trixar_za@12286 89 if [ -f /etc/ppp/resolv.prev ]; then
trixar_za@12286 90 cp -f /etc/ppp/resolv.prev /etc/resolv.conf
trixar_za@12286 91 chmod 644 /etc/resolv.conf
trixar_za@12286 92 else
trixar_za@12286 93 rm -f /etc/resolv.conf
trixar_za@12286 94 fi
trixar_za@12286 95 fi
trixar_za@12286 96 EOT
al@20443 97 # cp -a $src/scripts/ip-up.local.add $fs/etc/ppp/ip-up
al@20443 98 # cp -a $src/scripts/ip-down.local.add $fs/etc/ppp/ip-down
al@20443 99 chmod 711 $fs/etc/ppp/ip-up $fs/etc/ppp/ip-down
domcox@12173 100
al@20443 101 # insert #!/bin/sh on top line in ip* scripts
al@20443 102 sed -i '1i\#!/bin/sh' $fs/etc/ppp/ip* 2>/dev/null
al@20443 103 # add empty peers dir
al@20443 104 mkdir -p $fs/etc/ppp/peers
al@20443 105 # hide login/pass from regular users
al@20443 106 chmod go-rwx $fs/etc/ppp/*secrets
al@20443 107 chmod go-rwx $fs/etc/ppp/options
al@20443 108 chmod 711 $fs/etc/ppp/scripts/*
al@20443 109 ;;
al@20443 110 ppp-dev)
al@20443 111 copy include/
al@20443 112 ;;
pascal@20286 113 esac
pascal@15886 114 }