wok annotate ppp/receipt @ rev 19352
Up ncdu (1.11)
author | Paul Issott <paul@slitaz.org> |
---|---|
date | Sun Jul 24 19:13:10 2016 +0100 (2016-07-24) |
parents | 0c85455b2f3b |
children | 50aef5b483cb |
rev | line source |
---|---|
pankso@6 | 1 # SliTaz package receipt. |
pankso@6 | 2 |
pankso@6 | 3 PACKAGE="ppp" |
pascal@18019 | 4 VERSION="2.4.7" |
pankso@203 | 5 CATEGORY="network" |
pankso@6 | 6 SHORT_DESC="Implements the Point-to-Point Protocol (PPP)." |
pankso@6 | 7 MAINTAINER="pankso@slitaz.org" |
pascal@14698 | 8 LICENSE="BSD GPL" |
pankso@6 | 9 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pankso@6 | 10 WEB_SITE="http://ppp.samba.org/" |
pascal@18019 | 11 WGET_URL="https://github.com/paulusmack/ppp/archive/$TARBALL" |
pascal@19305 | 12 CONFIG_FILES="/etc/ppp/options /etc/ppp/*secrets" |
pankso@16194 | 13 HOST_ARCH="i486 arm" |
pankso@6 | 14 |
pascal@18043 | 15 BUILD_DEPENDS="wget" |
pascal@18017 | 16 SUGGESTED="tazpanel" |
pascal@18017 | 17 |
pankso@6 | 18 # Rules to configure and make the package. |
pankso@6 | 19 compile_rules() |
pankso@6 | 20 { |
pascal@19089 | 21 case "$ARCH" in |
pascal@19089 | 22 arm*) |
pascal@19089 | 23 export PATH=/cross/arm/tools/arm-slitaz-linux-gnueabi/bin:$PATH |
pascal@19089 | 24 esac |
pankso@16194 | 25 ./configure --prefix=/usr \ |
pascal@18019 | 26 $CONFIGURE_ARGS && |
pascal@1634 | 27 make && |
pascal@11797 | 28 make DESTDIR=$DESTDIR/usr install |
pankso@6 | 29 } |
pankso@6 | 30 |
pankso@6 | 31 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@6 | 32 genpkg_rules() |
pankso@6 | 33 { |
pascal@18025 | 34 mkdir -p $fs/usr $fs/var/www/tazpanel/menu.d/network/VPN |
pascal@15603 | 35 cp -a $install/usr/sbin $fs/usr |
pankso@16194 | 36 [ -d "$install/usr/lib" ] && cp -a $install/usr/lib $fs/usr |
pascal@15968 | 37 cp -a $stuff/pppnc-server $fs/usr/sbin |
pascal@15968 | 38 ln $fs/usr/sbin/pppnc-server $fs/usr/sbin/pppnc-client |
pascal@18017 | 39 cp -a $stuff/ppp.cgi $fs/var/www/tazpanel |
pascal@18017 | 40 ln -s ../../ppp.cgi $fs/var/www/tazpanel/menu.d/network/ppp |
pascal@18025 | 41 ln -s ../../../ppp.cgi $fs/var/www/tazpanel/menu.d/network/VPN/ppp |
pascal@18017 | 42 |
pankso@6 | 43 # Config files. |
pascal@15885 | 44 mkdir -p $fs/etc/ppp/scripts $fs/etc/ppp/ip-up.d $fs/etc/ppp/ip-down.d |
slaxemulator@9475 | 45 cp $stuff/README.scripts $fs/etc/ppp |
pankso@6 | 46 cp -a $src/etc.ppp/* $fs/etc/ppp |
domcox@12173 | 47 |
pankso@6 | 48 # PPP scripts. |
pankso@6 | 49 cp -a $src/scripts/ppp-on $fs/etc/ppp/scripts |
pankso@6 | 50 cp -a $src/scripts/ppp-on-dialer $fs/etc/ppp/scripts |
pankso@16194 | 51 sed -i 's:ppp/ppp-on-dialer:ppp/scripts/ppp-on-dialer:' \ |
pankso@16194 | 52 $fs/etc/ppp/scripts/ppp-on |
jozee@5104 | 53 |
pankso@6 | 54 cp -a $src/scripts/ppp-off $fs/etc/ppp/scripts |
pankso@6 | 55 cp -a $src/scripts/callback $fs/etc/ppp/scripts |
pankso@6 | 56 cp -a $src/scripts/redialer $fs/etc/ppp/scripts |
trixar_za@12286 | 57 cat >> $fs/etc/ppp/ip-up <<EOT |
pascal@15886 | 58 #!/bin/sh |
pascal@15886 | 59 |
pascal@15885 | 60 if [ -x /etc/ppp/ip-up.d/\$6 ]; then |
pascal@15885 | 61 . /etc/ppp/ip-up.d/\$6 "\$@" |
pascal@15885 | 62 elif [ -n "\$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then |
trixar_za@12286 | 63 rm -f /etc/ppp/resolv.prev |
trixar_za@12286 | 64 if [ -f /etc/resolv.conf ]; then |
trixar_za@12286 | 65 cp /etc/resolv.conf /etc/ppp/resolv.prev |
trixar_za@12286 | 66 grep domain /etc/ppp/resolv.prev > /etc/resolv.conf |
trixar_za@12286 | 67 grep search /etc/ppp/resolv.prev >> /etc/resolv.conf |
trixar_za@12286 | 68 cat /etc/ppp/resolv.conf >> /etc/resolv.conf |
trixar_za@12286 | 69 chmod 644 /etc/resolv.conf |
trixar_za@12286 | 70 else |
trixar_za@12286 | 71 cp /etc/ppp/resolv.conf /etc |
trixar_za@12286 | 72 chmod 644 /etc/resolv.conf |
trixar_za@12286 | 73 fi |
trixar_za@12286 | 74 fi |
trixar_za@12286 | 75 EOT |
trixar_za@12286 | 76 cat >> $fs/etc/ppp/ip-down <<EOT |
pascal@15886 | 77 #!/bin/sh |
pascal@15886 | 78 |
pascal@15885 | 79 if [ -x /etc/ppp/ip-down.d/\$6 ]; then |
pascal@15885 | 80 . /etc/ppp/ip-down.d/\$6 "\$@" |
pascal@15885 | 81 elif [ -n "\$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then |
trixar_za@12286 | 82 if [ -f /etc/ppp/resolv.prev ]; then |
trixar_za@12286 | 83 cp -f /etc/ppp/resolv.prev /etc/resolv.conf |
trixar_za@12286 | 84 chmod 644 /etc/resolv.conf |
trixar_za@12286 | 85 else |
trixar_za@12286 | 86 rm -f /etc/resolv.conf |
trixar_za@12286 | 87 fi |
trixar_za@12286 | 88 fi |
trixar_za@12286 | 89 EOT |
trixar_za@12286 | 90 # cp -a $src/scripts/ip-up.local.add $fs/etc/ppp/ip-up |
trixar_za@12286 | 91 # cp -a $src/scripts/ip-down.local.add $fs/etc/ppp/ip-down |
pascal@15885 | 92 chmod 711 $fs/etc/ppp/ip-up $fs/etc/ppp/ip-down |
domcox@12173 | 93 |
jozee@5092 | 94 # insert #!/bin/sh on top line in ip* scripts |
pankso@16194 | 95 sed -i '1i\#!/bin/sh' $fs/etc/ppp/ip* 2>/dev/null |
jozee@5104 | 96 # add empty peers dir |
jozee@5104 | 97 mkdir -p $fs/etc/ppp/peers |
domcox@12174 | 98 # hide login/pass from regular users |
domcox@12174 | 99 chmod go-rwx $fs/etc/ppp/*secrets |
domcox@12174 | 100 chmod go-rwx $fs/etc/ppp/options |
domcox@12174 | 101 chmod 711 $fs/etc/ppp/scripts/* |
pascal@15886 | 102 } |