blob: 75c85e0923af788b594e09f3c8fa1c2a1f5343ee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
# $Id: PKGBUILD 188844 2013-06-22 15:33:40Z thomas $
# Maintainer: Thomas Baechler <thomas@archlinux.org>
pkgname=ppp
pkgver=2.4.5
pkgrel=8
pkgdesc="A daemon which implements the Point-to-Point Protocol for dial-up networking"
arch=(i686 x86_64)
url="http://www.samba.org/ppp/"
license=('custom:GPL/BSD')
depends=('glibc' 'libpcap>=1.0.0')
backup=(etc/ppp/{chap-secrets,pap-secrets,options,ip-up,ip-down,ip-down.d/00-dns.sh,ip-up.d/00-dns.sh,ipv6-up.d/00-iface-config.sh})
source=(ftp://ftp.samba.org/pub/ppp/ppp-${pkgver}.tar.gz
options
ip-up
ip-down
ip-up.d.dns.sh
ip-down.d.dns.sh
ipv6-up
ipv6-down
ipv6-up.d.iface-config.sh
ppp.systemd)
md5sums=('4621bc56167b6953ec4071043fe0ec57'
'7a9259a8f038073eeea7e4552ff1849f'
'e4beb16ed600b61336d50b2bd2df7cd5'
'529b924f644f80cf30d72a966abc7419'
'0e2eeb1af125a46291999162dcc9004a'
'3a5d56ac23e36cdbf48187813c8ec981'
'4cbd0a9af01c27067450ec7d3f5fa673'
'b75c2fbc4afa9f2d8108b680c88c7036'
'9dde53aa5a931ebe1c7e3469199777c5'
'37401eb0c3dcccb87f5ac4716d0f9f2c')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
# fix CFLAGS
# -D_GNU_SOURCE is needed for IPv6 to work apparently
export CFLAGS="$CFLAGS -D_GNU_SOURCE"
sed -i "s:-O2 -pipe -Wall -g:${CFLAGS}:" pppd/Makefile.linux
sed -i "s:-g -O2:${CFLAGS}:" pppd/plugins/Makefile.linux
sed -i "s:-O2:${CFLAGS}:" pppstats/Makefile.linux
sed -i "s:-O2 -g -pipe:${CFLAGS}:" chat/Makefile.linux
sed -i "s:-O:${CFLAGS}:" pppdump/Makefile.linux
# enable active filter
sed -i "s:^#FILTER=y:FILTER=y:" pppd/Makefile.linux
# enable ipv6 support
sed -i "s:^#HAVE_INET6=y:HAVE_INET6=y:" pppd/Makefile.linux
# Enable Microsoft proprietary Callback Control Protocol
sed -i "s:^#CBCP=y:CBCP=y:" pppd/Makefile.linux
# Fix build error with recent kernels
rm include/linux/if_pppol2tp.h
./configure --prefix=/usr
make
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}/usr" install
install -D -m644 ../options "${pkgdir}/etc/ppp/options"
install -D -m755 ../ip-up "${pkgdir}/etc/ppp/ip-up"
install -D -m755 ../ip-down "${pkgdir}/etc/ppp/ip-down"
install -d -m755 "${pkgdir}/etc/ppp/ip-up.d"
install -d -m755 "${pkgdir}/etc/ppp/ip-down.d"
install -m755 ../ip-up.d.dns.sh "${pkgdir}/etc/ppp/ip-up.d/00-dns.sh"
install -m755 ../ip-down.d.dns.sh "${pkgdir}/etc/ppp/ip-down.d/00-dns.sh"
install -D -m755 ../ipv6-up "${pkgdir}/etc/ppp/ipv6-up"
install -D -m755 ../ipv6-down "${pkgdir}/etc/ppp/ipv6-down"
install -d -m755 "${pkgdir}/etc/ppp/ipv6-up.d"
install -d -m755 "${pkgdir}/etc/ppp/ipv6-down.d"
install -m755 ../ipv6-up.d.iface-config.sh "${pkgdir}/etc/ppp/ipv6-up.d/00-iface-config.sh"
install -D -m755 scripts/pon "${pkgdir}/usr/bin/pon"
install -D -m755 scripts/poff "${pkgdir}/usr/bin/poff"
install -D -m755 scripts/plog "${pkgdir}/usr/sbin/plog"
install -D -m644 scripts/pon.1 "${pkgdir}/usr/share/man/man1/pon.1"
install -D -m600 etc.ppp/pap-secrets "${pkgdir}/etc/ppp/pap-secrets"
install -D -m600 etc.ppp/chap-secrets "${pkgdir}/etc/ppp/chap-secrets"
install -d -m755 "${pkgdir}/etc/ppp/peers"
chmod 0755 "${pkgdir}/usr/lib/pppd/${pkgver}"/*.so
install -D -m644 "${srcdir}"/ppp.systemd "${pkgdir}"/usr/lib/systemd/system/ppp@.service
# usrmove
cd "$pkgdir"/usr
mv sbin/* bin/
rmdir sbin
}
|