2010-04-12 23:53:08 +02:00
|
|
|
# Template file for 'ppp'
|
|
|
|
pkgname=ppp
|
|
|
|
version=2.4.5
|
2013-03-29 13:31:32 +01:00
|
|
|
revision=3
|
2010-04-12 23:53:08 +02:00
|
|
|
short_desc="PPP (Point-to-Point Protocol) daemon"
|
2013-04-14 11:13:30 +02:00
|
|
|
homepage="https://ppp.samba.org/"
|
2013-03-29 13:31:32 +01:00
|
|
|
license="BSD and LGPLv2+ and GPLv2+ and Public Domain"
|
2010-04-12 23:53:08 +02:00
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
2013-04-14 11:13:30 +02:00
|
|
|
distfiles="ftp://ftp.samba.org/pub/ppp/ppp-$version.tar.gz"
|
2010-04-12 23:53:08 +02:00
|
|
|
checksum=43317afec9299f9920b96f840414c977f0385410202d48e56d2fdb8230003505
|
|
|
|
long_desc="
|
|
|
|
This packages provides a daemon which implements the PPP protocol for
|
|
|
|
dial-up networking."
|
|
|
|
|
|
|
|
CFLAGS="-D_GNU_SOURCE"
|
|
|
|
|
2013-04-14 11:13:30 +02:00
|
|
|
makedepends="libpcap-devel"
|
2014-01-01 16:10:11 +01:00
|
|
|
conf_files="
|
|
|
|
/etc/ppp/ip-up
|
|
|
|
/etc/ppp/chap-secrets
|
|
|
|
/etc/ppp/options
|
|
|
|
/etc/ppp/ip-down
|
|
|
|
/etc/ppp/pap-secrets"
|
2010-04-12 23:53:08 +02:00
|
|
|
|
2013-04-14 11:13:30 +02:00
|
|
|
do_configure() {
|
2010-04-12 23:53:08 +02:00
|
|
|
# Custom CFLAGS.
|
2013-04-14 11:13:30 +02:00
|
|
|
sed -i "s:-O2 -pipe -Wall -g:${CFLAGS}:" \
|
2010-04-12 23:53:08 +02:00
|
|
|
${wrksrc}/pppd/Makefile.linux
|
2013-04-14 11:13:30 +02:00
|
|
|
sed -i "s:-g -O2:${CFLAGS}:" ${wrksrc}/pppd/plugins/Makefile.linux
|
|
|
|
sed -i "s:-O2:${CFLAGS}:" ${wrksrc}/pppstats/Makefile.linux
|
|
|
|
sed -i "s:-O2 -g -pipe:${CFLAGS}:" ${wrksrc}/chat/Makefile.linux
|
|
|
|
sed -i "s:-O:${CFLAGS}:" ${wrksrc}/pppdump/Makefile.linux
|
2010-04-12 23:53:08 +02:00
|
|
|
# Enable active filter
|
|
|
|
sed -i "s:^#FILTER=y:FILTER=y:" ${wrksrc}/pppd/Makefile.linux
|
|
|
|
# Enable ipv6 support
|
|
|
|
sed -i "s:^#HAVE_INET6=y:HAVE_INET6=y:" ${wrksrc}/pppd/Makefile.linux
|
|
|
|
# Enable Microsoft Proprietary Callback Control Protocol
|
2013-04-14 11:13:30 +02:00
|
|
|
sed -i "s:^#CBCP=y:CBCP=y:" ${wrksrc}/pppd/Makefile.linux
|
|
|
|
|
|
|
|
./configure --prefix=/usr
|
2010-04-12 23:53:08 +02:00
|
|
|
}
|
|
|
|
|
2013-04-14 11:13:30 +02:00
|
|
|
do_build() {
|
|
|
|
make ${makejobs}
|
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
2010-04-24 17:34:43 +02:00
|
|
|
for f in $(find ${wrksrc} -type f -name Makefile); do
|
2013-04-14 11:13:30 +02:00
|
|
|
sed -i -e "s|\$(INSTALL) -s|\$(INSTALL|g" ${f}
|
2010-04-24 17:34:43 +02:00
|
|
|
done
|
|
|
|
|
2013-04-14 11:13:30 +02:00
|
|
|
make DESTDIR=${DESTDIR}/usr install
|
|
|
|
|
2010-04-24 17:34:43 +02:00
|
|
|
chmod 755 ${DESTDIR}/usr/lib/pppd/${version}/*.so
|
|
|
|
install -m755 ${wrksrc}/pppd/pppd ${DESTDIR}/usr/sbin
|
|
|
|
|
2013-03-29 13:31:32 +01:00
|
|
|
install -m755 ${wrksrc}/chat/chat ${DESTDIR}/usr/sbin
|
2010-04-12 23:53:08 +02:00
|
|
|
install -D -m644 ${FILESDIR}/options \
|
2013-04-14 11:13:30 +02:00
|
|
|
${DESTDIR}/etc/ppp/options
|
2010-04-12 23:53:08 +02:00
|
|
|
install -D -m755 ${FILESDIR}/ip-up \
|
2013-04-14 11:13:30 +02:00
|
|
|
${DESTDIR}/etc/ppp/ip-up
|
2010-04-12 23:53:08 +02:00
|
|
|
install -D -m755 ${FILESDIR}/ip-down \
|
2013-04-14 11:13:30 +02:00
|
|
|
${DESTDIR}/etc/ppp/ip-dowm
|
|
|
|
install -d -m755 ${DESTDIR}/etc/ppp/ip-up.d
|
|
|
|
install -d -m755 ${DESTDIR}/etc/ppp/ip-down.d
|
2010-04-12 23:53:08 +02:00
|
|
|
install -m755 ${FILESDIR}/ip-up.d.dns.sh \
|
2013-04-14 11:13:30 +02:00
|
|
|
${DESTDIR}/etc/ppp/ip-up.d/00-dns.sh
|
2010-04-12 23:53:08 +02:00
|
|
|
install -m755 ${FILESDIR}/ip-down.d.dns.sh \
|
2013-04-14 11:13:30 +02:00
|
|
|
${DESTDIR}/etc/ppp/ip-down.d/00-dns.sh
|
2010-04-12 23:53:08 +02:00
|
|
|
install -D -m755 ${FILESDIR}/pon \
|
2013-04-14 11:13:30 +02:00
|
|
|
${DESTDIR}/usr/bin/pon
|
2010-04-12 23:53:08 +02:00
|
|
|
install -D -m755 ${FILESDIR}/poff \
|
2013-04-14 11:13:30 +02:00
|
|
|
${DESTDIR}/usr/bin/poff
|
2010-04-12 23:53:08 +02:00
|
|
|
install -D -m755 ${FILESDIR}/plog \
|
2013-04-14 11:13:30 +02:00
|
|
|
${DESTDIR}/usr/sbin/plog
|
2010-04-12 23:53:08 +02:00
|
|
|
install -D -m600 ${wrksrc}/etc.ppp/pap-secrets \
|
2013-04-14 11:13:30 +02:00
|
|
|
${DESTDIR}/etc/ppp/pap-secrets
|
2010-04-12 23:53:08 +02:00
|
|
|
install -D -m600 ${wrksrc}/etc.ppp/chap-secrets \
|
2013-04-14 11:13:30 +02:00
|
|
|
${DESTDIR}/etc/ppp/chap-secrets
|
2010-04-12 23:53:08 +02:00
|
|
|
#install -D -m644 ${FILESDIR}/pon.1 \
|
|
|
|
# ${DESTDIR}/usr/share/man/man1/pon.1 || return 1
|
2013-04-14 11:13:30 +02:00
|
|
|
install -d -m755 ${DESTDIR}/etc/ppp/peers
|
2010-04-12 23:53:08 +02:00
|
|
|
touch -f ${DESTDIR}/etc/ppp/peers/.empty_on_purpose
|
|
|
|
}
|
2013-04-14 11:13:30 +02:00
|
|
|
|
|
|
|
ppp-devel_package() {
|
|
|
|
noarch=yes
|
|
|
|
depends="libpcap-devel>=${version}"
|
|
|
|
short_desc+=" -- development files"
|
|
|
|
pkg_install() {
|
|
|
|
vmove usr/include
|
|
|
|
}
|
|
|
|
}
|