2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2003-01-18 22:27:22 +01:00
|
|
|
#
|
|
|
|
# pppd
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2003-01-18 22:27:22 +01:00
|
|
|
|
2014-08-13 16:41:56 +02:00
|
|
|
PPPD_VERSION = 2.4.7
|
2010-03-17 19:36:13 +01:00
|
|
|
PPPD_SOURCE = ppp-$(PPPD_VERSION).tar.gz
|
2015-04-20 10:22:19 +02:00
|
|
|
PPPD_SITE = https://download.samba.org/pub/ppp
|
2015-12-14 14:10:58 +01:00
|
|
|
PPPD_LICENSE = LGPLv2+, LGPL, BSD-4c, BSD-3c, GPLv2+
|
2014-12-30 08:36:23 +01:00
|
|
|
PPPD_LICENSE_FILES = \
|
|
|
|
pppd/tdb.c pppd/plugins/pppoatm/COPYING \
|
2013-10-03 22:12:41 +02:00
|
|
|
pppdump/bsd-comp.c pppd/ccp.c pppd/plugins/passprompt.c
|
|
|
|
|
2015-04-19 14:40:00 +02:00
|
|
|
PPPD_MAKE_OPTS = HAVE_INET6=y
|
2014-03-14 11:26:32 +01:00
|
|
|
PPPD_INSTALL_STAGING = YES
|
2010-03-17 19:36:13 +01:00
|
|
|
PPPD_TARGET_BINS = chat pppd pppdump pppstats
|
2014-12-30 08:36:23 +01:00
|
|
|
PPPD_RADIUS_CONF = \
|
|
|
|
dictionary dictionary.ascend dictionary.compat \
|
|
|
|
dictionary.merit dictionary.microsoft \
|
2016-10-21 19:45:56 +02:00
|
|
|
issue port-id-map realms servers radiusclient.conf
|
2003-01-18 22:27:22 +01:00
|
|
|
|
2010-03-17 19:36:13 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_PPPD_FILTER),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
PPPD_DEPENDENCIES += libpcap
|
|
|
|
PPPD_MAKE_OPTS += FILTER=y
|
2010-03-17 19:36:13 +01:00
|
|
|
endif
|
2003-01-18 22:27:22 +01:00
|
|
|
|
2012-09-11 08:59:56 +02:00
|
|
|
# pppd bundles some but not all of the needed kernel headers. The embedded
|
|
|
|
# if_pppol2tp.h is unfortunately not compatible with kernel headers > 2.6.34,
|
|
|
|
# and has been part of the kernel headers since 2.6.23, so drop it
|
|
|
|
define PPPD_DROP_INTERNAL_IF_PPOL2TP_H
|
|
|
|
$(RM) $(@D)/include/linux/if_pppol2tp.h
|
|
|
|
endef
|
|
|
|
|
|
|
|
PPPD_POST_EXTRACT_HOOKS += PPPD_DROP_INTERNAL_IF_PPOL2TP_H
|
|
|
|
|
2014-10-20 23:32:32 +02:00
|
|
|
# pppd defaults to /etc/ppp/resolv.conf, which not be writable and is
|
|
|
|
# definitely not useful since the C library only uses
|
|
|
|
# /etc/resolv.conf. Therefore, we change pppd to use /etc/resolv.conf
|
|
|
|
# instead.
|
|
|
|
define PPPD_SET_RESOLV_CONF
|
|
|
|
$(SED) 's,ppp/resolv.conf,resolv.conf,' $(@D)/pppd/pathnames.h
|
|
|
|
endef
|
|
|
|
PPPD_POST_EXTRACT_HOOKS += PPPD_SET_RESOLV_CONF
|
|
|
|
|
2010-10-06 19:34:47 +02:00
|
|
|
define PPPD_CONFIGURE_CMDS
|
2005-05-16 19:40:04 +02:00
|
|
|
$(SED) 's/FILTER=y/#FILTER=y/' $(PPPD_DIR)/pppd/Makefile.linux
|
2009-02-19 06:31:05 +01:00
|
|
|
$(SED) 's/ifneq ($$(wildcard \/usr\/include\/pcap-bpf.h),)/ifdef FILTER/' $(PPPD_DIR)/*/Makefile.linux
|
2016-10-17 18:05:48 +02:00
|
|
|
( cd $(@D); $(TARGET_MAKE_ENV) ./configure --prefix=/usr )
|
2010-10-06 19:34:47 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define PPPD_BUILD_CMDS
|
2016-10-17 18:05:48 +02:00
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" COPTS="$(TARGET_CFLAGS)" \
|
2014-09-27 21:32:38 +02:00
|
|
|
-C $(@D) $(PPPD_MAKE_OPTS)
|
2010-10-06 19:34:47 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_PPPD_RADIUS),y)
|
|
|
|
define PPPD_INSTALL_RADIUS
|
|
|
|
$(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/radrealms.so \
|
|
|
|
$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/radrealms.so
|
|
|
|
for m in $(PPPD_RADIUS_CONF); do \
|
|
|
|
$(INSTALL) -m 644 -D $(PPPD_DIR)/pppd/plugins/radius/etc/$$m \
|
|
|
|
$(TARGET_DIR)/etc/ppp/radius/$$m; \
|
|
|
|
done
|
|
|
|
$(SED) 's:/usr/local/etc:/etc:' \
|
|
|
|
$(TARGET_DIR)/etc/ppp/radius/radiusclient.conf
|
|
|
|
$(SED) 's:/usr/local/sbin:/usr/sbin:' \
|
|
|
|
$(TARGET_DIR)/etc/ppp/radius/radiusclient.conf
|
|
|
|
$(SED) 's:/etc/radiusclient:/etc/ppp/radius:g' \
|
|
|
|
$(TARGET_DIR)/etc/ppp/radius/*
|
|
|
|
endef
|
|
|
|
endif
|
2003-01-18 22:27:22 +01:00
|
|
|
|
2010-10-06 19:34:47 +02:00
|
|
|
define PPPD_INSTALL_TARGET_CMDS
|
2010-03-17 19:36:13 +01:00
|
|
|
for sbin in $(PPPD_TARGET_BINS); do \
|
|
|
|
$(INSTALL) -D $(PPPD_DIR)/$$sbin/$$sbin \
|
|
|
|
$(TARGET_DIR)/usr/sbin/$$sbin; \
|
|
|
|
done
|
|
|
|
$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/minconn.so \
|
|
|
|
$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/minconn.so
|
|
|
|
$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/passprompt.so \
|
|
|
|
$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/passprompt.so
|
|
|
|
$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/passwordfd.so \
|
|
|
|
$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/passwordfd.so
|
|
|
|
$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/pppoatm/pppoatm.so \
|
|
|
|
$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/pppoatm.so
|
|
|
|
$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/rp-pppoe/rp-pppoe.so \
|
|
|
|
$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/rp-pppoe.so
|
|
|
|
$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/rp-pppoe/pppoe-discovery \
|
|
|
|
$(TARGET_DIR)/usr/sbin/pppoe-discovery
|
|
|
|
$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/winbind.so \
|
|
|
|
$(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
|
2015-06-08 04:56:09 +02:00
|
|
|
$(INSTALL) -D -m 0755 $(PPPD_DIR)/scripts/pon $(TARGET_DIR)/usr/bin/pon
|
|
|
|
$(INSTALL) -D -m 0755 $(PPPD_DIR)/scripts/poff $(TARGET_DIR)/usr/bin/poff
|
2010-10-06 19:34:47 +02:00
|
|
|
$(PPPD_INSTALL_RADIUS)
|
|
|
|
endef
|
2003-01-18 22:27:22 +01:00
|
|
|
|
2014-03-14 11:26:32 +01:00
|
|
|
define PPPD_INSTALL_STAGING_CMDS
|
2016-10-17 18:05:48 +02:00
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) INSTROOT=$(STAGING_DIR)/ -C $(@D) $(PPPD_MAKE_OPTS) install-devel
|
2014-03-14 11:26:32 +01:00
|
|
|
endef
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(generic-package))
|