1 # $Id: PKGBUILD 66522 2010-01-31 13:12:49Z thomas $
2 # Maintainer: Thomas Baechler <thomas@archlinux.org>
7 pkgdesc="A daemon which implements the PPP protocol for dial-up networking"
9 url="http://www.samba.org/ppp/"
10 license=('custom:GPL/BSD')
12 depends=('glibc' 'libpcap>=1.0.0')
15 backup=(etc/ppp/{chap-secrets,pap-secrets,options,ip-up,ip-down})
16 source=(ftp://ftp.samba.org/pub/ppp/ppp-${pkgver}.tar.gz
29 md5sums=('4621bc56167b6953ec4071043fe0ec57'
30 '7a9259a8f038073eeea7e4552ff1849f'
31 '48c024f73a80c8b69c4def22f86902cc'
32 '2d811f8470ccdea3b8c4505a438483e9'
33 '7561c73b557292d5ba1a9c5dbd270fde'
34 '86cdaf133f7a79fb464f02d83afc7734'
35 '44cc662ba9aa61dd9add3ddd4c5ded57'
36 'e4beb16ed600b61336d50b2bd2df7cd5'
37 '2fa0671f40711e69194ccf60979f8b33'
38 '4a074d74c29625b254a1db720cb87b99'
39 '8d1be5af8e46393ba6eb273377831e38'
40 'bad87e74060b1b7a5024b83b65e7bbca')
43 cd ${srcdir}/${_realpkgname}-${pkgver}
45 # apply 'replacedefaultroute' patch
47 patch -Np1 < ../ppp-2.4.5-rdr.patch || return 1
50 # -D_GNU_SOURCE is needed for IPv6 to work apparently
51 export CFLAGS="$CFLAGS -D_GNU_SOURCE"
52 sed -i "s:-O2 -pipe -Wall -g:${CFLAGS}:" pppd/Makefile.linux
53 sed -i "s:-g -O2:${CFLAGS}:" pppd/plugins/Makefile.linux
54 sed -i "s:-O2:${CFLAGS}:" pppstats/Makefile.linux
55 sed -i "s:-O2 -g -pipe:${CFLAGS}:" chat/Makefile.linux
56 sed -i "s:-O:${CFLAGS}:" pppdump/Makefile.linux
58 # enable active filter
59 sed -i "s:^#FILTER=y:FILTER=y:" pppd/Makefile.linux
61 sed -i "s:^#HAVE_INET6=y:HAVE_INET6=y:" pppd/Makefile.linux
62 # Enable Microsoft proprietary Callback Control Protocol
63 sed -i "s:^#CBCP=y:CBCP=y:" pppd/Makefile.linux
65 ./configure --prefix=/usr
67 make DESTDIR=${pkgdir}/usr install || return 1
68 install -D -m644 ${srcdir}/options ${pkgdir}/etc/ppp/options || return 1
69 install -D -m755 ${srcdir}/ip-up ${pkgdir}/etc/ppp/ip-up || return 1
70 install -D -m755 ${srcdir}/ip-down ${pkgdir}/etc/ppp/ip-down || return 1
71 install -d -m755 ${pkgdir}/etc/ppp/ip-up.d || return 1
72 install -d -m755 ${pkgdir}/etc/ppp/ip-down.d || return 1
73 install -m755 ${srcdir}/ip-up.d.dns.sh ${pkgdir}/etc/ppp/ip-up.d/00-dns.sh || return 1
74 install -m755 ${srcdir}/ip-down.d.dns.sh ${pkgdir}/etc/ppp/ip-down.d/00-dns.sh || return 1
75 install -D -m755 ${srcdir}/pon ${pkgdir}/usr/bin/pon || return 1
76 install -D -m755 ${srcdir}/poff ${pkgdir}/usr/bin/poff || return 1
77 install -D -m755 ${srcdir}/plog ${pkgdir}/usr/sbin/plog || return 1
78 install -D -m600 etc.ppp/pap-secrets ${pkgdir}/etc/ppp/pap-secrets || return 1
79 install -D -m600 etc.ppp/chap-secrets ${pkgdir}/etc/ppp/chap-secrets || return 1
80 install -D -m755 ${srcdir}/ppp ${pkgdir}/etc/rc.d/ppp || return 1
81 install -D -m644 ${srcdir}/pon.1 ${pkgdir}/usr/share/man/man1/pon.1 || return 1
82 install -d -m755 ${pkgdir}/etc/ppp/peers || return 1