summaryrefslogtreecommitdiffstats
path: root/rules/ppp.make
diff options
context:
space:
mode:
authorRobert Schwebel <r.schwebel@pengutronix.de>2006-01-16 17:30:33 +0000
committerRobert Schwebel <r.schwebel@pengutronix.de>2006-01-16 17:30:33 +0000
commit7a85e24b7b93312af3f2ecd2929537632c3985d2 (patch)
tree49190f20881bcf6045ebf7dfc2281c0b4e72807a /rules/ppp.make
parent0a9e193bc487e2f4687ef0e8a6231c9dddd23ad5 (diff)
downloadptxdist-7a85e24b7b93312af3f2ecd2929537632c3985d2.tar.gz
ptxdist-7a85e24b7b93312af3f2ecd2929537632c3985d2.tar.xz
name changed
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-0.9-trunk@4128 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'rules/ppp.make')
-rw-r--r--rules/ppp.make158
1 files changed, 158 insertions, 0 deletions
diff --git a/rules/ppp.make b/rules/ppp.make
new file mode 100644
index 000000000..db7910e03
--- /dev/null
+++ b/rules/ppp.make
@@ -0,0 +1,158 @@
+# -*-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
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_PPP) += ppp
+
+#
+# Paths and names
+#
+PPP_VERSION = 2.4.1
+PPP = ppp-$(PPP_VERSION)
+PPP_URL = ftp://ftp.samba.org/pub/ppp/$(PPP).tar.gz
+PPP_SOURCE = $(SRCDIR)/$(PPP).tar.gz
+PPP_DIR = $(BUILDDIR)/$(PPP)
+
+-include $(call package_depfile)
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+ppp_get: $(STATEDIR)/ppp.get
+
+$(STATEDIR)/ppp.get: $(PPP_SOURCE)
+ @$(call targetinfo, $@)
+ @$(call get_patches, $(PPP))
+ @$(call touch, $@)
+
+$(PPP_SOURCE):
+ @$(call targetinfo, $@)
+ @$(call get, $(PPP_URL))
+
+# ----------------------------------------------------------------------------
+# Extract
+# ----------------------------------------------------------------------------
+
+ppp_extract: $(STATEDIR)/ppp.extract
+
+$(STATEDIR)/ppp.extract: $(STATEDIR)/ppp.get
+ @$(call targetinfo, $@)
+ @$(call clean, $(PPP_DIR))
+ @$(call extract, $(PPP_SOURCE))
+ @$(call patchin, $(PPP))
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+ppp_prepare: $(STATEDIR)/ppp.prepare
+
+PPP_PATH = PATH=$(CROSS_PATH)
+PPP_MAKEVARS = CROSS=$(CROSS_ENV)
+
+$(STATEDIR)/ppp.prepare: \
+ $(STATEDIR)/virtual-xchain.install \
+ $(STATEDIR)/ppp.extract
+ @$(call targetinfo, $@)
+ cd $(PPP_DIR) && \
+ ./configure
+
+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_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_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
+ @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
+# ----------------------------------------------------------------------------
+
+ppp_compile: $(STATEDIR)/ppp.compile
+
+$(STATEDIR)/ppp.compile: $(ppp_compile_deps_default)
+ @$(call targetinfo, $@)
+ cd $(PPP_DIR) && \
+ $(PPP_PATH) make $(PPP_MAKEVARS)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+ppp_install: $(STATEDIR)/ppp.install
+
+$(STATEDIR)/ppp.install: $(ppp_install_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+ppp_targetinstall: $(STATEDIR)/ppp.targetinstall
+
+$(STATEDIR)/ppp.targetinstall: $(ppp_targetinstall_deps_default)
+ @$(call targetinfo, $@)
+
+ @$(call install_init,default)
+ @$(call install_fixup,PACKAGE,ppp)
+ @$(call install_fixup,PRIORITY,optional)
+ @$(call install_fixup,VERSION,$(PPP_VERSION))
+ @$(call install_fixup,SECTION,base)
+ @$(call install_fixup,AUTHOR,"Robert Schwebel <r.schwebel\@pengutronix.de>")
+ @$(call install_fixup,DEPENDS,)
+ @$(call install_fixup,DESCRIPTION,missing)
+
+ @$(call install_copy, 0, 0, 0755, $(PPP_DIR)/pppd/pppd, /usr/sbin/pppd)
+ @$(call install_copy, 0, 0, 0755, $(PPP_DIR)/chat/chat, /usr/sbin/chat)
+
+ @$(call install_finish)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+ppp_clean:
+ -rm -rf $(STATEDIR)/ppp.*
+ -rm -rf $(IMAGEDIR)/ppp_*
+ -rm -rf $(PPP_DIR)
+
+# vim: syntax=make