summaryrefslogtreecommitdiffstats
path: root/rules/ppp.make
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2009-07-17 11:23:50 +0000
committerMarc Kleine-Budde <mkl@pengutronix.de>2009-07-17 11:23:50 +0000
commite920ed9ca1ce3ac78bc881fcb3a7c0c21074c509 (patch)
tree72cae2909fa3dba3dce7467b8f99ce5afc46d562 /rules/ppp.make
parent7ab7fa23831fbefb37a927f836e71bdb985666af (diff)
downloadptxdist-e920ed9ca1ce3ac78bc881fcb3a7c0c21074c509.tar.gz
ptxdist-e920ed9ca1ce3ac78bc881fcb3a7c0c21074c509.tar.xz
[ppp] reworked
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@10973 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'rules/ppp.make')
-rw-r--r--rules/ppp.make122
1 files changed, 71 insertions, 51 deletions
diff --git a/rules/ppp.make b/rules/ppp.make
index 2b3590f89..98167606b 100644
--- a/rules/ppp.make
+++ b/rules/ppp.make
@@ -1,9 +1,8 @@
# -*-makefile-*-
-# $Id: pppd.make 3876 2006-01-12 20:18:48Z rsc $
#
# Copyright (C) 2003 by Marc Kleine-Budde <kleine-budde@gmx.de> for
# GYRO net GmbH <info@gyro-net.de>, Hannover, Germany
-# Copyright (C) 2008...2009 by Juergen Beisert <juergen@kreuzholzen.de>
+# 2008, 2009 by Juergen Beisert <juergen@kreuzholzen.de>
#
# See CREDITS for details about who has contributed to this project.
#
@@ -25,7 +24,7 @@ PPP_SUFFIX := tar.gz
PPP_URL := ftp://ftp.samba.org/pub/ppp/$(PPP).$(PPP_SUFFIX)
PPP_SOURCE := $(SRCDIR)/$(PPP).$(PPP_SUFFIX)
PPP_DIR := $(BUILDDIR)/$(PPP)
-
+PPP_LICENSE := BSD,GPLv2
# ----------------------------------------------------------------------------
# Get
@@ -40,10 +39,13 @@ $(PPP_SOURCE):
# ----------------------------------------------------------------------------
PPP_PATH := PATH=$(CROSS_PATH)
-PPP_ENV := $(CROSS_ENV) \
+PPP_ENV := \
TARGET_OS=Linux \
TARGET_OS_VER=$(PTXCONF_KERNEL_VERSION) \
- TARGET_OS_ARCH=$(PTXCONF_KERNEL_ARCH_STRING)
+ TARGET_OS_ARCH=$(PTXCONF_KERNEL_ARCH_STRING) \
+
+PPP_COMPILE_ENV := $(CROSS_ENV)
+PPP_MAKE_PAR := NO
#
# path to where the shared library based plugins get installed
@@ -56,13 +58,43 @@ $(STATEDIR)/ppp.prepare:
@cd $(PPP_DIR) && $(PPP_PATH) $(PPP_ENV) \
./configure --prefix=/usr --sysconfdir=/etc
-# FIXME: Should also be entries in the menu
- @$(call disable_sh,$(PPP_DIR)/pppd/Makefile,MPPE=y)
+ifdef PTXCONF_PPP_IPV6
+ @$(call enable_sh,$(PPP_DIR)/pppd/Makefile,HAVE_INET6=y)
+else
+ @$(call disable_sh,$(PPP_DIR)/pppd/Makefile,HAVE_INET6=y)
+endif
-ifdef PTXCONF_PPP_TDB
- @$(call enable_sh,$(PPP_DIR)/pppd/Makefile,USE_TDB=y)
+ifndef PTXCONF_PPP_IPX
+ @sed -i \
+ -e 's/-DIPX_CHANGE//' \
+ -e 's/ipxcp.o//' \
+ $(PPP_DIR)/pppd/Makefile
+endif
+
+ifdef PTXCONF_PPP_FILTER
+ @$(call enable_sh,$(PPP_DIR)/pppd/Makefile,FILTER=y)
else
- @$(call disable_sh,$(PPP_DIR)/pppd/Makefile,USE_TDB=y)
+ @$(call disable_sh,$(PPP_DIR)/pppd/Makefile,FILTER=y)
+endif
+
+ifdef PTXCONF_PPP_SRP
+ @$(call enable_sh,$(PPP_DIR)/pppd/Makefile,USE_SRP=y)
+else
+ @$(call disable_sh,$(PPP_DIR)/pppd/Makefile,USE_SRP=y)
+endif
+
+ifndef PTXCONF_PPP_MULTILINK
+ @$(call disable_sh,$(PPP_DIR)/pppd/Makefile,HAVE_MULTILINK=y)
+ @sed -i \
+ -e 's/-DHAVE_MULTILINK//' \
+ -e 's/multilink.o//' \
+ $(PPP_DIR)/pppd/Makefile
+endif
+
+ifdef PTXCONF_PPP_SHADOW
+ @$(call enable_sh,$(PPP_DIR)/pppd/Makefile,HAS_SHADOW=y)
+else
+ @$(call disable_sh,$(PPP_DIR)/pppd/Makefile,HAS_SHADOW=y)
endif
ifdef PTXCONF_PPP_MS_CHAP
@@ -71,10 +103,10 @@ else
@$(call disable_sh,$(PPP_DIR)/pppd/Makefile,CHAPMS=y)
endif
-ifdef PTXCONF_PPP_IPV6
- @$(call enable_sh,$(PPP_DIR)/pppd/Makefile,HAVE_INET6=y)
+ifdef PTXCONF_PPP_MPPE
+ @$(call enable_sh,$(PPP_DIR)/pppd/Makefile,MPPE=y)
else
- @$(call disable_sh,$(PPP_DIR)/pppd/Makefile,HAVE_INET6=y)
+ @$(call disable_sh,$(PPP_DIR)/pppd/Makefile,MPPE=y)
endif
ifdef PTXCONF_PPP_MS_CBCP
@@ -83,45 +115,23 @@ else
@$(call disable_sh,$(PPP_DIR)/pppd/Makefile,CBCP=y)
endif
-ifdef PTXCONF_PPP_SHADOW
- @$(call enable_sh,$(PPP_DIR)/pppd/Makefile,HAS_SHADOW=y)
-else
- @$(call disable_sh,$(PPP_DIR)/pppd/Makefile,HAS_SHADOW=y)
-endif
-
ifdef PTXCONF_PPP_NEEDS_CRYPT
@$(call enable_sh,$(PPP_DIR)/pppd/Makefile,USE_CRYPT=y)
else
@$(call disable_sh,$(PPP_DIR)/pppd/Makefile,USE_CRYPT=y)
endif
+ifdef PTXCONF_PPP_TDB
+ @$(call enable_sh,$(PPP_DIR)/pppd/Makefile,USE_TDB=y)
+else
+ @$(call disable_sh,$(PPP_DIR)/pppd/Makefile,USE_TDB=y)
+endif
+
ifdef PTXCONF_PPP_PLUGINS
@$(call enable_sh,$(PPP_DIR)/pppd/Makefile,PLUGIN=y)
else
@$(call disable_sh,$(PPP_DIR)/pppd/Makefile,PLUGIN=y)
endif
-
-ifndef PTXCONF_PPP_IPX
- @perl -p -i -e 's/-DIPX_CHANGE //' $(PPP_DIR)/pppd/Makefile
- @perl -p -i -e 's/ipxcp.o //' $(PPP_DIR)/pppd/Makefile
-endif
-
-ifndef PTXCONF_PPP_MULTILINK
- @$(call disable_sh,$(PPP_DIR)/pppd/Makefile,HAVE_MULTILINK=y)
- @perl -p -i -e 's/-DHAVE_MULTILINK //' $(PPP_DIR)/pppd/Makefile
- @perl -p -i -e 's/multilink.o //' $(PPP_DIR)/pppd/Makefile
-endif
-
- @$(call touch)
-
-# ----------------------------------------------------------------------------
-# Compile
-# ----------------------------------------------------------------------------
-
-$(STATEDIR)/ppp.compile:
- @$(call targetinfo)
- cd $(PPP_DIR) && \
- $(PPP_PATH) $(PPP_ENV) $(MAKE) $(PARALLELMFLAGS_BROKEN)
@$(call touch)
# ----------------------------------------------------------------------------
@@ -144,7 +154,7 @@ $(STATEDIR)/ppp.targetinstall:
@$(call install_fixup, ppp,PRIORITY,optional)
@$(call install_fixup, ppp,VERSION,$(PPP_VERSION))
@$(call install_fixup, ppp,SECTION,base)
- @$(call install_fixup, ppp,AUTHOR,"Robert Schwebel <r.schwebel@pengutronix.de>")
+ @$(call install_fixup, ppp,AUTHOR,"Robert Schwebel (r.schwebel@pengutronix.de)")
@$(call install_fixup, ppp,DEPENDS,)
@$(call install_fixup, ppp,DESCRIPTION,missing)
@@ -156,14 +166,14 @@ ifdef PTXCONF_PPP_INST_CHAT
$(PPP_DIR)/chat/chat, /usr/sbin/chat)
endif
-# # install configuration files (on demand only)
ifdef PTXCONF_PPP_INST_DEFAULT_CONFIG_FILES
- @$(call install_alternative, ppp, 0, 0, 0600, /etc/ppp/options, n)
- @$(call install_alternative, ppp, 0, 0, 0750, /etc/ppp/ip-up, n)
- @$(call install_alternative, ppp, 0, 0, 0750, /etc/ppp/ip-down, n)
- @$(call install_alternative, ppp, 0, 0, 0600, /etc/ppp/options.server, n)
- @$(call install_alternative, ppp, 0, 0, 0600, /etc/ppp/options.ttyS0, n)
- @$(call install_alternative, ppp, 0, 0, 0600, /etc/ppp/pap-secrets, n)
+ @$(call install_alternative, ppp, 0, 0, 0600, /etc/ppp/options)
+ @$(call install_alternative, ppp, 0, 0, 0750, /etc/ppp/ip-up)
+ @$(call install_alternative, ppp, 0, 0, 0750, /etc/ppp/ip-down)
+ @$(call install_alternative, ppp, 0, 0, 0600, /etc/ppp/pap-secrets)
+
+ @$(call install_alternative, ppp, 0, 0, 0600, /etc/ppp/peers/provider)
+ @$(call install_alternative, ppp, 0, 0, 0600, /etc/chatscripts/provider)
endif
# #
@@ -171,7 +181,7 @@ endif
# #
ifdef PTXCONF_INITMETHOD_BBINIT
ifdef PTXCONF_PPP_STARTSCRIPT
- @$(call install_alternative, ppp, 0, 0, 0755, /etc/init.d/pppd, n)
+ @$(call install_alternative, ppp, 0, 0, 0755, /etc/init.d/pppd)
@$(call install_replace, ppp, /etc/init.d/pppd, \
@PPPD_INTF@, $(PTXCONF_PPPD_INTF))
endif
@@ -187,8 +197,14 @@ ifdef PTXCONF_PPP_INST_PPPSTATS
$(PPP_DIR)/pppstats/pppstats, /usr/sbin/pppstats)
endif
+ifdef PTXCONF_PPP_INST_PONOFF
+ @$(call install_alternative, ppp, 0, 0, 0755, /usr/bin/pon)
+ @$(call install_alternative, ppp, 0, 0, 0755, /usr/bin/poff)
+endif
+
ifdef PTXCONF_PPP_PLUGINS
@$(call install_copy, ppp, 0, 0, 0755, $(PPP_SHARED_INST_PATH))
+endif
ifdef PTXCONF_PPP_OATM
@$(call install_copy, ppp, 0, 0, 0644, \
@@ -215,6 +231,11 @@ ifdef PTXCONF_PPP_OE
$(PPP_DIR)/pppd/plugins/rp-pppoe/rp-pppoe.so, \
$(PPP_SHARED_INST_PATH)/rp-pppoe.so)
endif
+ifdef PTXCONF_PPP_PLUGIN_RP_PPPOE_DISCOVERY
+ @$(call install_copy, ppp, 0, 0, 0755, \
+ $(PPP_DIR)/pppd/plugins/rp-pppoe/pppoe-discovery, \
+ $(PPP_SHARED_INST_PATH)/pppoe-discovery)
+endif
ifdef PTXCONF_PPP_MINCONN
@$(call install_copy, ppp, 0, 0, 0644, \
$(PPP_DIR)/pppd/plugins/minconn.so, \
@@ -235,7 +256,6 @@ ifdef PTXCONF_PPP_WINBIND
$(PPP_DIR)/pppd/plugins/winbind.so, \
$(PPP_SHARED_INST_PATH)/winbind.so)
endif
-endif
@$(call install_finish, ppp)
@$(call touch)