wok annotate ppp/receipt @ rev 12173
ppp: fix modem dialup failing
author | Dominique Corbex <domcox@slitaz.org> |
---|---|
date | Fri Mar 23 23:07:23 2012 +0100 (2012-03-23) |
parents | 7a293959a3fa |
children | 8c84f0c8afcb |
rev | line source |
---|---|
pankso@6 | 1 # SliTaz package receipt. |
pankso@6 | 2 |
pankso@6 | 3 PACKAGE="ppp" |
jozee@5100 | 4 VERSION="2.4.5" |
pankso@203 | 5 CATEGORY="network" |
pankso@6 | 6 SHORT_DESC="Implements the Point-to-Point Protocol (PPP)." |
pankso@6 | 7 MAINTAINER="pankso@slitaz.org" |
pankso@6 | 8 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pankso@6 | 9 WEB_SITE="http://ppp.samba.org/" |
pankso@6 | 10 WGET_URL="ftp://ftp.samba.org/pub/ppp/$TARBALL" |
pascal@1634 | 11 CONFIG_FILES="/etc/ppp" |
pankso@6 | 12 |
pankso@6 | 13 # Rules to configure and make the package. |
pankso@6 | 14 compile_rules() |
pankso@6 | 15 { |
pankso@6 | 16 cd $src |
pascal@11799 | 17 if ! grep -qs pppol2tpv3_addr include/linux/if_pppol2tp.h ; then |
pascal@11799 | 18 sed -i /#endif/d include/linux/if_pppol2tp.h |
pascal@11799 | 19 cat >> include/linux/if_pppol2tp.h <<EOT |
pascal@11797 | 20 /* The L2TPv3 protocol changes tunnel and session ids from 16 to 32 |
pascal@11797 | 21 * bits. So we need a different sockaddr structure. |
pascal@11797 | 22 */ |
pascal@11797 | 23 struct pppol2tpv3_addr { |
pascal@11797 | 24 pid_t pid; /* pid that owns the fd. 0 => current */ |
pascal@11797 | 25 int fd; /* FD of UDP or IP socket to use */ |
pascal@11797 | 26 struct sockaddr_in addr; /* IP address and port to send to */ |
pascal@11797 | 27 __u32 s_tunnel, s_session; /* For matching incoming packets */ |
pascal@11797 | 28 __u32 d_tunnel, d_session; /* For sending outgoing packets */ |
pascal@11797 | 29 }; |
pascal@11798 | 30 #endif |
pascal@11797 | 31 EOT |
pascal@11799 | 32 fi |
pankso@6 | 33 ./configure --prefix=/usr --mandir=/usr/share/man \ |
pascal@1634 | 34 $CONFIGURE_ARGS && |
pascal@1634 | 35 make && |
pascal@11797 | 36 make DESTDIR=$DESTDIR/usr install |
pankso@6 | 37 } |
pankso@6 | 38 |
pankso@6 | 39 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@6 | 40 genpkg_rules() |
pankso@6 | 41 { |
pankso@6 | 42 mkdir -p $fs/usr |
pankso@6 | 43 cp -a $_pkg/usr/sbin $fs/usr |
pankso@6 | 44 cp -a $_pkg/usr/lib $fs/usr |
pankso@6 | 45 # Config files. |
pankso@6 | 46 mkdir -p $fs/etc/ppp/scripts |
slaxemulator@9475 | 47 cp $stuff/README.scripts $fs/etc/ppp |
pankso@6 | 48 cp -a $src/etc.ppp/* $fs/etc/ppp |
domcox@12173 | 49 |
pankso@6 | 50 # PPP scripts. |
pankso@6 | 51 cp -a $src/scripts/ppp-on $fs/etc/ppp/scripts |
pankso@6 | 52 cp -a $src/scripts/ppp-on-dialer $fs/etc/ppp/scripts |
domcox@12173 | 53 sed -i 's:ppp/ppp-on-dialer:ppp/scripts/ppp-on-dialer:' $fs/etc/ppp/scripts/ppp-on |
jozee@5104 | 54 |
pankso@6 | 55 cp -a $src/scripts/ppp-off $fs/etc/ppp/scripts |
pankso@6 | 56 cp -a $src/scripts/callback $fs/etc/ppp/scripts |
pankso@6 | 57 cp -a $src/scripts/redialer $fs/etc/ppp/scripts |
jozee@5092 | 58 |
jozee@5102 | 59 cp -a $src/scripts/ip-up.local.add $fs/etc/ppp/ip-up |
jozee@5102 | 60 cp -a $src/scripts/ip-down.local.add $fs/etc/ppp/ip-down |
jozee@5102 | 61 chmod +x $fs/etc/ppp/ip* |
domcox@12173 | 62 |
jozee@5092 | 63 # insert #!/bin/sh on top line in ip* scripts |
jozee@5102 | 64 sed -i '1i\#!/bin/sh' $fs/etc/ppp/ip* |
jozee@5104 | 65 # add empty peers dir |
jozee@5104 | 66 mkdir -p $fs/etc/ppp/peers |
domcox@12173 | 67 # hide data from regular users |
domcox@12173 | 68 chmod -R go-rwx $fs/etc/ppp/* |
pankso@6 | 69 } |