d8a8df985127fea3310210aaf3fd295819b2abe9
[openwrt/svn-archive/archive.git] / net / openl2tp / Makefile
1 #
2 # Copyright (C) 2009-2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=openl2tp
12 PKG_VERSION:=1.8
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/openl2tp
17 PKG_MD5SUM:=e3d08dedfb9e6a9a1e24f6766f6dadd0
18
19 PKG_BUILD_DEPENDS:=libreadline libncurses
20 PKG_BUILD_PARALLEL:=1
21 PPPD_VERSION:=2.4.5
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/openl2tp
26 SECTION:=net
27 CATEGORY:=Network
28 DEPENDS:=+ppp +kmod-pppol2tp +portmap +libreadline +libncurses \
29 @!LINUX_2_4 $(LIBRPC_DEPENDS)
30 TITLE:=An L2TP (Layer 2 Tunneling Protocol) daemon
31 URL:=http://www.openl2tp.org/
32 SUBMENU:=VPN
33 endef
34
35 define Package/openl2tp/description
36 OpenL2TP is an open source L2TP client/server, written by Katalix Systems
37 specifically for Linux. It has been designed for use as an enterprise
38 L2TP VPN server or in commercial, Linux-based, embedded networking
39 products and is able to support hundreds of sessions, each with different
40 configuration.
41 endef
42
43 MAKE_FLAGS+= \
44 KERNEL_SRCDIR="$(LINUX_DIR)" \
45 KERNEL_BLDDIR="$(LINUX_DIR)" \
46 PPPD_VERSION="$(PKG_PPPD_VERSION)" \
47 READLINE_DIR="$(STAGING_DIR)/usr" \
48 PPPD_SRCDIR="$(STAGING_DIR)/usr/include" \
49 PPPD_LIBDIR="$(STAGING_DIR)/usr/lib" \
50 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
51 LIBS.dmalloc="-L$(STAGING_DIR)/usr/lib $(LIBRPC)"
52
53 define Package/openl2tp/install
54 $(INSTALL_DIR) $(1)/usr/bin
55 $(INSTALL_BIN) $(PKG_BUILD_DIR)/l2tpconfig $(1)/usr/bin/
56 $(INSTALL_DIR) $(1)/usr/sbin
57 $(INSTALL_BIN) $(PKG_BUILD_DIR)/openl2tpd $(1)/usr/sbin/
58 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PPPD_VERSION)
59 $(INSTALL_BIN) $(PKG_BUILD_DIR)/pppd/openl2tp.so $(1)/usr/lib/pppd/$(PPPD_VERSION)/
60 $(INSTALL_BIN) $(PKG_BUILD_DIR)/pppd/pppol2tp.so $(1)/usr/lib/pppd/$(PPPD_VERSION)/
61 $(INSTALL_DIR) $(1)/usr/lib/openl2tp
62 $(INSTALL_BIN) $(PKG_BUILD_DIR)/plugins/event_sock.so $(1)/usr/lib/openl2tp/
63 $(INSTALL_BIN) $(PKG_BUILD_DIR)/plugins/ipsec.so $(1)/usr/lib/openl2tp/
64 $(INSTALL_BIN) $(PKG_BUILD_DIR)/plugins/ppp_null.so $(1)/usr/lib/openl2tp/
65 $(INSTALL_BIN) $(PKG_BUILD_DIR)/plugins/ppp_unix.so $(1)/usr/lib/openl2tp/
66 endef
67
68 $(eval $(call BuildPackage,openl2tp))