[package] add openl2tp, patch from Vladimir Voronkov

git-svn-id: svn://svn.openwrt.org/openwrt/packages@16994 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
florian 2009-07-26 10:26:13 +00:00
parent ac085b2cc1
commit 2a6c1b1163
3 changed files with 141 additions and 0 deletions

64
net/openl2tp/Makefile Normal file
View File

@ -0,0 +1,64 @@
#
# Copyright (C) 2009 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=openl2tp
PKG_VERSION:=1.6
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/openl2tp
PKG_MD5SUM:=87f035ca5ddf7c61e720f422cdc997cf
PKG_BUILD_DEPENDS:=libreadline libncurses
PKG_PPPD_VERSION:=2.4.4
include $(INCLUDE_DIR)/package.mk
define Package/openl2tp
SECTION:=net
CATEGORY:=Network
DEPENDS:=+kmod-pppol2tp +ppp +portmap +libreadline +libncurses
TITLE:=An L2TP (Layer 2 Tunneling Protocol) daemon
URL:=http://opensource.katalix.com/openl2tp
SUBMENU:=VPN
endef
define Package/openl2tp/description
OpenL2TP is an open source L2TP client/server, written by Katalix Systems
specifically for Linux. It has been designed for use as an enterprise
L2TP VPN server or in commercial, Linux-based, embedded networking
products and is able to support hundreds of sessions, each with different
configuration.
endef
MAKE_FLAGS+= \
KERNEL_SRCDIR="$(LINUX_DIR)" \
KERNEL_BLDDIR="$(LINUX_DIR)" \
PPPD_VERSION="$(PKG_PPPD_VERSION)" \
READLINE_DIR="$(STAGING_DIR)/usr" \
PPPD_SRCDIR="$(STAGING_DIR)/usr/include" \
PPPD_LIBDIR="$(STAGING_DIR)/usr/lib"
define Package/openl2tp/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/l2tpconfig $(1)/usr/bin/
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/openl2tpd $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_PPPD_VERSION)
$(INSTALL_BIN) $(PKG_BUILD_DIR)/pppd/openl2tp.so $(1)/usr/lib/pppd/$(PKG_PPPD_VERSION)/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/pppd/pppol2tp.so $(1)/usr/lib/pppd/$(PKG_PPPD_VERSION)/
$(INSTALL_DIR) $(1)/usr/lib/openl2tp
$(INSTALL_BIN) $(PKG_BUILD_DIR)/plugins/event_sock.so $(1)/usr/lib/openl2tp/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/plugins/ipsec.so $(1)/usr/lib/openl2tp/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/plugins/ppp_null.so $(1)/usr/lib/openl2tp/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/plugins/ppp_unix.so $(1)/usr/lib/openl2tp/
endef
$(eval $(call BuildPackage,openl2tp))

View File

@ -0,0 +1,64 @@
Index: openl2tp-1.6/Makefile
===================================================================
--- openl2tp-1.6.orig/Makefile
+++ openl2tp-1.6/Makefile
@@ -8,7 +8,7 @@
L2TP_FEATURE_LAOC_SUPPORT= y
L2TP_FEATURE_LNIC_SUPPORT= y
L2TP_FEATURE_LNOC_SUPPORT= y
-L2TP_FEATURE_LOCAL_CONF_FILE= y
+#L2TP_FEATURE_LOCAL_CONF_FILE= y
#L2TP_FEATURE_LOCAL_STAT_FILE= y
# Define USE_DMALLOC to enable dmalloc memory debugging
@@ -29,31 +29,31 @@
# Build for UML environment?
# UML_TARGET= y
-ARCH=$(shell uname -p)
-ifeq ($(ARCH),x86_64)
-SYS_LIBDIR=/usr/lib64
-else
+#ARCH=$(shell uname -p)
+#ifeq ($(ARCH),x86_64)
+#SYS_LIBDIR=/usr/lib64
+#else
SYS_LIBDIR=/usr/lib
-endif
+#endif
# Point to kernel source tree
-KERNEL_SRCDIR= /lib/modules/$(shell uname -r)/source
-KERNEL_BLDDIR= /lib/modules/$(shell uname -r)/build
+#KERNEL_SRCDIR= /lib/modules/$(shell uname -r)/source
+#KERNEL_BLDDIR= /lib/modules/$(shell uname -r)/build
# Points to pppd install.
# By default, pppd headers are assumed to be in /usr/include/pppd. but
# can be pointed to a local pppd source tree if desired.
-PPPD_VERSION= 2.4.4
+#PPPD_VERSION= 2.4.4
# PPPD_SRCDIR= /usr/local/src/ppp-2.4.4
# PPPD_LIBDIR= /usr/lib/pppd/2.4.4
# Points to readline install root. READLINE_DIR should have lib/ & include/ subdirs
# If not defined, readline is assumed to be installed in the standard places that
# the compiler looks.
-READLINE_DIR=
+#READLINE_DIR=
# For cross-compiling
-CROSS_COMPILE=
+#CROSS_COMPILE=
# END CONFIGURABLE SETTINGS
@@ -137,7 +137,7 @@
CFLAGS= -I. -Iusl -Icli -isystem $(KERNEL_BLDDIR)/include \
-isystem $(KERNEL_SRCDIR)/include -MMD -Wall -Werror $(CPPFLAGS) $(CPPFLAGS.dmalloc) -DSYS_LIBDIR=$(SYS_LIBDIR)
LDFLAGS.l2tpd= -Wl,-E -L. -Lusl -lusl -ldl $(LIBS.dmalloc) -lc
-LDFLAGS.l2tpconfig= -Lcli -lcli -lreadline $(LIBS.dmalloc) $(READLINE_LDFLAGS) -lc
+LDFLAGS.l2tpconfig= -Lcli -lcli -lreadline -lncurses $(LIBS.dmalloc) $(READLINE_LDFLAGS) -lc
OPT_CFLAGS?= -O

View File

@ -0,0 +1,13 @@
Index: openl2tp-1.6/plugins/ppp_unix.c
===================================================================
--- openl2tp-1.6.orig/plugins/ppp_unix.c
+++ openl2tp-1.6/plugins/ppp_unix.c
@@ -643,6 +643,8 @@
if (ppp->ppp_profile_data->proxy_arp) {
argv[arg++] = "proxyarp";
+ } else {
+ argv[arg++] = "noproxyarp";
}
argv[arg++] = "plugin";