4 pkgdesc="A daemon which implements the PPP protocol for dial-up networking"
6 url="http://www.samba.org/ppp/"
7 depends=('glibc' 'libpcap')
10 backup=(etc/ppp/{chap-secrets,pap-secrets,options,ip-up,ip-down})
11 source=(ftp://ftp.samba.org/pub/ppp/ppp-$pkgver.tar.gz \
12 options pon poff ppp plog pon.1 ip-up ip-down \
13 ppp-2.4.2-alt-makefile.patch \
14 ppp-2.4.2-alt-pppd-lock.patch \
15 ppp-2.4.2-alt-pppd-noresolv.patch \
16 ppp-2.3.11-alt-scripts-fixes.patch \
17 ppp-2.4.1-alt-scripts-callback.patch \
18 ppp-2.4.2-alt-opts.patch \
19 ppp-2.4.2-asp-cbcp-mps.patch \
20 ppp-20031003-alt-cleardefaultroute.patch \
21 ppp-2.4.2-alt-optsigsegv.patch \
22 ppp-2.4.2-alt-killmypg.patch \
23 ppp-2.4.2-alt-holdoffhack.patch \
24 ppp-2.4.2-lib64.patch \
25 ppp-2.4.2-fix64.patch)
26 md5sums=('362bcf218fba8afbb9afbee7471e5dac' '7a9259a8f038073eeea7e4552ff1849f'\
27 '48c024f73a80c8b69c4def22f86902cc' '2d811f8470ccdea3b8c4505a438483e9'\
28 '7561c73b557292d5ba1a9c5dbd270fde' '86cdaf133f7a79fb464f02d83afc7734'\
29 '44cc662ba9aa61dd9add3ddd4c5ded57' 'fac0c773490371ea673f4be0977a230f'\
30 'a88b40b1bf91eb5cca3762b7195e4fe2' 'edbd4a6e4dd54f6b45c0c74810fcbbca'\
31 '8533c0b631130648e3ceb28831b297a6' 'd77f3852229ae7123c33cdfc0ac0bc9e'\
32 '809e385f994bfbbf7597157d59bfb6de' 'c57fc2ba56c5b72a7fb51be6d59af0b3'\
33 '6027fdef65aaa7cd1238089faa506e3a' '3c274c165ffdc74c547ad2b02484ecf6'\
34 'fa9ab89b1a6ec1978ccc43cabacf41cf' 'ec1bef7bf0e2331512c1a0ce4e62b6fa'\
35 'ad6a81f665d6ea2e2aee8678fc9f2097' 'a9d95a8475b0e2524c1950b28d6a29de'\
36 '866c54a48d3eeb308d1e74eb1db12122' '9c4950b0a672e315e09e845ed9397eed')
39 cd $startdir/src/ppp-$pkgver
41 patch -Np1 <../ppp-2.4.2-alt-makefile.patch
42 patch -Np1 <../ppp-2.4.2-alt-pppd-lock.patch
43 patch -Np1 <../ppp-2.4.2-alt-pppd-noresolv.patch
44 patch -Np1 <../ppp-2.3.11-alt-scripts-fixes.patch
45 patch -Np1 <../ppp-2.4.1-alt-scripts-callback.patch
46 patch -Np1 <../ppp-2.4.2-alt-opts.patch
47 patch -Np1 <../ppp-2.4.2-asp-cbcp-mps.patch
48 patch -Np1 <../ppp-20031003-alt-cleardefaultroute.patch
49 patch -Np1 <../ppp-2.4.2-alt-optsigsegv.patch
50 patch -Np1 <../ppp-2.4.2-alt-killmypg.patch
51 patch -Np1 <../ppp-2.4.2-alt-holdoffhack.patch
52 patch -Np1 <../ppp-2.4.2-lib64.patch
53 patch -Np1 <../ppp-2.4.2-fix64.patch
56 sed -i "s:-O2 -pipe -Wall -g:${CFLAGS}:" pppd/Makefile.linux
57 sed -i "s:-g -O2:${CFLAGS}:" pppd/plugins/Makefile.linux
58 sed -i "s:-O2:${CFLAGS}:" pppstats/Makefile.linux
59 sed -i "s:-O2 -g -pipe:${CFLAGS}:" chat/Makefile.linux
60 sed -i "s:-O:${CFLAGS}:" pppdump/Makefile.linux
62 # enable active filter
63 sed -i "s:^#FILTER=y:FILTER=y:" pppd/Makefile.linux
64 sed -i "s:^#CBCP=y:CBCP=y:" pppd/Makefile.linux
65 sed -i "s:^LIBS = -lutil:LIBS = -lutil -lcrypt:" pppd/Makefile.linux
67 ./configure --prefix=/usr
68 make libdir=/usr/lib || return 1
69 make libdir=/usr/lib DESTDIR=$startdir/pkg install
70 install -D -m644 $startdir/src/options $startdir/pkg/etc/ppp/options
71 install -D -m755 $startdir/src/ip-up $startdir/pkg/etc/ppp/ip-up
72 install -D -m755 $startdir/src/ip-down $startdir/pkg/etc/ppp/ip-down
73 install -D -m755 $startdir/src/pon $startdir/pkg/usr/bin/pon
74 install -D -m755 $startdir/src/poff $startdir/pkg/usr/bin/poff
75 install -D -m755 $startdir/src/plog $startdir/pkg/usr/sbin/plog
76 install -D -m600 etc.ppp/pap-secrets $startdir/pkg/etc/ppp/pap-secrets
77 install -D -m600 etc.ppp/chap-secrets $startdir/pkg/etc/ppp/chap-secrets
78 install -D -m755 $startdir/src/ppp $startdir/pkg/etc/rc.d/ppp
79 install -D -m644 $startdir/src/pon.1 $startdir/pkg/usr/man/man1/pon.1
80 mkdir -p $startdir/pkg/etc/ppp/peers