2 # Copyright (C) 2009-2011 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
9 include $(INCLUDE_DIR
)/kernel.mk
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=@SF
/openl2tp
17 PKG_MD5SUM
:=e3d08dedfb9e6a9a1e24f6766f6dadd0
19 PKG_BUILD_DEPENDS
:=libreadline libncurses USE_UCLIBC
:librpc
20 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(BUILD_VARIANT
)/$(PKG_NAME
)-$(PKG_VERSION
)
24 include $(INCLUDE_DIR
)/package.mk
26 define Package
/openl2tp
/Default
30 TITLE
:=An L2TP
(Layer
2 Tunneling Protocol
) daemon
31 URL
:=http
://www.openl2tp.org
/
33 DEPENDS
:=+ppp
+kmod-pppol2tp
36 define Package
/openl2tp
/description
/Default
37 OpenL2TP is an open source L2TP client
/server
, written by Katalix Systems
38 specifically for Linux. It has been designed for use
as an enterprise
39 L2TP VPN server or in commercial
, Linux-based
, embedded networking
40 products and is able to support hundreds of sessions
, each with different
45 define Package
/openl2tp-full
46 $(call Package
/openl2tp
/Default
)
49 DEPENDS
+=+portmap
+libreadline
+libncurses
$(LIBRPC_DEPENDS
)
52 define Package
/openl2tp-full
/description
53 $(call Package
/openl2tp
/description
/Default
)
55 This package a full-featured
, RPC-enabled OpenL2TP.
59 define Package
/openl2tp-mini
60 $(call Package
/openl2tp
/Default
)
65 define Package
/openl2tp-mini
/description
66 $(call Package
/openl2tp
/description
/Default
)
68 This package a minimal-featured
, RPC-disabled OpenL2TP.
73 KERNEL_SRCDIR
="$(LINUX_DIR)" \
74 KERNEL_BLDDIR
="$(LINUX_DIR)" \
75 PPPD_VERSION
="$(PKG_PPPD_VERSION)" \
76 READLINE_DIR
="$(STAGING_DIR)/usr" \
77 PPPD_SRCDIR
="$(STAGING_DIR)/usr/include" \
78 PPPD_LIBDIR
="$(STAGING_DIR)/usr/lib" \
79 CFLAGS.optimize
="$(TARGET_CFLAGS)" \
80 CPPFLAGS-y
="-I$(STAGING_DIR)/usr/include" \
81 L2TP_FEATURE_LOCAL_CONF_FILE
=y \
83 ifeq ($(BUILD_VARIANT
),full
)
86 L2TP_FEATURE_RPC_MANAGEMENT
=y \
87 L2TP_FEATURE_LOCAL_STAT_FILE
=y \
88 LIBS.dmalloc
="-L$(STAGING_DIR)/usr/lib $(LIBRPC)" \
91 ifeq ($(BUILD_VARIANT
),mini
)
94 L2TP_FEATURE_RPC_MANAGEMENT
= \
95 L2TP_FEATURE_LOCAL_STAT_FILE
= \
100 $(call Build
/Prepare
/Default
)
101 $(CP
) .
/src
/*.
[ch
] $(PKG_BUILD_DIR
)/
104 define Package
/openl2tp-full
/install
105 $(INSTALL_DIR
) $(1)/usr
/bin
106 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/l2tpconfig
$(1)/usr
/bin
/
107 $(INSTALL_DIR
) $(1)/usr
/sbin
108 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/openl2tpd
$(1)/usr
/sbin
/
109 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PPPD_VERSION
)
110 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/pppd
/openl2tp.so
$(1)/usr
/lib
/pppd
/$(PPPD_VERSION
)/
111 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/pppd
/pppol2tp.so
$(1)/usr
/lib
/pppd
/$(PPPD_VERSION
)/
112 $(INSTALL_DIR
) $(1)/usr
/lib
/openl2tp
113 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/plugins
/event_sock.so
$(1)/usr
/lib
/openl2tp
/
114 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/plugins
/ipsec.so
$(1)/usr
/lib
/openl2tp
/
115 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/plugins
/ppp_null.so
$(1)/usr
/lib
/openl2tp
/
116 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/plugins
/ppp_unix.so
$(1)/usr
/lib
/openl2tp
/
119 define Package
/openl2tp-mini
/install
120 $(INSTALL_DIR
) $(1)/usr
/sbin
121 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/openl2tpd
$(1)/usr
/sbin
/
122 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PPPD_VERSION
)
123 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/pppd
/pppol2tp.so
$(1)/usr
/lib
/pppd
/$(PPPD_VERSION
)/
124 $(INSTALL_DIR
) $(1)/usr
/lib
/openl2tp
125 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/plugins
/ipsec.so
$(1)/usr
/lib
/openl2tp
/
126 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/plugins
/ppp_unix.so
$(1)/usr
/lib
/openl2tp
/
129 $(eval
$(call BuildPackage
,openl2tp-full
))
130 $(eval
$(call BuildPackage
,openl2tp-mini
))