wok annotate ppp/receipt @ rev 15666

Add ddumbfs
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Dec 13 16:18:29 2013 +0000 (2013-12-13)
parents b768ede0c5cb
children 7710488e9e49
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"
pascal@14698 8 LICENSE="BSD GPL"
pankso@6 9 TARBALL="$PACKAGE-$VERSION.tar.gz"
pankso@6 10 WEB_SITE="http://ppp.samba.org/"
pankso@6 11 WGET_URL="ftp://ftp.samba.org/pub/ppp/$TARBALL"
pascal@1634 12 CONFIG_FILES="/etc/ppp"
pankso@6 13
pankso@6 14 # Rules to configure and make the package.
pankso@6 15 compile_rules()
pankso@6 16 {
pankso@6 17 cd $src
pascal@11799 18 if ! grep -qs pppol2tpv3_addr include/linux/if_pppol2tp.h ; then
pascal@11799 19 sed -i /#endif/d include/linux/if_pppol2tp.h
pascal@11799 20 cat >> include/linux/if_pppol2tp.h <<EOT
pascal@11797 21 /* The L2TPv3 protocol changes tunnel and session ids from 16 to 32
pascal@11797 22 * bits. So we need a different sockaddr structure.
pascal@11797 23 */
pascal@11797 24 struct pppol2tpv3_addr {
pascal@11797 25 pid_t pid; /* pid that owns the fd. 0 => current */
pascal@11797 26 int fd; /* FD of UDP or IP socket to use */
pascal@11797 27 struct sockaddr_in addr; /* IP address and port to send to */
pascal@11797 28 __u32 s_tunnel, s_session; /* For matching incoming packets */
pascal@11797 29 __u32 d_tunnel, d_session; /* For sending outgoing packets */
pascal@11797 30 };
pascal@11798 31 #endif
pascal@11797 32 EOT
pascal@11799 33 fi
pankso@6 34 ./configure --prefix=/usr --mandir=/usr/share/man \
pascal@1634 35 $CONFIGURE_ARGS &&
pascal@1634 36 make &&
pascal@11797 37 make DESTDIR=$DESTDIR/usr install
pankso@6 38 }
pankso@6 39
pankso@6 40 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@6 41 genpkg_rules()
pankso@6 42 {
pankso@6 43 mkdir -p $fs/usr
pascal@15603 44 cp -a $install/usr/sbin $fs/usr
pascal@15603 45 cp -a $install/usr/lib $fs/usr
pankso@6 46 # Config files.
pankso@6 47 mkdir -p $fs/etc/ppp/scripts
slaxemulator@9475 48 cp $stuff/README.scripts $fs/etc/ppp
pankso@6 49 cp -a $src/etc.ppp/* $fs/etc/ppp
domcox@12173 50
pankso@6 51 # PPP scripts.
pankso@6 52 cp -a $src/scripts/ppp-on $fs/etc/ppp/scripts
pankso@6 53 cp -a $src/scripts/ppp-on-dialer $fs/etc/ppp/scripts
domcox@12173 54 sed -i 's:ppp/ppp-on-dialer:ppp/scripts/ppp-on-dialer:' $fs/etc/ppp/scripts/ppp-on
jozee@5104 55
pankso@6 56 cp -a $src/scripts/ppp-off $fs/etc/ppp/scripts
pankso@6 57 cp -a $src/scripts/callback $fs/etc/ppp/scripts
pankso@6 58 cp -a $src/scripts/redialer $fs/etc/ppp/scripts
trixar_za@12286 59 cat >> $fs/etc/ppp/ip-up <<EOT
trixar_za@12286 60 if [ -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
trixar_za@12286 75 if [ -n "$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
trixar_za@12286 76 if [ -f /etc/ppp/resolv.prev ]; then
trixar_za@12286 77 cp -f /etc/ppp/resolv.prev /etc/resolv.conf
trixar_za@12286 78 chmod 644 /etc/resolv.conf
trixar_za@12286 79 else
trixar_za@12286 80 rm -f /etc/resolv.conf
trixar_za@12286 81 fi
trixar_za@12286 82 fi
trixar_za@12286 83 EOT
trixar_za@12286 84 # cp -a $src/scripts/ip-up.local.add $fs/etc/ppp/ip-up
trixar_za@12286 85 # cp -a $src/scripts/ip-down.local.add $fs/etc/ppp/ip-down
domcox@12174 86 chmod 711 $fs/etc/ppp/ip*
domcox@12173 87
jozee@5092 88 # insert #!/bin/sh on top line in ip* scripts
jozee@5102 89 sed -i '1i\#!/bin/sh' $fs/etc/ppp/ip*
jozee@5104 90 # add empty peers dir
jozee@5104 91 mkdir -p $fs/etc/ppp/peers
domcox@12174 92 # hide login/pass from regular users
domcox@12174 93 chmod go-rwx $fs/etc/ppp/*secrets
domcox@12174 94 chmod go-rwx $fs/etc/ppp/options
domcox@12174 95 chmod 711 $fs/etc/ppp/scripts/*
trixar_za@12286 96 }