Bump pppd to 2.4.5 and convert to Makefile.autotools.in

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This commit is contained in:
Gustavo Zacarias 2010-03-17 15:36:13 -03:00 committed by Peter Korsgaard
parent 8c57332bb8
commit d63e78cddc
3 changed files with 58 additions and 103 deletions

View File

@ -13,4 +13,3 @@ config BR2_PACKAGE_PPPD_FILTER
Packet filtering abilities for pppd. If enabled, Packet filtering abilities for pppd. If enabled,
the pppd active-filter and pass-filter options the pppd active-filter and pass-filter options
are available. are available.

View File

@ -1,21 +0,0 @@
diff -Nura ppp-2.4.4/pppd/plugins/rp-pppoe/discovery.c ppp-2.4.4-nobsd/pppd/plugins/rp-pppoe/discovery.c
--- ppp-2.4.4/pppd/plugins/rp-pppoe/discovery.c 2005-03-22 07:22:32.000000000 -0300
+++ ppp-2.4.4-nobsd/pppd/plugins/rp-pppoe/discovery.c 2009-02-17 09:01:27.000000000 -0200
@@ -598,7 +598,7 @@
do {
padiAttempts++;
if (padiAttempts > MAX_PADI_ATTEMPTS) {
- warn("Timeout waiting for PADO packets");
+ syslog(LOG_WARNING, "Timeout waiting for PADO packets");
close(conn->discoverySocket);
conn->discoverySocket = -1;
return;
@@ -627,7 +627,7 @@
do {
padrAttempts++;
if (padrAttempts > MAX_PADI_ATTEMPTS) {
- warn("Timeout waiting for PADS packets");
+ syslog(LOG_WARNING, "Timeout waiting for PADS packets");
close(conn->discoverySocket);
conn->discoverySocket = -1;
return;

View File

@ -3,95 +3,72 @@
# pppd # pppd
# #
############################################################# #############################################################
PPPD_VERSION:=2.4.4
PPPD_SOURCE:=ppp-$(PPPD_VERSION).tar.gz
PPPD_SITE:=ftp://ftp.samba.org/pub/ppp
PPPD_DIR:=$(BUILD_DIR)/ppp-$(PPPD_VERSION)
PPPD_CAT:=$(ZCAT)
PPPD_BINARY:=pppd/pppd
PPPD_TARGET_BINARY:=usr/sbin/pppd
PPPD_VERSION = 2.4.5
PPPD_SOURCE = ppp-$(PPPD_VERSION).tar.gz
PPPD_SITE = ftp://ftp.samba.org/pub/ppp
PPPD_TARGET_BINS = chat pppd pppdump pppstats
PPPD_MANPAGES = chat pppd pppdump pppstats
PPPD_MAKE = $(MAKE) CC=$(TARGET_CC) COPTS="$(TARGET_CFLAGS)" -C $(PPPD_DIR) $(PPPD_MAKE_OPT)
$(DL_DIR)/$(PPPD_SOURCE): ifeq ($(BR2_PACKAGE_PPPD_FILTER),y)
$(call DOWNLOAD,$(PPPD_SITE),$(PPPD_SOURCE)) PPPD_DEPENDENCIES += libpcap
PPPD_MAKE_OPT += FILTER=y
endif
pppd-source: $(DL_DIR)/$(PPPD_SOURCE) ifeq ($(BR2_INET_IPV6),y)
PPPD_MAKE_OPT += HAVE_INET6=y
endif
PPPD_OPTIONS_$(BR2_INET_IPV6) += HAVE_INET6=y $(eval $(call AUTOTARGETS,package,pppd))
PPPD_OPTIONS_$(BR2_PACKAGE_PPPD_FILTER) += FILTER=y
$(PPPD_DIR)/.unpacked: $(DL_DIR)/$(PPPD_SOURCE) $(PPPD_HOOK_POST_EXTRACT):
$(PPPD_CAT) $(DL_DIR)/$(PPPD_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
toolchain/patch-kernel.sh $(PPPD_DIR) package/pppd/ pppd\*.patch
$(SED) 's/ -DIPX_CHANGE -DHAVE_MMAP//' $(PPPD_DIR)/pppd/Makefile.linux
$(SED) 's/FILTER=y/#FILTER=y/' $(PPPD_DIR)/pppd/Makefile.linux $(SED) 's/FILTER=y/#FILTER=y/' $(PPPD_DIR)/pppd/Makefile.linux
$(SED) 's,(INSTALL) -s,(INSTALL),' $(PPPD_DIR)/*/Makefile.linux
$(SED) 's,(INSTALL) -s,(INSTALL),' $(PPPD_DIR)/pppd/plugins/*/Makefile.linux
$(SED) 's/ -o root//' $(PPPD_DIR)/*/Makefile.linux
$(SED) 's/ -g daemon//' $(PPPD_DIR)/*/Makefile.linux
$(SED) 's/ifneq ($$(wildcard \/usr\/include\/pcap-bpf.h),)/ifdef FILTER/' $(PPPD_DIR)/*/Makefile.linux $(SED) 's/ifneq ($$(wildcard \/usr\/include\/pcap-bpf.h),)/ifdef FILTER/' $(PPPD_DIR)/*/Makefile.linux
touch $@ touch $@
$(PPPD_DIR)/.configured: $(PPPD_DIR)/.unpacked $(PPPD_TARGET_INSTALL_TARGET):
(cd $(PPPD_DIR); rm -rf config.cache; \ $(call MESSAGE,"Installing to target")
$(TARGET_CONFIGURE_OPTS) \ for sbin in $(PPPD_TARGET_BINS); do \
$(TARGET_CONFIGURE_ARGS) \ $(INSTALL) -D $(PPPD_DIR)/$$sbin/$$sbin \
./configure $(QUIET) \ $(TARGET_DIR)/usr/sbin/$$sbin; \
--target=$(GNU_TARGET_NAME) \ done
--host=$(GNU_TARGET_NAME) \ $(INSTALL) -D $(PPPD_DIR)/pppd/plugins/minconn.so \
--build=$(GNU_HOST_NAME) \ $(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/minconn.so
--prefix=/usr \ $(INSTALL) -D $(PPPD_DIR)/pppd/plugins/passprompt.so \
--exec-prefix=/usr \ $(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/passprompt.so
--bindir=/usr/bin \ $(INSTALL) -D $(PPPD_DIR)/pppd/plugins/passwordfd.so \
--sbindir=/usr/sbin \ $(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/passwordfd.so
--libdir=/lib \ $(INSTALL) -D $(PPPD_DIR)/pppd/plugins/pppoatm/pppoatm.so \
--libexecdir=/usr/lib \ $(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/pppoatm.so
--sysconfdir=/etc \ $(INSTALL) -D $(PPPD_DIR)/pppd/plugins/rp-pppoe/rp-pppoe.so \
--datadir=/usr/share \ $(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/rp-pppoe.so
--localstatedir=/var \ $(INSTALL) -D $(PPPD_DIR)/pppd/plugins/rp-pppoe/pppoe-discovery \
--mandir=/usr/man \ $(TARGET_DIR)/usr/sbin/pppoe-discovery
--infodir=/usr/info \ $(INSTALL) -D $(PPPD_DIR)/pppd/plugins/winbind.so \
$(DISABLE_NLS) \ $(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/winbind.so
) $(INSTALL) -D $(PPPD_DIR)/pppd/plugins/pppol2tp/openl2tp.so \
$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/openl2tp.so
$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/pppol2tp/pppol2tp.so \
$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/pppol2tp.so
$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/radius/radattr.so \
$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/radattr.so
$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/radius/radius.so \
$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/radius.so
$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/radius/radattr.so \
$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/radattr.so
for m in $(PPPD_MANPAGES); do \
$(INSTALL) -m 644 -D $(PPPD_DIR)/$$m/$$m.8 \
$(TARGET_DIR)/usr/share/man/man8/$$m.8; \
done
touch $@ touch $@
$(PPPD_DIR)/$(PPPD_BINARY): $(PPPD_DIR)/.configured $(PPPD_TARGET_UNINSTALL):
$(MAKE) CC=$(TARGET_CC) COPTS="$(TARGET_CFLAGS)" -C $(PPPD_DIR) $(PPPD_OPTIONS_y) $(call MESSAGE,"Uninstalling")
rm -f $(addprefix $(TARGET_DIR)/usr/sbin/, $(PPPD_TARGET_BINS))
$(TARGET_DIR)/$(PPPD_TARGET_BINARY): $(PPPD_DIR)/$(PPPD_BINARY) rm -f $(TARGET_DIR)/usr/sbin/pppoe-discovery
$(MAKE1) DESTDIR=$(TARGET_DIR)/usr CC=$(TARGET_CC) -C $(PPPD_DIR) install $(PPPD_OPTIONS_y) for m in $(PPPD_MANPAGES); do \
ifneq ($(BR2_ENABLE_LOCALE),y) rm -f $(TARGET_DIR)/usr/share/man/man8/$$m.8; \
rm -rf $(TARGET_DIR)/usr/share/locale done
endif rm -rf $(TARGET_DIR)/usr/lib/pppd
ifneq ($(BR2_HAVE_MANPAGES),y) rm -f $(PPPD_TARGET_INSTALL_TARGET) $(PPPD_HOOK_POST_INSTALL)
rm -rf $(TARGET_DIR)/usr/share/man
endif
ifneq ($(BR2_HAVE_INFOPAGES),y)
rm -rf $(TARGET_DIR)/usr/info
endif
rm -rf $(TARGET_DIR)/usr/share/doc
rm -rf $(TARGET_DIR)/usr/include/pppd
pppd: $(TARGET_DIR)/$(PPPD_TARGET_BINARY)
pppd-clean:
rm -f $(TARGET_DIR)/usr/sbin/pppd
rm -f $(TARGET_DIR)/usr/sbin/chat
rm -f $(TARGET_DIR)/usr/sbin/pppstatus
rm -f $(TARGET_DIR)/usr/sbin/pppdump
rm -rf $(TARGET_DIR)/etc/ppp
rm -rf $(TARGET_DIR)/usr/include/pppd
-$(MAKE) -C $(PPPD_DIR) clean
pppd-dirclean:
rm -rf $(PPPD_DIR)
#############################################################
#
# Toplevel Makefile options
#
#############################################################
ifeq ($(BR2_PACKAGE_PPPD),y)
TARGETS+=pppd
endif