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