diff options
author | Juergen Beisert <j.beisert@pengutronix.de> | 2008-11-21 10:59:38 +0000 |
---|---|---|
committer | Juergen Beisert <j.beisert@pengutronix.de> | 2008-11-21 10:59:38 +0000 |
commit | aa91effee74bc77682e5ae4e9462470f44022c49 (patch) | |
tree | 256cc80b1cc6eccc22025eb0cc6e282ab6fa83d6 /rules/ppp.make | |
parent | 1b793413c0c273990182e081ca7be255a0591ba3 (diff) | |
download | ptxdist-aa91effee74bc77682e5ae4e9462470f44022c49.tar.gz ptxdist-aa91effee74bc77682e5ae4e9462470f44022c49.tar.xz |
* pppd: Extend configuration
- support the plugins
- add more config switches
- add correct dependencies
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@9145 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'rules/ppp.make')
-rw-r--r-- | rules/ppp.make | 165 |
1 files changed, 125 insertions, 40 deletions
diff --git a/rules/ppp.make b/rules/ppp.make index cf5e1654e..743f8e3f1 100644 --- a/rules/ppp.make +++ b/rules/ppp.make @@ -3,6 +3,7 @@ # # Copyright (C) 2003 by Marc Kleine-Budde <kleine-budde@gmx.de> for # GYRO net GmbH <info@gyro-net.de>, Hannover, Germany +# Copyright (C) 2008 by Juergen Beisert <juergen@kreuzholzen.de> # # See CREDITS for details about who has contributed to this project. # @@ -30,49 +31,63 @@ PPP_DIR := $(BUILDDIR)/$(PPP) # Get # ---------------------------------------------------------------------------- -ppp_get: $(STATEDIR)/ppp.get - -$(STATEDIR)/ppp.get: $(ppp_get_deps_default) - @$(call targetinfo, $@) - @$(call touch, $@) - $(PPP_SOURCE): - @$(call targetinfo, $@) + @$(call targetinfo) @$(call get, PPP) # ---------------------------------------------------------------------------- # Extract # ---------------------------------------------------------------------------- -ppp_extract: $(STATEDIR)/ppp.extract - -$(STATEDIR)/ppp.extract: $(ppp_extract_deps_default) - @$(call targetinfo, $@) +$(STATEDIR)/ppp.extract: + @$(call targetinfo) @$(call clean, $(PPP_DIR)) @$(call extract, PPP) @$(call patchin, PPP) - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Prepare # ---------------------------------------------------------------------------- -ppp_prepare: $(STATEDIR)/ppp.prepare - PPP_PATH := PATH=$(CROSS_PATH) -PPP_MAKEVARS := CROSS=$(CROSS_ENV) +PPP_ENV := CROSS=$(CROSS_ENV) -$(STATEDIR)/ppp.prepare: $(ppp_prepare_deps_default) - @$(call targetinfo, $@) - cd $(PPP_DIR) && \ - ./configure +# +# path to where the shared library based plugins get installed +# (and be searched at runtime) +# +PPP_SHARED_INST_PATH := /usr/lib/pppd/$(PPP_VERSION) + +$(STATEDIR)/ppp.prepare: + @$(call targetinfo) + cd $(PPP_DIR) && $(PPP_PATH) $(PPP_ENV) ./configure + +# FIXME: Should also be entries in the menu + @$(call disable_sh,$(PPP_DIR)/pppd/Makefile,MPPE=y) + +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_MS_CHAP @$(call enable_sh,$(PPP_DIR)/pppd/Makefile,CHAPMS=y) - @$(call enable_sh,$(PPP_DIR)/pppd/Makefile,USE_CRYPT=y) else @$(call disable_sh,$(PPP_DIR)/pppd/Makefile,CHAPMS=y) - @$(call disable_sh,$(PPP_DIR)/pppd/Makefile,USE_CRYPT=y) +endif + +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_MS_CBCP + @$(call enable_sh,$(PPP_DIR)/pppd/Makefile,CBCP=y) +else + @$(call disable_sh,$(PPP_DIR)/pppd/Makefile,CBCP=y) endif ifdef PTXCONF_PPP_SHADOW @@ -81,6 +96,12 @@ 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_PLUGINS @$(call enable_sh,$(PPP_DIR)/pppd/Makefile,PLUGIN=y) else @@ -93,41 +114,37 @@ ifndef PTXCONF_PPP_IPX 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, $@) + + @$(call touch) # ---------------------------------------------------------------------------- # Compile # ---------------------------------------------------------------------------- -ppp_compile: $(STATEDIR)/ppp.compile - -$(STATEDIR)/ppp.compile: $(ppp_compile_deps_default) - @$(call targetinfo, $@) +$(STATEDIR)/ppp.compile: + @$(call targetinfo) cd $(PPP_DIR) && \ - $(PPP_PATH) $(MAKE) $(PPP_MAKEVARS) $(PARALLELMFLAGS_BROKEN) - @$(call touch, $@) + $(PPP_PATH) $(MAKE) $(PPP_ENV) $(PARALLELMFLAGS_BROKEN) + @$(call touch) # ---------------------------------------------------------------------------- # Install # ---------------------------------------------------------------------------- -ppp_install: $(STATEDIR)/ppp.install - -$(STATEDIR)/ppp.install: $(ppp_install_deps_default) - @$(call targetinfo, $@) - @$(call touch, $@) +$(STATEDIR)/ppp.install: + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Target-Install # ---------------------------------------------------------------------------- -ppp_targetinstall: $(STATEDIR)/ppp.targetinstall - -$(STATEDIR)/ppp.targetinstall: $(ppp_targetinstall_deps_default) - @$(call targetinfo, $@) +$(STATEDIR)/ppp.targetinstall: + @$(call targetinfo) @$(call install_init, ppp) @$(call install_fixup, ppp,PACKAGE,ppp) @@ -138,16 +155,84 @@ $(STATEDIR)/ppp.targetinstall: $(ppp_targetinstall_deps_default) @$(call install_fixup, ppp,DEPENDS,) @$(call install_fixup, ppp,DESCRIPTION,missing) - @$(call install_copy, ppp, 0, 0, 0755, $(PPP_DIR)/pppd/pppd, /usr/sbin/pppd) - @$(call install_copy, ppp, 0, 0, 0755, $(PPP_DIR)/chat/chat, /usr/sbin/chat) + @$(call install_copy, ppp, 0, 0, 0755, \ + $(PPP_DIR)/pppd/pppd, /usr/sbin/pppd) + +ifdef PTXCONF_PPP_INST_CHAT + @$(call install_copy, ppp, 0, 0, 0755, \ + $(PPP_DIR)/chat/chat, /usr/sbin/chat) +endif # install configuration 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, 0750, /etc/init.d/pppd, n) + +ifdef PTXCONF_PPP_INST_PPPDUMP + @$(call install_copy, ppp, 0, 0, 0755, \ + $(PPP_DIR)/pppdump/pppdump, /usr/sbin/pppdump) +endif +ifdef PTXCONF_PPP_INST_PPPSTATS + @$(call install_copy, ppp, 0, 0, 0755, \ + $(PPP_DIR)/pppstats/pppstats, /usr/sbin/pppstats) +endif + +ifdef PTXCONF_PPP_PLUGINS + @$(call install_copy, ppp, 0, 0, 0755, $(PPP_SHARED_INST_PATH)) + +ifdef PTXCONF_PPP_OATM + @$(call install_copy, ppp, 0, 0, 0644, \ + $(PPP_DIR)/pppd/plugins/pppoatm/pppoatm.so, \ + $(PPP_SHARED_INST_PATH)/pppoatm.so) +endif +ifdef PTXCONF_PPP_RADIUS + @$(call install_copy, ppp, 0, 0, 0644, \ + $(PPP_DIR)/pppd/plugins/radius/radius.so, \ + $(PPP_SHARED_INST_PATH)/radius.so) +endif +ifdef PTXCONF_PPP_RADATTR + @$(call install_copy, ppp, 0, 0, 0644, \ + $(PPP_DIR)/pppd/plugins/radius/radattr.so, \ + $(PPP_SHARED_INST_PATH)/radattr.so) +endif +ifdef PTXCONF_PPP_RADREALMS + @$(call install_copy, ppp, 0, 0, 0644, \ + $(PPP_DIR)/pppd/plugins/radius/radrealms.so, \ + $(PPP_SHARED_INST_PATH)/radrealms.so) +endif +ifdef PTXCONF_PPP_OE + @$(call install_copy, ppp, 0, 0, 0644, \ + $(PPP_DIR)/pppd/plugins/rp-pppoe/rp-pppoe.so, \ + $(PPP_SHARED_INST_PATH)/rp-pppoe.so) +endif +ifdef PTXCONF_PPP_MINCONN + @$(call install_copy, ppp, 0, 0, 0644, \ + $(PPP_DIR)/pppd/plugins/minconn.so, \ + $(PPP_SHARED_INST_PATH)/minconn.so) +endif +ifdef PTXCONF_PPP_PASSPROMPT + @$(call install_copy, ppp, 0, 0, 0644, \ + $(PPP_DIR)/pppd/plugins/passprompt.so, \ + $(PPP_SHARED_INST_PATH)/passprompt.so) +endif +ifdef PTXCONF_PPP_PASSWORDFD + @$(call install_copy, ppp, 0, 0, 0644, \ + $(PPP_DIR)/pppd/plugins/passwordfd.so, \ + $(PPP_SHARED_INST_PATH)/passwordfd.so) +endif +ifdef PTXCONF_PPP_WINBIND + @$(call install_copy, ppp, 0, 0, 0644, \ + $(PPP_DIR)/pppd/plugins/winbind.so, \ + $(PPP_SHARED_INST_PATH)/winbind.so) +endif +endif @$(call install_finish, ppp) - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Clean |