wok annotate ppp-pam/receipt @ rev 15208

Add gentorrent
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Sep 10 12:58:20 2013 +0000 (2013-09-10)
parents 7a293959a3fa
children 051931e905b0
rev   line source
pascal@2225 1 # SliTaz package receipt.
pascal@2225 2
pascal@2225 3 PACKAGE="ppp-pam"
jozee@5100 4 VERSION="2.4.5"
pascal@2225 5 CATEGORY="network"
pascal@2225 6 SHORT_DESC="Implements the Point-to-Point Protocol (PPP) with PAM support."
pascal@2225 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@14781 8 LICENSE="BSD GPL"
pascal@2225 9 SOURCE="ppp"
pascal@2225 10 TARBALL="$SOURCE-$VERSION.tar.gz"
pascal@2225 11 WEB_SITE="http://ppp.samba.org/"
pascal@2225 12 WGET_URL="ftp://ftp.samba.org/pub/ppp/$TARBALL"
pascal@2225 13 DEPENDS="pam"
pascal@2225 14 BUILD_DEPENDS="pam pam-dev"
pascal@2225 15 CONFIG_FILES="/etc/ppp"
pascal@2225 16 PROVIDE="ppp:pam"
pascal@2225 17
pascal@2225 18 # Rules to configure and make the package.
pascal@2225 19 compile_rules()
pascal@2225 20 {
pascal@2225 21 cd $src
pascal@11799 22 if ! grep -qs pppol2tpv3_addr include/linux/if_pppol2tp.h ; then
pascal@11799 23 sed -i /#endif/d include/linux/if_pppol2tp.h
pascal@11799 24 cat >> include/linux/if_pppol2tp.h <<EOT
pascal@11797 25 /* The L2TPv3 protocol changes tunnel and session ids from 16 to 32
pascal@11797 26 * bits. So we need a different sockaddr structure.
pascal@11797 27 */
pascal@11797 28 struct pppol2tpv3_addr {
pascal@11797 29 pid_t pid; /* pid that owns the fd. 0 => current */
pascal@11797 30 int fd; /* FD of UDP or IP socket to use */
pascal@11797 31 struct sockaddr_in addr; /* IP address and port to send to */
pascal@11797 32 __u32 s_tunnel, s_session; /* For matching incoming packets */
pascal@11797 33 __u32 d_tunnel, d_session; /* For sending outgoing packets */
pascal@11797 34 };
pascal@11798 35 #endif
pascal@11797 36 EOT
pascal@11799 37 fi
pascal@2225 38 sed -i 's/#USE_PAM/USE_PAM/' pppd/Makefile.linux
pascal@2225 39 ./configure --prefix=/usr --mandir=/usr/share/man \
pascal@2225 40 $CONFIGURE_ARGS &&
pascal@2225 41 make &&
pascal@11797 42 make DESTDIR=$DESTDIR/usr install
pascal@2225 43 }
pascal@2225 44
pascal@2225 45 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@2225 46 genpkg_rules()
pascal@2225 47 {
pascal@2225 48 mkdir -p $fs/usr
pascal@2225 49 cp -a $_pkg/usr/sbin $fs/usr
pascal@2225 50 cp -a $_pkg/usr/lib $fs/usr
pascal@2225 51 # Config files.
pascal@2225 52 mkdir -p $fs/etc/ppp/scripts
slaxemulator@9701 53 cp ../$SOURCE/stuff/README.scripts $fs/etc/ppp
pascal@2225 54 cp -a $src/etc.ppp/* $fs/etc/ppp
pascal@2225 55 # PPP scripts.
pascal@2225 56 cp -a $src/scripts/ppp-on $fs/etc/ppp/scripts
pascal@2225 57 cp -a $src/scripts/ppp-on-dialer $fs/etc/ppp/scripts
pascal@2225 58 sed -i 's,ppp/ppp-on-dialer,ppp/script/ppp-on-dialer,' $fs/etc/ppp/scripts/ppp-on-dialer
pascal@2225 59 cp -a $src/scripts/ppp-off $fs/etc/ppp/scripts
pascal@2225 60 cp -a $src/scripts/callback $fs/etc/ppp/scripts
pascal@2225 61 cp -a $src/scripts/redialer $fs/etc/ppp/scripts
jozee@5092 62
jozee@5092 63 cp -a $src/scripts/ip-up.local.add $fs/etc/ppp/scripts/ip-up
jozee@5092 64 cp -a $src/scripts/ip-down.local.add $fs/etc/ppp/scripts/ip-down
jozee@5092 65 chmod +x $fs/etc/ppp/scripts/ip*
jozee@5092 66 # insert #!/bin/sh on top line in ip* scripts
jozee@5092 67 sed -i '1i\#!/bin/sh' $fs/etc/ppp/scripts/ip*
pascal@2225 68 }
pascal@7632 69
pascal@7632 70 pre_remove()
pascal@7632 71 {
pascal@7632 72 tazpkg get-install ${PACKAGE%-pam}
pascal@7632 73 }