wok annotate ppp/receipt @ rev 22326
updated zbar and zbar-dev (0.10 -> 0.23)
author | Hans-G?nter Theisgen |
---|---|
date | Fri Nov 15 09:21:05 2019 +0100 (2019-11-15) |
parents | 970c5ec9a60a |
children | 1035f0e819bc |
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" |
pascal@20669 | 10 WEB_SITE="https://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@18017 | 37 cp -a $stuff/ppp.cgi $fs/var/www/tazpanel |
pascal@18017 | 38 ln -s ../../ppp.cgi $fs/var/www/tazpanel/menu.d/network/ppp |
pascal@18025 | 39 ln -s ../../../ppp.cgi $fs/var/www/tazpanel/menu.d/network/VPN/ppp |
pascal@18017 | 40 |
pankso@6 | 41 # Config files. |
pascal@15885 | 42 mkdir -p $fs/etc/ppp/scripts $fs/etc/ppp/ip-up.d $fs/etc/ppp/ip-down.d |
slaxemulator@9475 | 43 cp $stuff/README.scripts $fs/etc/ppp |
pankso@6 | 44 cp -a $src/etc.ppp/* $fs/etc/ppp |
domcox@12173 | 45 |
pankso@6 | 46 # PPP scripts. |
pankso@6 | 47 cp -a $src/scripts/ppp-on $fs/etc/ppp/scripts |
pankso@6 | 48 cp -a $src/scripts/ppp-on-dialer $fs/etc/ppp/scripts |
pankso@16194 | 49 sed -i 's:ppp/ppp-on-dialer:ppp/scripts/ppp-on-dialer:' \ |
pankso@16194 | 50 $fs/etc/ppp/scripts/ppp-on |
jozee@5104 | 51 |
pankso@6 | 52 cp -a $src/scripts/ppp-off $fs/etc/ppp/scripts |
pankso@6 | 53 cp -a $src/scripts/callback $fs/etc/ppp/scripts |
pankso@6 | 54 cp -a $src/scripts/redialer $fs/etc/ppp/scripts |
trixar_za@12286 | 55 cat >> $fs/etc/ppp/ip-up <<EOT |
pascal@15886 | 56 #!/bin/sh |
pascal@15886 | 57 |
pascal@15885 | 58 if [ -x /etc/ppp/ip-up.d/\$6 ]; then |
pascal@15885 | 59 . /etc/ppp/ip-up.d/\$6 "\$@" |
pascal@15885 | 60 elif [ -n "\$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then |
trixar_za@12286 | 61 rm -f /etc/ppp/resolv.prev |
trixar_za@12286 | 62 if [ -f /etc/resolv.conf ]; then |
trixar_za@12286 | 63 cp /etc/resolv.conf /etc/ppp/resolv.prev |
trixar_za@12286 | 64 grep domain /etc/ppp/resolv.prev > /etc/resolv.conf |
trixar_za@12286 | 65 grep search /etc/ppp/resolv.prev >> /etc/resolv.conf |
trixar_za@12286 | 66 cat /etc/ppp/resolv.conf >> /etc/resolv.conf |
trixar_za@12286 | 67 chmod 644 /etc/resolv.conf |
trixar_za@12286 | 68 else |
trixar_za@12286 | 69 cp /etc/ppp/resolv.conf /etc |
trixar_za@12286 | 70 chmod 644 /etc/resolv.conf |
trixar_za@12286 | 71 fi |
trixar_za@12286 | 72 fi |
trixar_za@12286 | 73 EOT |
trixar_za@12286 | 74 cat >> $fs/etc/ppp/ip-down <<EOT |
pascal@15886 | 75 #!/bin/sh |
pascal@15886 | 76 |
pascal@15885 | 77 if [ -x /etc/ppp/ip-down.d/\$6 ]; then |
pascal@15885 | 78 . /etc/ppp/ip-down.d/\$6 "\$@" |
pascal@15885 | 79 elif [ -n "\$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then |
trixar_za@12286 | 80 if [ -f /etc/ppp/resolv.prev ]; then |
trixar_za@12286 | 81 cp -f /etc/ppp/resolv.prev /etc/resolv.conf |
trixar_za@12286 | 82 chmod 644 /etc/resolv.conf |
trixar_za@12286 | 83 else |
trixar_za@12286 | 84 rm -f /etc/resolv.conf |
trixar_za@12286 | 85 fi |
trixar_za@12286 | 86 fi |
trixar_za@12286 | 87 EOT |
trixar_za@12286 | 88 # cp -a $src/scripts/ip-up.local.add $fs/etc/ppp/ip-up |
trixar_za@12286 | 89 # cp -a $src/scripts/ip-down.local.add $fs/etc/ppp/ip-down |
pascal@15885 | 90 chmod 711 $fs/etc/ppp/ip-up $fs/etc/ppp/ip-down |
domcox@12173 | 91 |
jozee@5092 | 92 # insert #!/bin/sh on top line in ip* scripts |
pankso@16194 | 93 sed -i '1i\#!/bin/sh' $fs/etc/ppp/ip* 2>/dev/null |
jozee@5104 | 94 # add empty peers dir |
jozee@5104 | 95 mkdir -p $fs/etc/ppp/peers |
domcox@12174 | 96 # hide login/pass from regular users |
domcox@12174 | 97 chmod go-rwx $fs/etc/ppp/*secrets |
domcox@12174 | 98 chmod go-rwx $fs/etc/ppp/options |
domcox@12174 | 99 chmod 711 $fs/etc/ppp/scripts/* |
pascal@15886 | 100 } |
pascal@20155 | 101 |
pascal@20155 | 102 post_install() |
pascal@20155 | 103 { |
pascal@20155 | 104 rm -f $1/var/cache/tazpanel/header.* 2>/dev/null || true |
pascal@20305 | 105 chroot "$1/" chgrp dialout /usr/sbin/pppd |
pascal@20305 | 106 chmod 4750 $1/usr/sbin/pppd |
pascal@20319 | 107 echo |
pascal@20305 | 108 echo " ADD yourself to group dialout to use pppd: addgroup tux dialout" |
pascal@20155 | 109 } |