1 ################################################################################
5 ################################################################################
8 PPPD_SOURCE
= ppp-
$(PPPD_VERSION
).
tar.gz
9 PPPD_SITE
= https
://download.samba.org
/pub
/ppp
10 PPPD_LICENSE
= LGPLv2
+, LGPL
, BSD-4c
, BSD-3c
, GPLv2
+
11 PPPD_LICENSE_FILES
= \
12 pppd
/tdb.c pppd
/plugins
/pppoatm
/COPYING \
13 pppdump
/bsd-comp.c pppd
/ccp.c pppd
/plugins
/passprompt.c
15 PPPD_MAKE_OPTS
= HAVE_INET6
=y
16 PPPD_INSTALL_STAGING
= YES
17 PPPD_TARGET_BINS
= chat pppd pppdump pppstats
19 dictionary dictionary.ascend dictionary.compat \
20 dictionary.merit dictionary.microsoft \
21 issue port-id-map realms servers radiusclient.conf
23 ifeq ($(BR2_PACKAGE_PPPD_FILTER
),y
)
24 PPPD_DEPENDENCIES
+= libpcap
25 PPPD_MAKE_OPTS
+= FILTER
=y
28 # pppd bundles some but not all of the needed kernel headers. The embedded
29 # if_pppol2tp.h is unfortunately not compatible with kernel headers > 2.6.34,
30 # and has been part of the kernel headers since 2.6.23, so drop it
31 define PPPD_DROP_INTERNAL_IF_PPOL2TP_H
32 $(RM
) $(@D
)/include/linux
/if_pppol2tp.h
35 PPPD_POST_EXTRACT_HOOKS
+= PPPD_DROP_INTERNAL_IF_PPOL2TP_H
37 # pppd defaults to /etc/ppp/resolv.conf, which not be writable and is
38 # definitely not useful since the C library only uses
39 # /etc/resolv.conf. Therefore, we change pppd to use /etc/resolv.conf
41 define PPPD_SET_RESOLV_CONF
42 $(SED
) 's,ppp/resolv.conf,resolv.conf,' $(@D
)/pppd
/pathnames.h
44 PPPD_POST_EXTRACT_HOOKS
+= PPPD_SET_RESOLV_CONF
46 define PPPD_CONFIGURE_CMDS
47 $(SED
) 's/FILTER=y/#FILTER=y/' $(PPPD_DIR
)/pppd
/Makefile.linux
48 $(SED
) 's/ifneq ($$(wildcard \/usr\/include\/pcap-bpf.h),)/ifdef FILTER/' $(PPPD_DIR
)/*/Makefile.linux
49 ( cd
$(@D
); $(TARGET_MAKE_ENV
) .
/configure
--prefix=/usr
)
52 define PPPD_BUILD_CMDS
53 $(TARGET_MAKE_ENV
) $(MAKE
) CC
="$(TARGET_CC)" COPTS
="$(TARGET_CFLAGS)" \
54 -C
$(@D
) $(PPPD_MAKE_OPTS
)
57 ifeq ($(BR2_PACKAGE_PPPD_RADIUS
),y
)
58 define PPPD_INSTALL_RADIUS
59 $(INSTALL
) -D
$(PPPD_DIR
)/pppd
/plugins
/radius
/radattr.so \
60 $(TARGET_DIR
)/usr
/lib
/pppd
/$(PPPD_VERSION
)/radattr.so
61 $(INSTALL
) -D
$(PPPD_DIR
)/pppd
/plugins
/radius
/radius.so \
62 $(TARGET_DIR
)/usr
/lib
/pppd
/$(PPPD_VERSION
)/radius.so
63 $(INSTALL
) -D
$(PPPD_DIR
)/pppd
/plugins
/radius
/radrealms.so \
64 $(TARGET_DIR
)/usr
/lib
/pppd
/$(PPPD_VERSION
)/radrealms.so
65 for m in
$(PPPD_RADIUS_CONF
); do \
66 $(INSTALL
) -m
644 -D
$(PPPD_DIR
)/pppd
/plugins
/radius
/etc
/$$m \
67 $(TARGET_DIR
)/etc
/ppp
/radius
/$$m; \
69 $(SED
) 's:/usr/local/etc:/etc:' \
70 $(TARGET_DIR
)/etc
/ppp
/radius
/radiusclient.conf
71 $(SED
) 's:/usr/local/sbin:/usr/sbin:' \
72 $(TARGET_DIR
)/etc
/ppp
/radius
/radiusclient.conf
73 $(SED
) 's:/etc/radiusclient:/etc/ppp/radius:g' \
74 $(TARGET_DIR
)/etc
/ppp
/radius
/*
78 define PPPD_INSTALL_TARGET_CMDS
79 for sbin in
$(PPPD_TARGET_BINS
); do \
80 $(INSTALL
) -D
$(PPPD_DIR
)/$$sbin/$$sbin \
81 $(TARGET_DIR
)/usr
/sbin
/$$sbin; \
83 $(INSTALL
) -D
$(PPPD_DIR
)/pppd
/plugins
/minconn.so \
84 $(TARGET_DIR
)/usr
/lib
/pppd
/$(PPPD_VERSION
)/minconn.so
85 $(INSTALL
) -D
$(PPPD_DIR
)/pppd
/plugins
/passprompt.so \
86 $(TARGET_DIR
)/usr
/lib
/pppd
/$(PPPD_VERSION
)/passprompt.so
87 $(INSTALL
) -D
$(PPPD_DIR
)/pppd
/plugins
/passwordfd.so \
88 $(TARGET_DIR
)/usr
/lib
/pppd
/$(PPPD_VERSION
)/passwordfd.so
89 $(INSTALL
) -D
$(PPPD_DIR
)/pppd
/plugins
/pppoatm
/pppoatm.so \
90 $(TARGET_DIR
)/usr
/lib
/pppd
/$(PPPD_VERSION
)/pppoatm.so
91 $(INSTALL
) -D
$(PPPD_DIR
)/pppd
/plugins
/rp-pppoe
/rp-pppoe.so \
92 $(TARGET_DIR
)/usr
/lib
/pppd
/$(PPPD_VERSION
)/rp-pppoe.so
93 $(INSTALL
) -D
$(PPPD_DIR
)/pppd
/plugins
/rp-pppoe
/pppoe-discovery \
94 $(TARGET_DIR
)/usr
/sbin
/pppoe-discovery
95 $(INSTALL
) -D
$(PPPD_DIR
)/pppd
/plugins
/winbind.so \
96 $(TARGET_DIR
)/usr
/lib
/pppd
/$(PPPD_VERSION
)/winbind.so
97 $(INSTALL
) -D
$(PPPD_DIR
)/pppd
/plugins
/pppol2tp
/openl2tp.so \
98 $(TARGET_DIR
)/usr
/lib
/pppd
/$(PPPD_VERSION
)/openl2tp.so
99 $(INSTALL
) -D
$(PPPD_DIR
)/pppd
/plugins
/pppol2tp
/pppol2tp.so \
100 $(TARGET_DIR
)/usr
/lib
/pppd
/$(PPPD_VERSION
)/pppol2tp.so
101 $(INSTALL
) -D
-m
0755 $(PPPD_DIR
)/scripts
/pon
$(TARGET_DIR
)/usr
/bin
/pon
102 $(INSTALL
) -D
-m
0755 $(PPPD_DIR
)/scripts
/poff
$(TARGET_DIR
)/usr
/bin
/poff
103 $(PPPD_INSTALL_RADIUS
)
106 define PPPD_INSTALL_STAGING_CMDS
107 $(TARGET_MAKE_ENV
) $(MAKE
) INSTROOT
=$(STAGING_DIR
)/ -C
$(@D
) $(PPPD_MAKE_OPTS
) install-devel
110 $(eval
$(generic-package
))