wok-next annotate ppp/receipt @ rev 18940
Up musl-libc (1.1.14) CVE-2015-1817
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Mar 02 11:58:42 2016 +0100 (2016-03-02) |
parents | 5c05d949d429 |
children | 0c85455b2f3b |
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@1634 | 12 CONFIG_FILES="/etc/ppp" |
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 { |
pankso@16194 | 21 ./configure --prefix=/usr \ |
pascal@18019 | 22 $CONFIGURE_ARGS && |
pascal@1634 | 23 make && |
pascal@11797 | 24 make DESTDIR=$DESTDIR/usr install |
pankso@6 | 25 } |
pankso@6 | 26 |
pankso@6 | 27 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@6 | 28 genpkg_rules() |
pankso@6 | 29 { |
pascal@18025 | 30 mkdir -p $fs/usr $fs/var/www/tazpanel/menu.d/network/VPN |
pascal@15603 | 31 cp -a $install/usr/sbin $fs/usr |
pankso@16194 | 32 [ -d "$install/usr/lib" ] && cp -a $install/usr/lib $fs/usr |
pascal@15968 | 33 cp -a $stuff/pppnc-server $fs/usr/sbin |
pascal@15968 | 34 ln $fs/usr/sbin/pppnc-server $fs/usr/sbin/pppnc-client |
pascal@18017 | 35 cp -a $stuff/ppp.cgi $fs/var/www/tazpanel |
pascal@18017 | 36 ln -s ../../ppp.cgi $fs/var/www/tazpanel/menu.d/network/ppp |
pascal@18025 | 37 ln -s ../../../ppp.cgi $fs/var/www/tazpanel/menu.d/network/VPN/ppp |
pascal@18017 | 38 |
pankso@6 | 39 # Config files. |
pascal@15885 | 40 mkdir -p $fs/etc/ppp/scripts $fs/etc/ppp/ip-up.d $fs/etc/ppp/ip-down.d |
slaxemulator@9475 | 41 cp $stuff/README.scripts $fs/etc/ppp |
pankso@6 | 42 cp -a $src/etc.ppp/* $fs/etc/ppp |
domcox@12173 | 43 |
pankso@6 | 44 # PPP scripts. |
pankso@6 | 45 cp -a $src/scripts/ppp-on $fs/etc/ppp/scripts |
pankso@6 | 46 cp -a $src/scripts/ppp-on-dialer $fs/etc/ppp/scripts |
pankso@16194 | 47 sed -i 's:ppp/ppp-on-dialer:ppp/scripts/ppp-on-dialer:' \ |
pankso@16194 | 48 $fs/etc/ppp/scripts/ppp-on |
jozee@5104 | 49 |
pankso@6 | 50 cp -a $src/scripts/ppp-off $fs/etc/ppp/scripts |
pankso@6 | 51 cp -a $src/scripts/callback $fs/etc/ppp/scripts |
pankso@6 | 52 cp -a $src/scripts/redialer $fs/etc/ppp/scripts |
trixar_za@12286 | 53 cat >> $fs/etc/ppp/ip-up <<EOT |
pascal@15886 | 54 #!/bin/sh |
pascal@15886 | 55 |
pascal@15885 | 56 if [ -x /etc/ppp/ip-up.d/\$6 ]; then |
pascal@15885 | 57 . /etc/ppp/ip-up.d/\$6 "\$@" |
pascal@15885 | 58 elif [ -n "\$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then |
trixar_za@12286 | 59 rm -f /etc/ppp/resolv.prev |
trixar_za@12286 | 60 if [ -f /etc/resolv.conf ]; then |
trixar_za@12286 | 61 cp /etc/resolv.conf /etc/ppp/resolv.prev |
trixar_za@12286 | 62 grep domain /etc/ppp/resolv.prev > /etc/resolv.conf |
trixar_za@12286 | 63 grep search /etc/ppp/resolv.prev >> /etc/resolv.conf |
trixar_za@12286 | 64 cat /etc/ppp/resolv.conf >> /etc/resolv.conf |
trixar_za@12286 | 65 chmod 644 /etc/resolv.conf |
trixar_za@12286 | 66 else |
trixar_za@12286 | 67 cp /etc/ppp/resolv.conf /etc |
trixar_za@12286 | 68 chmod 644 /etc/resolv.conf |
trixar_za@12286 | 69 fi |
trixar_za@12286 | 70 fi |
trixar_za@12286 | 71 EOT |
trixar_za@12286 | 72 cat >> $fs/etc/ppp/ip-down <<EOT |
pascal@15886 | 73 #!/bin/sh |
pascal@15886 | 74 |
pascal@15885 | 75 if [ -x /etc/ppp/ip-down.d/\$6 ]; then |
pascal@15885 | 76 . /etc/ppp/ip-down.d/\$6 "\$@" |
pascal@15885 | 77 elif [ -n "\$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then |
trixar_za@12286 | 78 if [ -f /etc/ppp/resolv.prev ]; then |
trixar_za@12286 | 79 cp -f /etc/ppp/resolv.prev /etc/resolv.conf |
trixar_za@12286 | 80 chmod 644 /etc/resolv.conf |
trixar_za@12286 | 81 else |
trixar_za@12286 | 82 rm -f /etc/resolv.conf |
trixar_za@12286 | 83 fi |
trixar_za@12286 | 84 fi |
trixar_za@12286 | 85 EOT |
trixar_za@12286 | 86 # cp -a $src/scripts/ip-up.local.add $fs/etc/ppp/ip-up |
trixar_za@12286 | 87 # cp -a $src/scripts/ip-down.local.add $fs/etc/ppp/ip-down |
pascal@15885 | 88 chmod 711 $fs/etc/ppp/ip-up $fs/etc/ppp/ip-down |
domcox@12173 | 89 |
jozee@5092 | 90 # insert #!/bin/sh on top line in ip* scripts |
pankso@16194 | 91 sed -i '1i\#!/bin/sh' $fs/etc/ppp/ip* 2>/dev/null |
jozee@5104 | 92 # add empty peers dir |
jozee@5104 | 93 mkdir -p $fs/etc/ppp/peers |
domcox@12174 | 94 # hide login/pass from regular users |
domcox@12174 | 95 chmod go-rwx $fs/etc/ppp/*secrets |
domcox@12174 | 96 chmod go-rwx $fs/etc/ppp/options |
domcox@12174 | 97 chmod 711 $fs/etc/ppp/scripts/* |
pascal@15886 | 98 } |